Gromacs  5.1.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Friends
gmx::AnalysisNeighborhoodPositions Class Reference

#include <gromacs/selection/nbsearch.h>

Description

Input positions for neighborhood searching.

This class supports uniformly specifying sets of positions for various methods in the analysis neighborhood searching classes (AnalysisNeighborhood and AnalysisNeighborhoodSearch).

Note that copies are not made: only a reference to the positions passed to the constructors are kept. The caller is responsible to ensure that those positions remain in scope as long as the neighborhood search object requires access to them.

Also note that in addition to constructors here, Selection and SelectionPosition provide conversions operators to this type. It is done this way to not introduce a cyclic dependency between the selection code and the neighborhood search code, which in turn allows splitting this search code into a separate lower-level module if desired at some point.

Methods in this class do not throw.

Public Member Functions

 AnalysisNeighborhoodPositions (const rvec &x)
 Initializes positions from a single position vector. More...
 
 AnalysisNeighborhoodPositions (const rvec x[], int count)
 Initializes positions from an array of position vectors.
 
 AnalysisNeighborhoodPositions (const std::vector< RVec > &x)
 Initializes positions from a vector of position vectors.
 
AnalysisNeighborhoodPositionsexclusionIds (ConstArrayRef< int > ids)
 Sets indices to use for mapping exclusions to these positions. More...
 
AnalysisNeighborhoodPositionsindexed (ConstArrayRef< int > indices)
 Sets indices that select a subset of all positions from the array. More...
 
AnalysisNeighborhoodPositionsselectSingleFromArray (int index)
 Selects a single position to use from an array. More...
 

Friends

class internal::AnalysisNeighborhoodSearchImpl
 To access the positions for initialization.
 
class internal::AnalysisNeighborhoodPairSearchImpl
 To access the positions for initialization.
 

Constructor & Destructor Documentation

gmx::AnalysisNeighborhoodPositions::AnalysisNeighborhoodPositions ( const rvec &  x)
inline

Initializes positions from a single position vector.

For positions initialized this way, AnalysisNeighborhoodPair always returns zero in the corresponding index.

This constructor is not explicit to allow directly passing an rvec to methods that accept positions.

Member Function Documentation

AnalysisNeighborhoodPositions& gmx::AnalysisNeighborhoodPositions::exclusionIds ( ConstArrayRef< int >  ids)
inline

Sets indices to use for mapping exclusions to these positions.

The exclusion IDs can always be set, but they are ignored unless actual exclusions have been set with AnalysisNeighborhood::setTopologyExclusions().

AnalysisNeighborhoodPositions& gmx::AnalysisNeighborhoodPositions::indexed ( ConstArrayRef< int >  indices)
inline

Sets indices that select a subset of all positions from the array.

If called, selected positions from the array of positions passed to the constructor is used instead of the whole array. All returned indices from AnalysisNeighborhoodPair objects are indices to the indices array passed here.

AnalysisNeighborhoodPositions& gmx::AnalysisNeighborhoodPositions::selectSingleFromArray ( int  index)
inline

Selects a single position to use from an array.

If called, a single position from the array of positions passed to the constructor is used instead of the whole array. In contrast to the AnalysisNeighborhoodPositions(const rvec &) constructor, AnalysisNeighborhoodPair objects return index instead of zero.

If used together with indexed(), index references the index array passed to indexed() instead of the position array.


The documentation for this class was generated from the following file: