GROMACS version:2020.1-1
GROMACS modification: Yes/No
HI I am very new user. I have performed a small simulation of 200 picoseconds. I have the initial structure before the simulation (t=0) and the final structure after my simulation. However, I want to know how can I generate snapshots of my structure at regular time intervals of the simulation.
First chose your time interval of interest using skip/ dt command, say you want every 10th frame (using -skip 10) or say output frame every 100 ps (-dt 100). That will give you a new trajectory with your frames of interest, default outout is trajout.xtc
Then use trjconv again using new trajectory file to give separate output structure files for those frames using -sep and -nzero command. The output file naming will contain frame#.gro. Depending on how many frames you have, you can change number of integers by -nzero
gmx trjconv -f .xtc -s .tpr -sep -nzero 4 -o .gro
Thank you Neena for replying to my query.
According to your suggestion:
Firstly, I have used the command gmx trjconv -s md.tpr -f md_new.xtc -dt 10 -o trj.xtc (I wanted output frame every 10 ps)
This has given an output file of trj.xtc
Secondly, I then used the command gmx trjconv -f trj.xtc -s md.tpr -sep -nzero 4 -o frame#.gro (as you have mentioned)
This has given 21 new files as output starting from frame0000.gro to frame0020.gro. Upon opening each file I saw that each file corresponds to specific time for example frame0000.gro corresponds to t = 0 while frame0020.gro is for t = 200. (I only performed md simulations for 200 ps so I guess this should be fine).
Now, I am interested in having a look at the final structure at t = 200, therefore I converted the frame10020.gro file into a .pdb file by using the command gmx editconf -f frame10020.gro -o final.pdb
Kindly tell me whether my steps are correct or not.
I have one other question as well, how will I know about the number of frames I have?
Unless there is a particular reason you want to, you can leave the coordinate file in the .gro format. It is a coordinate file just like .pdb, just with some different information it can store.
The number of frames you have in your trajectory is dictated by the settings you have in your .mdp file when you run the simulation. However, you can also find out details using gmx check - http://manual.gromacs.org/documentation/current/onlinehelp/gmx-check.html Run that on your trajectory file and it will tell you all about what it contains i.e. number of frames, number of atoms, time etc.