Reinstantiate unsorted index group check
commitde821aaf0ba0c046dd3215bd1129035f8eea7ff0
authorTeemu Murtola <teemu.murtola@gmail.com>
Sun, 29 Jun 2014 05:00:45 +0000 (29 08:00 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Sat, 5 Jul 2014 12:18:36 +0000 (5 14:18 +0200)
tree1cff9772ed3a1754aa14e2907becb66959d232e7
parentee4d9e4394873367c92f6c4c717cc08e8da7ca85
Reinstantiate unsorted index group check

In most contexts, providing an index group with duplicate atoms or atom
indices not in ascending order results in the selection getting silently
evaluated incorrectly.  The selection engine now detects this case and
gives a fatal error, hopefully reducing confusion if such a case arises.

The case where an unsorted index group is provided as a sole value of a
selection is still supported.

Change-Id: I0b647a26d9a1b47da10c84bdd3d073412d166a75
src/gromacs/selection/parsetree.cpp
src/gromacs/selection/selectioncollection.cpp
src/gromacs/selection/selelem.cpp
src/gromacs/selection/selelem.h
src/gromacs/selection/selmethod.h
src/gromacs/selection/sm_position.cpp
src/gromacs/selection/tests/refdata/SelectionCollectionDataTest_HandlesUnsortedIndexGroupsInSelections.xml
src/gromacs/selection/tests/refdata/SelectionCollectionDataTest_HandlesUnsortedIndexGroupsInSelectionsDelayed.xml [new file with mode: 0644]
src/gromacs/selection/tests/selectioncollection.cpp
src/gromacs/utility/exceptions.h