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 mcMd/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 135 of file mcMd/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 148 of file mcMd/neighbor/PairIterator.h.
References McMd::PairList::begin().
|
inline |
Increment to next pair.
Definition at line 174 of file mcMd/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 190 of file mcMd/neighbor/PairIterator.h.
|
inline |
Return true if not at end of PairList.
When notEnd() is false, the current pair is already one past past the end of the pairlist, and is thus invalid.
Definition at line 196 of file mcMd/neighbor/PairIterator.h.
Referenced by McMd::MdEwaldPairPotentialImpl< Interaction >::addForces(), McMd::MdPairPotentialImpl< Interaction >::addForces(), McMd::MdEwaldPairPotentialImpl< Interaction >::computeEnergy(), McMd::MdPairPotentialImpl< Interaction >::computeEnergy(), McMd::MdEwaldPairPotentialImpl< Interaction >::computeStress(), McMd::MdPairEnergyCoefficients::sample(), and McMd::NvtDpdVvIntegrator::setup().
Get pointers for current pair of Atoms.
atom1Ptr | pointer to current atom 1. |
atom2Ptr | pointer to current atom 2. |
Definition at line 161 of file mcMd/neighbor/PairIterator.h.
Referenced by McMd::MdEwaldPairPotentialImpl< Interaction >::addForces(), McMd::MdPairPotentialImpl< Interaction >::addForces(), McMd::MdEwaldPairPotentialImpl< Interaction >::computeEnergy(), McMd::MdPairPotentialImpl< Interaction >::computeEnergy(), McMd::MdEwaldPairPotentialImpl< Interaction >::computeStress(), McMd::MdPairEnergyCoefficients::sample(), and McMd::NvtDpdVvIntegrator::setup().