Remove overeager selection index group check
authorTeemu Murtola <teemu.murtola@gmail.com>
Sat, 28 Jun 2014 06:51:00 +0000 (09:51 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Sat, 28 Jun 2014 06:51:00 +0000 (09:51 +0300)
commit7a79695704adc869e45799404ef352fd7f00bf3d
treefdcf1f5aa649d396a0c1f6fe73a01910623ef717
parent73006fec155234f1fb74460233eff330acec509c
Remove overeager selection index group check

The check for sorted groups in selections was a bit too eager, and
prevented use of many index groups that would previously have been
perfectly valid for, e.g., g_bond, with gmx distance.  Remove the
check.  Instead, fix the case where unsorted group is passed as the
value of a selection, and add tests for that.

Will reinstantiate the check later in another form, as currently
unsorted index groups get silently accepted and treated in a more or
less random manner in all other cases.  However, this change provides
a usability improvement that could be nice to have, even if I don't
immediately have time to implement the check.

Change-Id: I86e935d8bd08e63a9e3d01fb5a4084d96c5b7006
src/gromacs/selection/evaluate.cpp
src/gromacs/selection/parsetree.cpp
src/gromacs/selection/selectioncollection.cpp
src/gromacs/selection/selelem.cpp
src/gromacs/selection/selelem.h
src/gromacs/selection/tests/refdata/SelectionCollectionDataTest_HandlesUnsortedIndexGroupsInSelections.xml [new file with mode: 0644]
src/gromacs/selection/tests/selectioncollection.cpp
src/gromacs/selection/tests/simple.ndx