How can i extract dihedral angels for every residue?

GROMACS version:2020.4
I need to extract dihedral angels for every residue of my peptide over the simulation time as I have 18000 frames however when I used the following command

gmx rama -s md.tpr -f md.xtc -o dihedrals.xvg

and then extract the dihedrals of specific residue PHE-102 by using

grep PHE-102 dihedrals.xvg | awk ‘{print $1 " " $2’} > rama-PHE-102.xvg

I only got 1800 points not 18000 as the number of the frames

Hi,
you can check that you simulation finished properly or
you can check the frequency on which you save in xtc (mdp option nstxout-compressed ) to see how many frames you have saved in trjactory file.
Best regards
Alessandra

Thanks for replying. I already checked it and loaded it on VMD, and I have 18000 frames

Hi,
gmx rama works fine with my inputs. The problem can be somewhere else in the analysis.
it can be that you have done some postprocessing with option -dt, or that the grep script does not work properly.
I hope it helps
Alessandra

So, Does it natural to get 1800 values from 18000 frames or it should be more than those values?

You should get the same number of output lines as you have frames in the trajectory. I can’t reproduce any problem with trajectories I have. Check your previous steps and correct your awk statement (which is incorrect syntax) to make sure you’re not simply removing/missing lines by accident.

Thanks a lot for replying … I checked the command again and found the problem … if I got 20000 values from 20000 frames … how can I skip the first 2000 value?

Hi,

  1. you can use the gmx rama with option
    -b “Time of first frame to read from trajectory (default unit ps)”
    Knowing the time step and the frequency you use to save (see mdp option), you can calculate the time in ps corresponding to the first 2000 steps

  2. or you modify the “grep” script such as it ignores the first 2000 values

Best regards
Alessandra