|
Simpatico
v1.10
|
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... | |
| DdMd::PairList::PairList | ( | ) |
Default constructor.
Definition at line 23 of file ddMd/neighbor/PairList.cpp.
|
virtual |
Destructor.
Definition at line 41 of file ddMd/neighbor/PairList.cpp.
| void DdMd::PairList::allocate | ( | int | atomCapacity, |
| int | pairCapacity, | ||
| double | cutoff | ||
| ) |
Allocate memory and set cutoff.
| atomCapacity | maximum number of primary atoms |
| pairCapacity | maximum number of pairs |
| cutoff | pair 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 |
||
| ) |
Use a CellList to build a new PairList.
| cellList | a CellList object that was just built. |
| reverseUpdateFlag | is reverse communication enabled? |
Definition at line 73 of file ddMd/neighbor/PairList.cpp.
References Util::GArray< Data >::append(), DdMd::CellList::begin(), Util::GArray< Data >::clear(), DdMd::Cell::getNeighbors(), isAllocated(), DdMd::Mask::isMasked(), DdMd::Cell::nAtom(), DdMd::Cell::nextCellPtr(), Util::FSArray< Data, Capacity >::size(), Util::GArray< Data >::size(), Util::Vector::square(), Util::Vector::subtract(), DdMd::CellList::update(), and UTIL_THROW.
Referenced by DdMd::PairPotential::buildPairList().
| void DdMd::PairList::begin | ( | PairIterator & | iterator | ) | const |
Initialize a PairIterator.
| iterator | a PairList, initialized on output |
Definition at line 168 of file ddMd/neighbor/PairList.cpp.
Referenced by DdMd::PairPotentialImpl< Interaction >::computeEnergy(), DdMd::PairPotentialImpl< Interaction >::computeForcesAndStress(), DdMd::PairPotentialImpl< Interaction >::computePairEnergies(), DdMd::PairPotentialImpl< Interaction >::computeStress(), DdMd::PairPotential::nPair(), and DdMd::PairIterator::PairIterator().
|
inline |
Get the number of primary atoms in the PairList.
Definition at line 255 of file ddMd/neighbor/PairList.h.
|
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().
|
inline |
Get the maximum number of pairs.
Definition at line 267 of file ddMd/neighbor/PairList.h.
Referenced by allocate().
|
inline |
Get the maximum number of primary atoms.
Definition at line 273 of file ddMd/neighbor/PairList.h.
Referenced by allocate().
|
inline |
Has memory been allocated for this PairList?
Definition at line 297 of file ddMd/neighbor/PairList.h.
Referenced by build().
|
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.
| out | output stream |
Definition at line 222 of file ddMd/neighbor/PairList.cpp.
References Util::Setable< T >::value().
|
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.
|
inline |
Get the maximum number of pairs encountered thus far.
Call only on master.
Definition at line 285 of file ddMd/neighbor/PairList.h.
|
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().
1.8.11