Simpatico  v1.10
List of all members | Public Member Functions
DdMd::PairList Class Reference

Detailed Description

A Verlet nonbonded pair list.

A PairList (or Verlet list) is a list of neighboring pairs of Atoms that are separated by a distance less than a specified cutoff.

The allocate() method must be called once before use.

To build or rebuild a PairList, after it has been allocated, one must first build the associated CellList, and then call PairList::build() to build the actual PairList.

A PairIterator object must be used to iterate over all of the pairs in in completed PairList (see documentation of PairIterator for usage).

Definition at line 41 of file ddMd/neighbor/PairList.h.

#include <PairList.h>

Public Member Functions

 PairList ()
 Default constructor. More...
 
virtual ~PairList ()
 Destructor. More...
 
Mutators
void allocate (int atomCapacity, int pairCapacity, double cutoff)
 Allocate memory and set cutoff. More...
 
void clear ()
 Reset this to empty state. More...
 
void build (CellList &cellList, bool reverseUpdateFlag=false)
 Use a CellList to build a new PairList. More...
 
Accessors (miscellaneous)
void begin (PairIterator &iterator) const
 Initialize a PairIterator. More...
 
int nAtom () const
 Get the number of primary atoms in the PairList. More...
 
int nPair () const
 Get the number of pairs in the PairList. More...
 
int pairCapacity () const
 Get the maximum number of pairs. More...
 
int atomCapacity () const
 Get the maximum number of primary atoms. More...
 
bool isAllocated () const
 Has memory been allocated for this PairList? More...
 
Statistics
virtual void computeStatistics (MPI::Intracomm &communicator)
 Compute statistics (reduce from all processors). More...
 
void clearStatistics ()
 Clear statistical accumulators (call on all processors). More...
 
void outputStatistics (std::ostream &out)
 Output statistics. More...
 
int maxNAtom () const
 Get the maximum number of primary atoms encountered thus far. More...
 
int maxNPair () const
 Get the maximum number of pairs encountered thus far. More...
 
int buildCounter () const
 Return number of times the PairList has been built thus far. More...
 

Constructor & Destructor Documentation

DdMd::PairList::PairList ( )

Default constructor.

Definition at line 23 of file ddMd/neighbor/PairList.cpp.

DdMd::PairList::~PairList ( )
virtual

Destructor.

Definition at line 41 of file ddMd/neighbor/PairList.cpp.

Member Function Documentation

void DdMd::PairList::allocate ( int  atomCapacity,
int  pairCapacity,
double  cutoff 
)

Allocate memory and set cutoff.

Parameters
atomCapacitymaximum number of primary atoms
pairCapacitymaximum number of pairs
cutoffpair list cutoff = potential cutoff + skin

Definition at line 47 of file ddMd/neighbor/PairList.cpp.

References atomCapacity(), pairCapacity(), and Util::GArray< Data >::reserve().

Referenced by DdMd::PairPotential::save().

void DdMd::PairList::clear ( )

Reset this to empty state.

Definition at line 63 of file ddMd/neighbor/PairList.cpp.

References Util::GArray< Data >::clear().

void DdMd::PairList::build ( CellList cellList,
bool  reverseUpdateFlag = false 
)
void DdMd::PairList::begin ( PairIterator iterator) const
int DdMd::PairList::nAtom ( ) const
inline

Get the number of primary atoms in the PairList.

Definition at line 255 of file ddMd/neighbor/PairList.h.

int DdMd::PairList::nPair ( ) const
inline

Get the number of pairs in the PairList.

Definition at line 261 of file ddMd/neighbor/PairList.h.

Referenced by DdMd::PairPotentialImpl< Interaction >::computeEnergy().

int DdMd::PairList::pairCapacity ( ) const
inline

Get the maximum number of pairs.

Definition at line 267 of file ddMd/neighbor/PairList.h.

Referenced by allocate().

int DdMd::PairList::atomCapacity ( ) const
inline

Get the maximum number of primary atoms.

Definition at line 273 of file ddMd/neighbor/PairList.h.

Referenced by allocate().

bool DdMd::PairList::isAllocated ( ) const
inline

Has memory been allocated for this PairList?

Definition at line 297 of file ddMd/neighbor/PairList.h.

Referenced by build().

void DdMd::PairList::computeStatistics ( MPI::Intracomm &  communicator)
virtual

Compute statistics (reduce from all processors).

Call on all processors.

Definition at line 185 of file ddMd/neighbor/PairList.cpp.

References Util::Setable< T >::set().

void DdMd::PairList::clearStatistics ( )

Clear statistical accumulators (call on all processors).

Definition at line 210 of file ddMd/neighbor/PairList.cpp.

References Util::Setable< T >::unset().

Referenced by DdMd::Integrator::clear().

void DdMd::PairList::outputStatistics ( std::ostream &  out)

Output statistics.

Call on master, after calling computeStatistics on all procs.

Parameters
outoutput stream

Definition at line 222 of file ddMd/neighbor/PairList.cpp.

References Util::Setable< T >::value().

int DdMd::PairList::maxNAtom ( ) const
inline

Get the maximum number of primary atoms encountered thus far.

Call only on master.

Definition at line 279 of file ddMd/neighbor/PairList.h.

int DdMd::PairList::maxNPair ( ) const
inline

Get the maximum number of pairs encountered thus far.

Call only on master.

Definition at line 285 of file ddMd/neighbor/PairList.h.

int DdMd::PairList::buildCounter ( ) const
inline

Return number of times the PairList has been built thus far.

Definition at line 291 of file ddMd/neighbor/PairList.h.

Referenced by DdMd::Integrator::outputStatistics().


The documentation for this class was generated from the following files: