Web Analytics Made Easy - Statcounter
Skip to content

Class SBSNeighborSearchParticleSystemGridPBC#

ClassList > SBSNeighborSearchParticleSystemGridPBC

More...

  • #include <SBSNeighborSearchParticleSystemGridPBC.hpp>

Inherits the following classes: SBSNeighborSearchParticleSystemPBC

Public Functions#

Type Name
SBSNeighborSearchParticleSystemGridPBC (SBParticleSystem * p, const SBQuantity::length & cutoffDistance)
virtual void getNeighbors (SBVector< SBAtom * > & neighborVector, const SBPosition3 & position, const SBQuantity::length & radius) override 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) override const
Appends to neighborVector all atoms inside thebox .
virtual void initializeNeighborLists () override
void onDynamicalEvent (SBDynamicalEvent * dynamicalEvent)
virtual void print (unsigned int offset=0) override const
Prints debugging information.
virtual void updateNeighborLists () override
Important: this function does not appear to work at the moment. Please rebuild a grid at each step.
virtual ~SBSNeighborSearchParticleSystemGridPBC ()

Public Functions inherited from SBSNeighborSearchParticleSystemPBC#

See SBSNeighborSearchParticleSystemPBC

Type Name
SBVector< SBAtom * > * getNeighborVector (unsigned int i)
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 initializeNeighborLists ()
void onDynamicalEvent (SBDynamicalEvent * dynamicalEvent)
virtual void print (unsigned int offset=0) override const
Prints debugging information.
virtual void updateNeighborLists ()
virtual ~SBSNeighborSearchParticleSystemPBC ()

Public Functions inherited from SBSNeighborSearch#

See SBSNeighborSearch

Type Name
virtual void print (unsigned int offset=0) const
Prints debugging information.
virtual ~SBSNeighborSearch ()

Public Functions inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTarget ()
unsigned int getMemoryFootprint () const
void printReferencesToOwners () const
virtual ~SBCReferenceTarget ()

Protected Attributes#

Type Name
SBPointerIndexer< SBAtom > const * atomIndexer
SBQuantity::length * cutoffDistance
SBHashMap< GridKey, GridCell *, GridKeyFunctor, GridKeyComparator > * grid
SBVector< GridKey > * gridKeyVector

Protected Attributes inherited from SBSNeighborSearchParticleSystemPBC#

See SBSNeighborSearchParticleSystemPBC

Type Name
SBIAPosition3 * boxPBC
SBQuantity::length * boxSizeX
SBQuantity::length * boxSizeY
SBQuantity::length * boxSizeZ
SBQuantity::squareLength * cutoffDistanceSquared
SBQuantity::inverseLength * inverseCutoffDistance
SBBuffer< SBVector< SBAtom * > * > * neighborVectorBuffer
The buffer containing the neighbor lists associated to each atom.
SBPointer< SBParticleSystem > * particleSystem
The particle system the neighbor search algorithm is attached to.

Protected Attributes inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTargetData * dataPointer

Protected Functions#

Type Name
bool cellCrossesTheBox (GridKey & gridKey)
void checkCell (GridCell * gridCellJ, int i, std::set< unsigned int > & neighbors)
void checkCellsAroundBigBox (GridKey & gridKeyI, int i)
void checkCellsAroundCellByCell ()
void checkCellsAroundSmallBox (GridKey & gridKeyI, int i)
void checkCellsCross (GridCell * gridCellI, GridCell * gridCellJ)
void getCellCoordinates (SBPosition3 const & position, SBVector3 & coordinates)
void getMirrorCellKey (GridKey & gridKey, GridKey & gridKeyMirror)
bool isInTheBox (SBPosition3 const & position)
void updateLists ()

Protected Functions inherited from SBSNeighborSearchParticleSystemPBC#

See SBSNeighborSearchParticleSystemPBC

Type Name
SBSNeighborSearchParticleSystemPBC (SBParticleSystem * p, const SBQuantity::length & cutoffDistance)

