AtomsetIterator
, MoleculesetIterator
, java.io.Serializable
public class MpiInnerVariable extends java.lang.Object implements MoleculesetIterator, java.io.Serializable
Iterator can be condition to put the atoms in either order in the AtomPair that it returns. Thus the inner-loop Atom may be atom0 of the returned AtomPair, or it may be atom1. This behavior is set at construction, and cannot be changed afterwards. Default behavior has outer loop atoms as atom0, and inner loop atoms as atom1.
Modifier and Type | Field | Description |
---|---|---|
protected MoleculeIteratorMoleculeDependent |
aiInner |
The iterators used to generate the sets of atoms.
|
protected MoleculeIterator |
aiOuter |
|
protected boolean |
doSwap |
|
protected MoleculePair |
pair |
Constructor | Description |
---|---|
MpiInnerVariable(MoleculeIterator aiOuter,
MoleculeIteratorMoleculeDependent aiInner,
boolean doSwap) |
Construct a pair iterator using the given atom iterators, indicating
whether the atoms ordering in the AtomPair should be swapped from the
default behavior.
|
Modifier and Type | Method | Description |
---|---|---|
MoleculeIterator |
getInnerIterator() |
Accessor method for the inner-loop atom iterator.
|
MoleculeIterator |
getOuterIterator() |
Accessor method for the outer-loop atom iterator.
|
int |
nBody() |
Returns the number of atoms given in each iterate, i.e., the
size of the atom array returned with each call to next().
|
IMoleculeList |
next() |
Returns the next pair of atoms.
|
void |
reset() |
Resets the iterator, so that it is ready to go through all of its pairs.
|
int |
size() |
Returns the number of pairs given by this iterator.
|
void |
unset() |
Sets the iterator such that hasNext is false.
|
protected final MoleculePair pair
protected final MoleculeIteratorMoleculeDependent aiInner
protected final MoleculeIterator aiOuter
protected final boolean doSwap
public MpiInnerVariable(MoleculeIterator aiOuter, MoleculeIteratorMoleculeDependent aiInner, boolean doSwap)
aiOuter
- outer-loop iteratoraiInner
- inner-loop iteratordoSwap
- if false (default), outer-loop atoms are given in atom0, and
inner loop in atom1; if true outer-loop atoms are given in
atom1, and inner loop in atom0public MoleculeIterator getOuterIterator()
public MoleculeIterator getInnerIterator()
public void unset()
unset
in interface AtomsetIterator
public int size()
size
in interface AtomsetIterator
public void reset()
reset
in interface AtomsetIterator
public IMoleculeList next()
next
in interface MoleculesetIterator
public final int nBody()
AtomsetIterator
nBody
in interface AtomsetIterator