How to read the dssp.dat file gmx 2023.1

GROMACS version:
GROMACS modification: Yes/No
Here post your question

gmx dssp -s md_0_1.tpr -f md_0_1_noPBC.xtc -o dssp_1.dat -xvg xmgrace

unable to plot dssp.dat file

What is it you want to plot? Have you tried using the -num output option?

i want to do secondary structure analysis, but unfortunately the output is in .dat format and i am unable to use the .dat to plot

could you elaborate the command?

You can open the .dat file in any text editor. But the information is not meant for plotting.

If you are interested in statistics over time, which could be plotted, the -num option will give that, e.g.: gmx dssp -s md_0_1.tpr -f md_0_1_noPBC.xtc -o dssp_1.dat -num num.xvg.

gmx dssp -s md_0_1.tpr -f md_0_1_noPBC.xtc -o dssp_1.dat -num num.xvg

Error in user input:
Invalid command-line options
Unknown command-line option -num

it gave an error

is there any way to perform secondary structure analysis using 2023.1

Sorry, I didn’t notice you are using GROMACS 2023. The dssp tool was changed in GROMACS 2024. You cannot get time based statistics (the num option) in GROMACS 2023.

You can still do secondary structure analysis. But then I’m not sure what you expect to plot.

i want to plot an image as attached… Can i use the present version .xtc and .tpr file in gromacs 2024 to plot?

That kind of time-based analysis should be possible in gromacs 2024, yes. And you can use the input from your current simulations.

WIll try with gromacs 2024, thanks @MagnusL for your prompt reply…

i had run the command using 2024.1 but generated only LOOPS

how to generate time based analysis as previously shared image

Have you checked the file contents in a text editor? Have you tried xmgrace -nxy num.xvg (if you are using xmgrace)? I think it only plots the first set by default.

It worked !!! thanks a lot @MagnusL you saved my day…

Great!

Hi @chitlurikiran and @MagnusL, I just wanted to say thank you SO much for this post and the responses! I also ran my MD simulations with gmx 2023.2, and thanks to this post, I’ve figured out how to plot my dssp.dat files in xmgrace.
Thanks so much!

@Dewald21 i didn’t figure out this.Could you please help with this. I am using gromacs 2023.4.If you kindly share what command you have just run.

@Sounak_Biswas, so here’s what I did and what worked for me.
I ran my MD simulations in gromacs 2023.2 (compiled on our HPC cluster without mpi) and then did the dssp with gromacs 2024.1 (compiled on our HPC cluster WITH mpi). But despite the version differences, my dssp analysis still seemed to work and generated the plot that I was looking for.

I ran the gmx dssp on our cluster with gromacs 2024.1 using the command:
mpirun gmx_mpi dssp -f md_fit_300_500ns.xtc -s md.tpr -o dssp_peptide_300_500ns.dat -num dssp_peptide_300_500ns.xvg -tu ns -n index.ndx -sel '17'

  • mpirun gmx_mpi dssp: the gmx dssp command for our cluster’s mpi-compiled gromacs 2024.1
  • -num dssp_peptide_300_500ns.xvg: ensures that your results is output to an xvg file that can be viewed in xmgrace (that’s what I used to view my results as a plot over the 500ns of my simulation)
  • -tu ns: works with gromacs 2024.1 (not with 2023.2) to show you simulation in ns rather than ps, for example
  • -n index.ndx -sel '17': specifies to include the index file, because I specifically wanted to view the secondary structure of the peptide in my complex, which is group 17 in my index file.

Then I copied the dssp_peptide_300_500ns.xvg file back to my local machine and used xmgrace -nxy dssp_peptide_300_500ns.xvg to view the plot in xmgrace.
I hope that helps and that you manage to get your working!

Unfortunately, my plot doesn’t look exactly like the one that @chitlurikiran showed in this thread, but I’m still tweaking it to get what I’m looking for. This is my first time doing secondary structure analysis (and using gmx dssp), so I’m still figuring out how it works and how I can use the different options to get what I’m looking for.

@Dewald21 thank you so much, could you kindly share the images of your generated graphs.