AtomsetIterator, AtomsetIteratorDirectable, MoleculesetIterator, MoleculesetIteratorBoxDependent, MoleculesetIteratorPDT, MoleculesetIteratorTargetable, java.io.Serializablepublic class MpiInterspecies1A extends java.lang.Object implements MoleculesetIteratorPDT, java.io.Serializable
Atoms in iterate pairs are ordered such that the first atom is of the first species given in the constructor, and the second atom is of the second species given in the constructor, regardless of the specification of the target.
Direction may be specified, and is interpreted as follows:
| Constructor | Description |
|---|---|
MpiInterspecies1A(ISpecies[] species) |
Sorts given array of species according to species index, then constructs iterator
such that atom0 of the pair iterates is in (sorted) species[0], and atom1 is in
(sorted) species[1], regardless of which is specified via setTarget.
|
| Modifier and Type | Method | Description |
|---|---|---|
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 AtomSet iterate, or null if hasNext() is false.
|
void |
reset() |
Resets the iterator to loop through its iterates again.
|
void |
setBox(Box newBox) |
Configures iterator to return molecules from the set species in the given
box.
|
void |
setDirection(IteratorDirective.Direction direction) |
Indicates allowed direction for iteration, relative to specified target
atom.
|
void |
setTarget(IMolecule newTargetAtom) |
Sets the target molecule with which all pairs are formed.
|
int |
size() |
The number of iterates returned by this iterator in its current state.
|
void |
unset() |
Puts iterator in a state in which hasNext() returns false.
|
public MpiInterspecies1A(ISpecies[] species)
species - array of two different, non-null speciesjava.lang.IllegalArgumentException - is species array is not of length 2 or if species in array
refer to the same instancejava.lang.NullPointerException - if species array is null or if either species in array is
nullpublic void setBox(Box newBox)
setBox in interface MoleculesetIteratorBoxDependentpublic void setDirection(IteratorDirective.Direction direction)
setDirection in interface AtomsetIteratorDirectablepublic void setTarget(IMolecule newTargetAtom)
setTarget in interface MoleculesetIteratorTargetablejava.lang.NullPointerException - if targetAtom is nullpublic int nBody()
AtomsetIteratornBody in interface AtomsetIteratorpublic IMoleculeList next()
MoleculesetIteratornext in interface MoleculesetIteratorpublic void reset()
AtomsetIteratorreset in interface AtomsetIteratorpublic int size()
AtomsetIteratorsize in interface AtomsetIteratorpublic void unset()
AtomsetIteratorunset in interface AtomsetIterator