AtomsetIterator
, AtomsetIteratorDirectable
, MoleculesetIterator
, MoleculesetIteratorBoxDependent
, MoleculesetIteratorPDT
, MoleculesetIteratorTargetable
, java.io.Serializable
public class MpiMolecule extends java.lang.Object implements MoleculesetIteratorPDT, java.io.Serializable
This class may be set up to do inter- or intra-species iteration, depending on choice of inner iterators given at construction. Wrapped iterators are final and cannot be changed after construction.
Constructor | Description |
---|---|
MpiMolecule(MoleculesetIteratorPDT api1A,
MoleculesetIteratorBoxDependent apiAA) |
Constructs iterator by wrapping three others.
|
Modifier and Type | Method | Description |
---|---|---|
MoleculesetIteratorPDT |
getApi1A() |
Returns the 1A iterator set at construction.
|
MoleculesetIteratorBoxDependent |
getApiAA() |
Returns the AA iterator set at construction.
|
int |
nBody() |
Returns 2, indicating that this is a pair iterator.
|
IMoleculeList |
next() |
Same as nextPair.
|
void |
reset() |
Readies iterator for iteration.
|
void |
setBox(Box box) |
Specifies the box from which iterates are taken.
|
void |
setDirection(IteratorDirective.Direction direction) |
Specifies the direction from which partners of a target atoms
are taken to form iterates.
|
void |
setTarget(IMolecule targetAtom) |
Sets target atoms and determines the pair iterator according to the value
of targetAtom.
|
int |
size() |
Returns the number of iterates that would be given
when iterating after reset.
|
void |
unset() |
Sets iterator to state in which hasNext is false.
|
public MpiMolecule(MoleculesetIteratorPDT api1A, MoleculesetIteratorBoxDependent apiAA)
api1A
- iterator for all pairs formed with a target moleculeapiAA
- iterator for all pairs in the boxpublic void setTarget(IMolecule targetAtom)
setTarget
in interface MoleculesetIteratorTargetable
public void setBox(Box box)
setBox
in interface MoleculesetIteratorBoxDependent
public void setDirection(IteratorDirective.Direction direction)
setDirection
in interface AtomsetIteratorDirectable
public void reset()
reset
in interface AtomsetIterator
public void unset()
unset
in interface AtomsetIterator
public IMoleculeList next()
next
in interface MoleculesetIterator
public int size()
size
in interface AtomsetIterator
public final int nBody()
nBody
in interface AtomsetIterator
public MoleculesetIteratorPDT getApi1A()
public MoleculesetIteratorBoxDependent getApiAA()