This class describes a grid-based neighbor search algorithm that can be applied to structural particles (atoms or pseudo-atoms). More...
Public Member Functions | |
SB_DECLARE_DATA (SBMStructuralModelGrid) | |
![]() | |
SBCReferenceTarget () | |
virtual | ~SBCReferenceTarget () |
unsigned int | getMemoryFootprint () const |
void | printReferencesToOwners () const |
Destructor | |
SBMStructuralModelGrid (const SBNodeIndexer &nodeIndexer, const SBQuantity::length &cutoffDistance) | |
Constructs a neighbor search grid. More... | |
virtual | ~SBMStructuralModelGrid () |
Destroys the neighbor search grid. | |
Neighbor vectors | |
virtual void | update () |
Updates the grid and neighbor lists. | |
SBVector< SBStructuralParticle * > const * | getNeighborVector (unsigned int i) const |
Returns the neighbor vector of structural particle i . | |
SBVector< SBStructuralParticle * > const * | getNeighborVector (SBStructuralParticle *structuralParticle) const |
Returns the neighbor vector of structural particle structuralParticle . | |
Neighbor search | |
virtual bool | areNeighbors (unsigned int i, unsigned int j) const |
Returns whether particles with indices i and j are neighbors. | |
virtual bool | areNeighbors (SBStructuralParticle *structuralParticleI, SBStructuralParticle *structuralParticleJ) const |
Returns whether structural particles structuralParticleI and structuralParticleJ are neighbors. | |
virtual void | getNeighbors (SBVector< SBStructuralParticle *> &neighborVector, const SBPosition3 &position, const SBQuantity::length &radius) const |
Appends to neighborVector all structural particles that are at a distance smaller than or equal to radius from the specified position . | |
virtual void | getNeighbors (SBVector< SBStructuralParticle *> &neighborVector, const SBIAPosition3 &box) const |
Appends to neighborVector all structural particles inside the box . | |
Debugging | |
virtual void | print (unsigned int offset=0) const |
Prints debugging information. | |
Additional Inherited Members | |
![]() | |
void | removeAllReferenceOwners () |
SBCReferenceTarget (SBCReferenceTargetData *dataPointer) | |
![]() | |
SBCReferenceTargetData * | dataPointer |
This class may be used by developers to perform neighbor search between structural particles (i.e. atoms or pseudo-atoms). Internally, the neighbor search algorithm uses a grid to efficiently determine neighbors.
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.