Simpatico
v1.10
|
Iterator for pairs in a PairList.
A loop over atom pairs, such as that required to calculated forces or energies, can take the following form:
Definition at line 48 of file ddMd/neighbor/PairIterator.h.
#include <PairIterator.h>
Public Member Functions | |
PairIterator () | |
Default constructor. More... | |
PairIterator (const PairList &pairList) | |
Initializing constructor. More... | |
PairIterator & | operator++ () |
Increment to next pair. More... | |
bool | isEnd () const |
Return true if at end of PairList. More... | |
bool | notEnd () const |
Return true if not at end of PairList. More... | |
void | getPair (Atom *&atom1Ptr, Atom *&atom2Ptr) const |
Get pointers for current pair of Atoms. More... | |
|
inline |
Default constructor.
Creates an uninitialized iterator, which is not associated with a parent PairList.
Definition at line 133 of file ddMd/neighbor/PairIterator.h.
|
inline |
Initializing constructor.
Creates an initialized iterator, for which the current pair is the first pair in a parent PairList.
pairList | parent PairList object. |
Definition at line 146 of file ddMd/neighbor/PairIterator.h.
References DdMd::PairList::begin().
|
inline |
Increment to next pair.
Definition at line 172 of file ddMd/neighbor/PairIterator.h.
|
inline |
Return true if at end of PairList.
When isEnd() is true, the current pair is already one past past the end of the pairlist, and is thus invalid.
Definition at line 188 of file ddMd/neighbor/PairIterator.h.
|
inline |
Return true if not at end of PairList.
If notEnd(), continue iteration loop. Equivalent to not isEnd().
Definition at line 194 of file ddMd/neighbor/PairIterator.h.
Referenced by DdMd::PairPotentialImpl< Interaction >::computeEnergy(), DdMd::PairPotentialImpl< Interaction >::computeForcesAndStress(), DdMd::PairPotentialImpl< Interaction >::computePairEnergies(), DdMd::PairPotentialImpl< Interaction >::computeStress(), and DdMd::PairPotential::nPair().
Get pointers for current pair of Atoms.
atom1Ptr | pointer to current atom 1. |
atom2Ptr | pointer to current atom 2. |
Definition at line 159 of file ddMd/neighbor/PairIterator.h.
Referenced by DdMd::PairPotentialImpl< Interaction >::computeEnergy(), DdMd::PairPotentialImpl< Interaction >::computeForcesAndStress(), DdMd::PairPotentialImpl< Interaction >::computePairEnergies(), DdMd::PairPotentialImpl< Interaction >::computeStress(), and DdMd::PairPotential::nPair().