Issue with gmx extract-cluster

GROMACS version: 2020.1
GROMACS modification: No

Hello Gromacs users,

I need to extract a set of frames from my trajectory and I have the index of these frames (the frame number, not time). With gromacs version before 2020, I used to create an index file and then extract the conformations with trjconv with the -sub option.

Now the -sub option has been replaced by the extract-cluster command. However the functionality is not exactly the same as it expected that the index file contains all the frame of the simulation in at least one group of the index. However, I need to extract only a restricted number of frames (let’s say hundreds out of thousands of frames). When I use the extract-cluster tool with this index file, I obtain a lot of warnings (which I can prevent redirecting standar error) one for each frame not assigned to a cluster, and the command end with segmentation fault when the last frame present in the index have been extracted (and this is a problem in case I use the command within a script).

In addition, I noticed a strange behaviour: All groups of the index consist of only one frame each, but in the output file of the first group, in addition to the correct frame, a random number of frames are added (I have seen from 2 to 10 depending on the case). I do not understand the origin of these frames.

Is there alteratives in gromacs to extract only a restricted number of frames from an xtc, knowing their indices?

Thanks and Regards,

Hello Stefano,

gmx extract-cluster was supposed to be a drop-in replacement, so if something doesn’t work this is a bug I introduced when re-writing the tool.

Can you please open an issue on GitLab with the files needed to reproduce the issue, and tag me (acmnpv) so I can have a look and fix it?