Protected Functions inherited from SBSNeighborSearch#

See SBSNeighborSearch

Type Name
SBSNeighborSearch ()

Protected Functions inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTarget (SBCReferenceTargetData * dataPointer)
void removeAllReferenceOwners ()

Detailed Description#

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

Short name: SBNeighborSearchParticleSystemGridPBC

Public Functions Documentation#

function SBSNeighborSearchParticleSystemGridPBC#

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

function getNeighbors [1/2]#

Appends to neighborVector all atoms that are at a distance smaller than or equal toradius from the specifiedposition .

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

Implements SBSNeighborSearchParticleSystemPBC::getNeighbors


function getNeighbors [2/2]#

Appends to neighborVector all atoms inside thebox .

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

Implements SBSNeighborSearchParticleSystemPBC::getNeighbors


function initializeNeighborLists#

virtual void SBSNeighborSearchParticleSystemGridPBC::initializeNeighborLists () override

Implements SBSNeighborSearchParticleSystemPBC::initializeNeighborLists


function onDynamicalEvent#

void SBSNeighborSearchParticleSystemGridPBC::onDynamicalEvent (
    SBDynamicalEvent * dynamicalEvent
) 

function print#

Prints debugging information.

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

Implements SBSNeighborSearchParticleSystemPBC::print


function updateNeighborLists#

Important: this function does not appear to work at the moment. Please rebuild a grid at each step.

virtual void SBSNeighborSearchParticleSystemGridPBC::updateNeighborLists () override

Implements SBSNeighborSearchParticleSystemPBC::updateNeighborLists


function ~SBSNeighborSearchParticleSystemGridPBC#

virtual SBSNeighborSearchParticleSystemGridPBC::~SBSNeighborSearchParticleSystemGridPBC () 

Protected Attributes Documentation#

variable atomIndexer#

SBPointerIndexer<SBAtom> const* atomIndexer;

variable cutoffDistance#

SBQuantity::length* cutoffDistance;

variable grid#

SBHashMap<GridKey, GridCell*, GridKeyFunctor, GridKeyComparator>* grid;

variable gridKeyVector#

SBVector<GridKey>* gridKeyVector;

Protected Functions Documentation#

function cellCrossesTheBox#

bool SBSNeighborSearchParticleSystemGridPBC::cellCrossesTheBox (
    GridKey & gridKey
) 

function checkCell#

void SBSNeighborSearchParticleSystemGridPBC::checkCell (
    GridCell * gridCellJ,
    int i,
    std::set< unsigned int > & neighbors
) 

function checkCellsAroundBigBox#

void SBSNeighborSearchParticleSystemGridPBC::checkCellsAroundBigBox (
    GridKey & gridKeyI,
    int i
) 

function checkCellsAroundCellByCell#

void SBSNeighborSearchParticleSystemGridPBC::checkCellsAroundCellByCell () 

function checkCellsAroundSmallBox#

void SBSNeighborSearchParticleSystemGridPBC::checkCellsAroundSmallBox (
    GridKey & gridKeyI,
    int i
) 

function checkCellsCross#

void SBSNeighborSearchParticleSystemGridPBC::checkCellsCross (
    GridCell * gridCellI,
    GridCell * gridCellJ
) 

function getCellCoordinates#

void SBSNeighborSearchParticleSystemGridPBC::getCellCoordinates (
    SBPosition3 const & position,
    SBVector3 & coordinates
) 

function getMirrorCellKey#

void SBSNeighborSearchParticleSystemGridPBC::getMirrorCellKey (
    GridKey & gridKey,
    GridKey & gridKeyMirror
) 

function isInTheBox#

bool SBSNeighborSearchParticleSystemGridPBC::isInTheBox (
    SBPosition3 const & position
) 

function updateLists#

void SBSNeighborSearchParticleSystemGridPBC::updateLists ()