Fix velocity and force evaluation for empty selections.
authorTeemu Murtola <teemu.murtola@gmail.com>
Sat, 9 Feb 2013 15:36:07 +0000 (17:36 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Wed, 13 Feb 2013 21:27:26 +0000 (22:27 +0100)
commit72349c4001adb7043c63df7bc52cd28980aad509
tree01e2d774dc12d1a5e8bf198cb35c6e3548caf87b
parent2062869fe976b664b563b2e584a1652429b350b1
Fix velocity and force evaluation for empty selections.

Requesting velocity or force evaluation and then passing an empty
selection resulted in an assert (in multiple places in the code).
Added a test for the behavior in this case.

Change-Id: I70cfb43c652f709fd555b4f23467f71fdb4bd3e7
src/gromacs/selection/position.cpp
src/gromacs/selection/selection.h
src/gromacs/selection/selectionoption.h
src/gromacs/selection/tests/selectioncollection.cpp