Loading...
Searching...
No Matches
SBSNeighborSearchParticleSystemGridPBC Class Reference

This class describes a grid-based neighbor search algorithm that can be applied to particle systems with periodic boundary conditions.

Debugging

SBQuantity::lengthcutoffDistance
 
SBPointerIndexer< SBAtom > const * atomIndexer
 
SBHashMap< GridKey, GridCell *, GridKeyFunctor, GridKeyComparator > * grid
 
SBVector< GridKey > * gridKeyVector
 
virtual void print (unsigned int offset=0) const override
 Prints debugging information.
 
void updateLists ()
 
void checkCell (GridCell *gridCellJ, int i, std::set< unsigned int > &neighbors)
 
bool isInTheBox (SBPosition3 const &position)
 
void checkCellsAroundSmallBox (GridKey &gridKeyI, int i)
 
void checkCellsAroundBigBox (GridKey &gridKeyI, int i)
 
void getCellCoordinates (SBPosition3 const &position, SBVector3 &coordinates)
 
bool cellCrossesTheBox (GridKey &gridKey)
 
void getMirrorCellKey (GridKey &gridKey, GridKey &gridKeyMirror)
 
void checkCellsAroundCellByCell ()
 
void checkCellsCross (GridCell *gridCellI, GridCell *gridCellJ)
 

Destructor

 SBSNeighborSearchParticleSystemGridPBC (SBParticleSystem *, const SBQuantity::length &cutoffDistance)
 
virtual ~SBSNeighborSearchParticleSystemGridPBC ()
 

Neighbor lists

virtual void initializeNeighborLists () override
 
virtual void updateNeighborLists () override
 Important: this function does not appear to work at the moment. Please rebuild a grid at each step.
 

Neighbor search

virtual void getNeighbors (SBVector< SBAtom * > &neighborVector, const SBPosition3 &position, const SBQuantity::length &radius) const override
 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 override
 Appends to neighborVector all atoms inside the box.
 

Event handling <br>

void onDynamicalEvent (SBDynamicalEvent *dynamicalEvent)
 

Additional Inherited Members

- Public Member Functions inherited from SBSNeighborSearchParticleSystemPBC
virtual ~SBSNeighborSearchParticleSystemPBC ()
 
SBVector< SBAtom * > * getNeighborVector (unsigned int i)
 
void onDynamicalEvent (SBDynamicalEvent *dynamicalEvent)
 
- Public Member Functions inherited from SBCReferenceTarget
unsigned int getMemoryFootprint () const
 
void printReferencesToOwners () const
 
 SBCReferenceTarget ()
 
virtual ~SBCReferenceTarget ()
 
- Protected Member Functions inherited from SBSNeighborSearchParticleSystemPBC
 SBSNeighborSearchParticleSystemPBC (SBParticleSystem *, const SBQuantity::length &cutoffDistance)
 
- Protected Member Functions inherited from SBCReferenceTarget
void removeAllReferenceOwners ()
 
 SBCReferenceTarget (SBCReferenceTargetData *dataPointer)
 
- Protected Attributes inherited from SBSNeighborSearchParticleSystemPBC
SBQuantity::squareLengthcutoffDistanceSquared
 
SBQuantity::inverseLengthinverseCutoffDistance
 
SBPointer< SBParticleSystem > * particleSystem
 The particle system the neighbor search algorithm is attached to.
 
SBBuffer< SBVector< SBAtom * > * > * neighborVectorBuffer
 The buffer containing the neighbor lists associated to each atom.
 
SBIAPosition3boxPBC
 
SBQuantity::lengthboxSizeX
 
SBQuantity::lengthboxSizeY
 
SBQuantity::lengthboxSizeZ
 
- Protected Attributes inherited from SBCReferenceTarget
SBCReferenceTargetData * dataPointer
 

Member Function Documentation

◆ getNeighbors() [1/2]

void SBSNeighborSearchParticleSystemGridPBC::getNeighbors ( SBVector< SBAtom * > &  neighborVector,
const SBIAPosition3 box 
) const
overridevirtual

◆ getNeighbors() [2/2]

void SBSNeighborSearchParticleSystemGridPBC::getNeighbors ( SBVector< SBAtom * > &  neighborVector,
const SBPosition3 position,
const SBQuantity::length radius 
) const
overridevirtual

◆ initializeNeighborLists()

void SBSNeighborSearchParticleSystemGridPBC::initializeNeighborLists ( )
overridevirtual

◆ print()

void SBSNeighborSearchParticleSystemGridPBC::print ( unsigned int  offset = 0) const
overridevirtual

◆ updateNeighborLists()

void SBSNeighborSearchParticleSystemGridPBC::updateNeighborLists ( )
overridevirtual