I am quite confused about the behaviour of gmx make_ndx, specifically of splitres. I have a .pdb file with a protein embedded in a lipid bilayer, and I am trying to study some properties as a function of the residue type and position. As such, I prepare an index file simply by using gmx make_ndx and specifying splitres 1, where 1 is the (default) Protein group. This returns a list of residues, as expected, but each one has just one atom.
I did this with GROMACS2024. I have several installations, so I changed to 23.2 and I got the same result, while with 21.6 I get the list of residues AND each one has the correct number of atoms. I embedded the protein with CHARMM-GUI and run everything with GROMACS 2024. Am I missing something? Why one version is working and others don’t?
To reiterate, with GROMACS 2023 and 2024, running gmx make_ndx with splitres N command produces one group per residue from group N, with each group containing one atom from that residue. With GROMACS 2021, each group contains all atoms from the respective residue. Right?
If so, it indeed looks like a bug in the new versions. I will open an issue, hopefully will be fixed in the next release
A minor point is that if I use GROMACS naming (like the name of the group Protein or the derived names from splitch) I get weird naming characters like % or what you see here in the latter. If I rename the group then it works fine, like here I renamed the group as “test” before calling splitres on it
If I git apply the patch it fails with the following:
error: patch failed: docs/release-notes/2023/2023.5.rst:73
error: docs/release-notes/2023/2023.5.rst: patch does not apply
error: patch failed: src/gromacs/tools/make_ndx.cpp:728
error: src/gromacs/tools/make_ndx.cpp: patch does not apply
error: patch failed: src/gromacs/tools/tests/make_ndx.cpp:114
error: src/gromacs/tools/tests/make_ndx.cpp: patch does not apply
This was the already patched 2023.5 which was now giving the correct atom splitting in the residues.
The fix for splitres missing atoms will be in GROMACS 2023.5 / 2024.2 released at the end of April. Thanks for reporting the problem and testing the patch!