Time seems to be not correct using "trjcat"

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

I use gmx trjcat -f trj1.xtc trj2.xtc -cat -o combine.xtc to combine two trajectories into one. Each trajectory is from 0 to 50 ns, with 0.1 ns interval, totalling 501 frames. In the combine.xtc, I want the frame 1 to 501 to be trj1’s frames, and frame 502 to 1002 to be trj2’s frames.

The prompt I got is shown below. I can see Last frame written was 1001, which means there are 1002 frames (the first frame is called “frame 0” in Gromacs), which is good. However, why it is showing frame 910 time 40900.000 ps ?

I actually do not care about the time. I just want to simply combine the two trajectories.

Command line:
  gmx trjcat -f trj1.xtc trj2.xtc -cat -o combine.xtc

Reading frame       1 time  100.000

Summary of files and start times used:

          File                Start time       Time step
---------------------------------------------------------
                 trj1.xtc        0.000 ps      100.000 ps
                 trj2.xtc        0.000 ps      100.000 ps WARNING: same Start time as previous

Reading frame       0 time    0.000   Note that major changes are planned in future for trjcat, to improve usability and utility.
lasttime 0

Continue writing frames from trj1.xtc t=0 ps, frame=0
Last frame        500 time 50000.000    ->  frame    500 time 50000.000 ps
Reading frame       0 time    0.000
lasttime 50000

Continue writing frames from trj2.xtc t=0 ps, frame=501
Last frame        500 time 50000.000    ->  frame    910 time 40900.000 ps

Last frame written was 1001, time 50000.000000 ps

Hi,

You can fix the times to be continuous with the flag -settime. That will prompt you for how each new trajectory “relates” to the previous.

Petter

Hi, Petter, thank you. Yes, I can use -settime to correct it based on the prompt. But I still do not understand why frame 910 time 40900.000 ps appears when -settime is not supplied.

In any case, can I confirm that the frame 1 to 501 are trj1’s frames, and frame 502 to 1002 are trj2’s frames? Thank you.

My best guess is that it’s an error with the text message, but that the files have been correctly cat’ed and that it means to say the correct time + frame. I’d suggest extracting the last frames from trj2.xtc and combined.xtc and compare them to see if they are identical. E.g. by loading them in vmd or dumping into text files through gmx trjconv -dump <time> -o <out.gro> or similar.

Hi Petter, thank you very much, this is a great suggestion!