Duplicated groups in make_ndx and select
Summary
make_ndx and gmx select tools generate duplicated groups in the automatic groups identification when working with particular gro files. It might be related to the addition of a small molecule in the structure, but I'm not sure.
GROMACS version
GROMACS version: 2022.1-conda_forge
Precision: mixed
Memory model: 64 bit
MPI library: thread_mpi
OpenMP support: enabled (GMX_OPENMP_MAX_THREADS = 128)
GPU support: disabled
SIMD instructions: AVX2_256
CPU FFT library: fftw-3.3.10-sse2-avx
GPU FFT library: none
RDTSCP usage: enabled
TNG support: enabled
Hwloc support: disabled
Tracing support: disabled
C compiler: /Users/runner/miniforge3/conda-bld/gromacs_1652638496238/_build_env/bin/x86_64-apple-darwin13.4.0-clang Clang 13.0.1
C compiler flags: -mavx2 -mfma -Wno-missing-field-initializers -O3 -DNDEBUG
C++ compiler: /Users/runner/miniforge3/conda-bld/gromacs_1652638496238/_build_env/bin/x86_64-apple-darwin13.4.0-clang++ Clang 13.0.1
C++ compiler flags: -mavx2 -mfma -Wno-reserved-identifier -Wno-missing-field-initializers -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-source-uses-openmp -Wno-c++17-extensions -Wno-documentation-unknown-command -Wno-covered-switch-default -Wno-switch-enum -Wno-extra-semi-stmt -Wno-weak-vtables -Wno-shadow -Wno-padded -Wno-reserved-id-macro -Wno-double-promotion -Wno-exit-time-destructors -Wno-global-constructors -Wno-documentation -Wno-format-nonliteral -Wno-used-but-marked-unused -Wno-float-equal -Wno-conditional-uninitialized -Wno-conversion -Wno-disabled-macro-expansion -Wno-unused-macros -fopenmp=libomp -O3 -DNDEBUG
Steps to reproduce
gmx make_ndx -f 3HTB_JZ4_min.gro
or
gmx select -f 3HTB_JZ4_min.gro -s 3HTB_JZ4_min.gro
GRO file: 3HTB_JZ4_min.gro
What is the current bug behavior?
The groups that are automatically identified by the make_ndx and select tools contain duplicated entries, usually starting from the small molecule (in the example, the JZ4 molecule):
13 JZ4 : 22 atoms
14 NA : 10 atoms
15 CL : 16 atoms
16 Water : 28515 atoms
17 SOL : 28515 atoms
18 non-Water : 2662 atoms
19 Ion : 26 atoms
20 JZ4 : 22 atoms
21 NA : 10 atoms
22 CL : 16 atoms
23 Water_and_ions : 28541 atoms
This behaviour ends up being a problem for automatic workflows when trying to use one of these groups identified by the name (e.g. JZ4), as GROMACS then complains about duplicated groups. Using the number instead of the name works file.
What did you expect the correct behavior to be?
A collection of groups with no duplication:
13 JZ4 : 22 atoms
14 NA : 10 atoms
15 CL : 16 atoms
16 Water : 28515 atoms
17 SOL : 28515 atoms
18 non-Water : 2662 atoms
19 Ion : 26 atoms
20 Water_and_ions : 28541 atoms
Possible fixes
Check GRO parser that automatically recognises the groups. A possible hint might be to look at what happens when the GRO file contains a small molecule (ligand).