Loading...
Searching...
No Matches
SBMStructuralModelGrid Class Reference

This class describes a grid-based neighbor search algorithm that can be applied to atoms (atoms or pseudo-atoms). More...

Destructor

 SBMStructuralModelGrid (const SBNodeIndexer &nodeIndexer, const SBQuantity::length &cutoffDistance)
 Constructs a neighbor search grid

 
virtual ~SBMStructuralModelGrid ()
 Destroys the neighbor search grid.
 

Neighbor vectors

virtual void update ()
 Updates the grid and neighbor lists.
 
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.
 

Neighbor search

virtual bool areNeighbors (unsigned int i, unsigned int j) const
 Returns whether atoms with indices i and j are neighbors.
 
virtual bool areNeighbors (SBAtom *atomI, SBAtom *atomJ) const
 Returns whether atoms atomI and atomJ are neighbors.
 
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 to radius from the specified position.
 
virtual void getNeighbors (SBVector< SBAtom * > &neighborVector, const SBIAPosition3 &box) const
 Appends to neighborVector all atoms inside the box.
 

Debugging

virtual void print (unsigned int offset=0) const
 Prints debugging information.
 
 SB_DECLARE_DATA (SBMStructuralModelGrid)
 

Additional Inherited Members

- Public Member Functions inherited from SBCReferenceTarget
unsigned int getMemoryFootprint () const
 
void printReferencesToOwners () const
 
 SBCReferenceTarget ()
 
virtual ~SBCReferenceTarget ()
 
- Protected Member Functions inherited from SBCReferenceTarget
void removeAllReferenceOwners ()
 
 SBCReferenceTarget (SBCReferenceTargetData *dataPointer)
 
- Protected Attributes inherited from SBCReferenceTarget
SBCReferenceTargetData * dataPointer
 

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.

Constructor & Destructor Documentation

◆ SBMStructuralModelGrid()

SBMStructuralModelGrid::SBMStructuralModelGrid ( const SBNodeIndexer nodeIndexer,
const SBQuantity::length c 
)

This constructor initializes the neighbor search algorithm. After the grid is constructed, neighbor lists are available and can be retrieved using the getNeighborVector functions.