Trjconv options to extract frames from long trajectory

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

I want to extract frames from a 1us long trajectory at every 1000ps. My doubt is should I used the -dt option or -skip option or -n option and provide an index file with the frames indices. Please confirm if the following commands are equivalent. I am supposing the -n index option is handy if specific frames are required to be extracted and not necessarily frames at certain intervals.

gmx trjconv -f md_0_1_noPBC.xtc -dt 1000 -o trajectory_reduced_frames.xtc
or
gmx trjconv -f md_0_1_noPBC.xtc -skip 100 -o trajectory_reduced_frames.xtc
or
gmx trjconv -f md_0_1_noPBC.xtc -o protein-only.xtc -n index.ndx where index.ndx

Hi,

With -dt you can specify the time difference between extracted frames in picoseconds, while -skip specifies it as difference between frame indices. So -dt 1000 extracts a frame every 1000 ps = 1 ns, and -skip 100 every 100 * timestep * nstxout ps. If you want every 10 ps, it’s simplest to use -dt 10.

I believe -n only specifies the atom numbers to keep in your output (protein-only, etc), while -fr can be used to get specific frames. Either way, the third command is clearly different from the first two.

Petter

Thanks. That clarified the doubt.