Make static selections of large index groups work.
authorMark Abraham <mark.j.abraham@gmail.com>
Wed, 15 Sep 2021 09:29:55 +0000 (11:29 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Wed, 15 Sep 2021 10:03:11 +0000 (12:03 +0200)
commit4d608f1f432c2c1b64a064b18dcf305bc700f45b
treefdc2c4eeea81e1bb9316faaecf988cf1f46d5df5
parent3a78d26fe27ef5f3ea5617c83071a4f218c67d2c
Make static selections of large index groups work.

The default allocation size is the number of atoms, but this does not
work for large static selections. Such selections might well be used
with gmx distance for listing more pairs of atoms than there are
atoms. Fixed by allocating the needed size.

Fixes #4148
docs/release-notes/2021/2021.4.rst
src/gromacs/selection/evaluate.cpp
src/gromacs/trajectoryanalysis/tests/distance.cpp
src/gromacs/trajectoryanalysis/tests/refdata/DistanceModuleTest_HandlesSelectionFromGroup.xml [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/refdata/DistanceModuleTest_HandlesSelectionFromLargeGroup.xml [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/simple.ndx [new file with mode: 0644]