Average velocities

GROMACS version: 2020.1
GROMACS modification: No

Hi all,

I want to calculate the average velocity of a particle group in different systems. I am using:

gmx traj -s system_1.tpr -f system_1.trr -av system_1.xvg -dt 50 -b 250 -nojump

… but I get:

WARNING: No coordinate frames found for option -cv or -cf

No frames found for average velocity, will not write veloc.pdb

What am I missing? The .trr file should also contain coordinates, right?

Thanks in advance.

Best
-Yasser

Hi Yasser,

The trr file only contains velocities and forces if the nstfout and nstvout are not set to zero (as they are by default).
https://manual.gromacs.org/documentation/current/user-guide/mdp-options.html#output-control

Hi,

Thanks for the reply.

In my case nstfout = nstvout = 5000 (otherwise the file would be huge). I am only interested in the velocities, not in the veloc.pdb. It is possible to get it without the coordinates?

Ah, I see - sorry , I misunderstood the setup. Let me have a look, there should be a way. I’ll reply as soon as I figured.

Hi Yasser,

Does -av and -af work for you? The trr does indeed not contain coordinates if you set nstxout=0.

Hi,

No, that’s what I tried before and got the error (see the first post). In my case nstxout=5000. I tried the -ov option and works, but the file is huge and messy, since it reports the velocity for each particle at each frame.

Hi Yasser,

I found some time to have a closer look at the source code - it was written overlooking the possiblity that one might have only velocities and forces on hand, but not the coordinates. I was trying to re-write the tool, but could not do a quick-fix and it’s part of future refactoring efforts to provide tools that don’t have that type of issue (the code of gmx traj is at least 17 years old).

Does using gmx trajectory -seltype res_com help to get averaged numbers per residue? I did not try myself, but it might be an easier way forward…

Best,
Christian

Hi Christian,

I will try with gmx trajectory. I used gmx msd as a turn around.

Thanks,
-Yasser

Good - I did not think of gmx msd. I’m tagging @pbauer as this is closely related to the work he had planned (as far as I know) on converting and extracting information from trajectories.