AtomsetIterator
, AtomsetIteratorDirectable
, MoleculesetIterator
, MoleculesetIteratorBoxDependent
, MoleculesetIteratorPDT
, MoleculesetIteratorTargetable
, MoleculesetIteratorCellular
, java.io.Serializable
public class Mpi1ACell extends java.lang.Object implements MoleculesetIteratorPDT, MoleculesetIteratorCellular, java.io.Serializable
Modifier and Type | Field | Description |
---|---|---|
protected boolean[] |
periodicity |
Constructor | Description |
---|---|
Mpi1ACell(int D,
double range,
BoxAgentManager agentManager) |
Constructor makes iterator that must have box specified and then be
reset() before iteration.
|
Modifier and Type | Method | Description |
---|---|---|
CellLattice.NeighborIterator |
getNbrCellIterator() |
|
int |
nBody() |
Returns 2, indicating that this is a pair iterator.
|
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 box) |
Sets the Box to pull iterates from
|
void |
setDirection(IteratorDirective.Direction direction) |
Indicates allowed direction for iteration, relative to specified target
atom.
|
void |
setTarget(IMolecule newTargetMolecule) |
Sets the target molecule with which all pairs are formed.
|
int |
size() |
Returns the number of atom pairs the iterator will return if
reset and iterated in its present state.
|
void |
unset() |
Puts iterator in a state in which hasNext() returns false.
|
public Mpi1ACell(int D, double range, BoxAgentManager agentManager)
D
- the dimension of the space of the simulation (used to
construct cell iterators)range
- the distance within which pairs of atoms are considered
neighbors. Used to define neighbor cells; some iterates may
exceed this separationpublic void setBox(Box box)
MoleculesetIteratorBoxDependent
setBox
in interface MoleculesetIteratorBoxDependent
public int size()
size
in interface AtomsetIterator
public IMoleculeList next()
MoleculesetIterator
next
in interface MoleculesetIterator
public void unset()
AtomsetIterator
unset
in interface AtomsetIterator
public int nBody()
nBody
in interface AtomsetIterator
public void reset()
AtomsetIterator
reset
in interface AtomsetIterator
public void setDirection(IteratorDirective.Direction direction)
setDirection
in interface AtomsetIteratorDirectable
public void setTarget(IMolecule newTargetMolecule)
setTarget
in interface MoleculesetIteratorTargetable
public CellLattice.NeighborIterator getNbrCellIterator()
getNbrCellIterator
in interface MoleculesetIteratorCellular