Class SBMStructuralModelGrid#
ClassList > SBMStructuralModelGrid
This class describes a grid-based neighbor search algorithm that can be applied to atoms (atoms or pseudo-atoms). More...
#include <SBMStructuralModelGrid.hpp>
Inherits the following classes: SBCReferenceTarget
Public Functions#
Type | Name |
---|---|
SBMStructuralModelGrid (const SBNodeIndexer & nodeIndexer, const SBQuantity::length & cutoffDistance) Constructs a neighbor search grid. |
|
SB_DECLARE_DATA (SBMStructuralModelGrid) |
|
virtual bool | areNeighbors (unsigned int i, unsigned int j) const Returns whether atoms with indices i andj are neighbors. |
virtual bool | areNeighbors (SBAtom * atomI, SBAtom * atomJ) const Returns whether atoms atomI andatomJ are neighbors. |
SBVector< SBAtom * > const * | getNeighborVector (unsigned int i) const Returns the neighbor vector of atom i . |
SBVector< SBAtom * > const * | getNeighborVector (SBAtom * atom) const Returns the neighbor vector of atom atom . |
virtual void | getNeighbors (SBVector< SBAtom * > & neighborVector, const SBPosition3 & position, const SBQuantity::length & radius) const Appends to neighborVector all atoms that are at a distance smaller than or equal toradius from the specifiedposition . |
virtual void | getNeighbors (SBVector< SBAtom * > & neighborVector, const SBIAPosition3 & box) const Appends to neighborVector all atoms inside thebox . |
virtual void | print (unsigned int offset=0) const Prints debugging information. |
virtual void | update () Updates the grid and neighbor lists. |
virtual | ~SBMStructuralModelGrid () Destroys the neighbor search grid. |
Public Functions inherited from SBCReferenceTarget#
Type | Name |
---|---|
SBCReferenceTarget () |
|
unsigned int | getMemoryFootprint () const |
void | printReferencesToOwners () const |
virtual | ~SBCReferenceTarget () |
Protected Attributes inherited from SBCReferenceTarget#
Type | Name |
---|---|
SBCReferenceTargetData * | dataPointer |
Protected Functions inherited from SBCReferenceTarget#
Type | Name |
---|---|
SBCReferenceTarget (SBCReferenceTargetData * dataPointer) |
|
void | removeAllReferenceOwners () |
Detailed Description#
This class may be used by developers to perform neighbor search between atoms . Internally, the neighbor search algorithm uses a grid to efficiently determine neighbors.
Short name: SBStructuralModelGrid
Public Functions Documentation#
function SBMStructuralModelGrid#
Constructs a neighbor search grid.
SBMStructuralModelGrid::SBMStructuralModelGrid (
const SBNodeIndexer & nodeIndexer,
const SBQuantity::length & cutoffDistance
)
This constructor initializes the neighbor search algorithm. After the grid is constructed, neighbor lists are available and can be retrieved using the getNeighborVector functions.
function SB_DECLARE_DATA#
function areNeighbors [1/2]#
Returns whether atoms with indices i
andj
are neighbors.
function areNeighbors [2/2]#
Returns whether atoms atomI
andatomJ
are neighbors.
function getNeighborVector [1/2]#
Returns the neighbor vector of atom i
.
function getNeighborVector [2/2]#
Returns the neighbor vector of atom atom
.
function getNeighbors [1/2]#
Appends to neighborVector
all atoms that are at a distance smaller than or equal toradius
from the specifiedposition
.
virtual void SBMStructuralModelGrid::getNeighbors (
SBVector< SBAtom * > & neighborVector,
const SBPosition3 & position,
const SBQuantity::length & radius
) const
function getNeighbors [2/2]#
Appends to neighborVector
all atoms inside thebox
.
virtual void SBMStructuralModelGrid::getNeighbors (
SBVector< SBAtom * > & neighborVector,
const SBIAPosition3 & box
) const
function print#
Prints debugging information.
function update#
Updates the grid and neighbor lists.
function ~SBMStructuralModelGrid#
Destroys the neighbor search grid.