Web Analytics Made Easy - Statcounter
Skip to content

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.
SBCContainerVector< SBAtom * > const * getNeighborVector (unsigned int i) const
Returns the neighbor vector of atom i .
SBCContainerVector< SBAtom * > const * getNeighborVector (SBAtom * atom) const
Returns the neighbor vector of atom atom .
virtual void getNeighbors (SBCContainerVector< 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 (SBCContainerVector< 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#

See SBCReferenceTarget

Type Name
SBCReferenceTarget ()
Builds the reference target.
unsigned int getMemoryFootprint () const
Returns the memory footprint.
void printReferencesToOwners () const
Prints the references to the owners of this reference target.
virtual ~SBCReferenceTarget ()
Destructor.

Protected Attributes inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTargetData * dataPointer
A pointer to the private data.

Protected Functions inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTarget (SBCReferenceTargetData * dataPointer)
Protected constructor.
void removeAllReferenceOwners ()
Stops all the reference owners from referencing this reference target.

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#

SBMStructuralModelGrid::SB_DECLARE_DATA (
    SBMStructuralModelGrid
) 

function areNeighbors [1/2]#

Returns whether atoms with indices i andj are neighbors.

virtual bool SBMStructuralModelGrid::areNeighbors (
    unsigned int i,
    unsigned int j
) const


function areNeighbors [2/2]#

Returns whether atoms atomI andatomJ are neighbors.

virtual bool SBMStructuralModelGrid::areNeighbors (
    SBAtom * atomI,
    SBAtom * atomJ
) const


function getNeighborVector [1/2]#

Returns the neighbor vector of atom i .

SBCContainerVector < SBAtom * > const * SBMStructuralModelGrid::getNeighborVector (
    unsigned int i
) const


function getNeighborVector [2/2]#

Returns the neighbor vector of atom atom .

SBCContainerVector < SBAtom * > const * SBMStructuralModelGrid::getNeighborVector (
    SBAtom * atom
) const


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 (
    SBCContainerVector < 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 (
    SBCContainerVector < SBAtom * > & neighborVector,
    const SBIAPosition3 & box
) const


function print#

Prints debugging information.

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


function update#

Updates the grid and neighbor lists.

virtual void SBMStructuralModelGrid::update () 


function ~SBMStructuralModelGrid#

Destroys the neighbor search grid.

virtual SBMStructuralModelGrid::~SBMStructuralModelGrid ()