Support subset of rvec array as input for analysis nbsearch
commit07e73960a375397665f7a4fce557363fefc65ae9
authorTeemu Murtola <teemu.murtola@gmail.com>
Sat, 20 Dec 2014 10:29:25 +0000 (20 12:29 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Mon, 5 Jan 2015 23:08:32 +0000 (6 00:08 +0100)
tree443cf9b5a5b515ccce996dad8efedafb4e1a3f5b
parentc9cbb4cd22c0037997090aee69723b13723e9560
Support subset of rvec array as input for analysis nbsearch

Make it possible to perform a neighbor search such that instead of using
a continuous rvec array as the reference/test positions, it is possible
considers a subset of such an array, specified by a separate index
array.

Also, add support for accessing the components of the shortest distance
vector between found pairs through AnalysisNeighborhoodPair.  This frees
the caller from a separate pbc_dx() call in case that distance vector is
of interest.

Tests could still be extended and improved, but left for a later change.

Change-Id: I253ddda483122367d9c41a5ed8bb172e476a90bb
src/gromacs/selection/nbsearch.cpp
src/gromacs/selection/nbsearch.h
src/gromacs/selection/tests/nbsearch.cpp
src/gromacs/utility/arrayref.h