Additional index group checks for selections
authorTeemu Murtola <teemu.murtola@gmail.com>
Fri, 27 Jun 2014 11:20:39 +0000 (14:20 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Tue, 8 Jul 2014 18:45:04 +0000 (20:45 +0200)
commitd63e5c42affd65b950f57046c3274e649ce3f127
tree4e964466ab727f3d704fd6d2db2e3fb872535785
parent679d45de7fc08bf03c6bea606af576e10917bfdc
Additional index group checks for selections

Now index groups provided to selections are checked more thoroughly, and
an error is given if a group references an atom index outside the
topology (or the maximum atom number in the absence of a topology).
Negative atom indices also trigger the same error.

Previously, such index groups were silently accepted (except for a
warning during reading for negative indices), and the out-of-range atoms
dropped from the selections.

Change-Id: Id7a024ed316920d9594454ae36f7b9bdd9a429fc
src/gromacs/selection/indexutil.cpp
src/gromacs/selection/indexutil.h
src/gromacs/selection/parsetree.cpp
src/gromacs/selection/selectioncollection.cpp
src/gromacs/selection/selelem.cpp
src/gromacs/selection/selelem.h
src/gromacs/selection/tests/selectioncollection.cpp
src/gromacs/trajectoryanalysis/runnercommon.cpp