I have in principle the same problem: I would like to extract the molecular COM velocity for a subgroup (“LIG”) of the system with the following command: gmx trajectory -f trajectory.trr -s topol.tpr -e 100 -ov vel_tmp.xvg -seltype mol_com -select LIG
This will result in an empty velocity file (vel_tmp.xvg), which only contains the .xvg header.
If I also want to extract the position with the following command: gmx trajectory -f trajectory.trr -s topol.tpr -e 100 -ox pos_tmp.xvg -ov vel_tmp.xvg -seltype mol_com -select LIG
I will obtain the following error message:
-------------------------------------------------------
Program: gmx trajectory, version 2021.3
Source file: src/gromacs/analysisdata/datastorage.cpp (line 828)
Function: gmx::AnalysisDataStorageFrame& gmx::AnalysisDataStorage::startFrame(const gmx::AnalysisDataFrameHeader&)
API error (bug):
Out of bounds frame index
For more information and tips for troubleshooting, please check the GROMACS
website at http://www.gromacs.org/Documentation/Errors
-------------------------------------------------------
In the trajectory, there are positions and velocities (no forces), both saved every 0.2 ps (i.e. every 200 timesteps) as confirmed by gmx check: