AtomLeafsetIterator
, AtomsetIterator
, AtomsetIteratorBasisDependent
, AtomsetIteratorTargetable
ApiIntergroupCoupled
, ApiIntergroupExchange
, ApiIntergroupIntraSpecies
public class ApiIntergroup extends java.lang.Object implements AtomsetIteratorBasisDependent
Modifier and Type | Field | Description |
---|---|---|
protected AtomIteratorBasisDependent |
aiInner |
|
protected AtomIteratorBasisDependent |
aiOuter |
|
protected MoleculeSetSinglet |
atomSetSinglet |
|
protected boolean |
needSetupIterators |
|
protected AtomPair |
pair |
|
protected IAtom |
targetAtom |
Constructor | Description |
---|---|
ApiIntergroup() |
Default iterator is an ApiInnerFixed formed from two AtomIteratorBasis
instances.
|
ApiIntergroup(AtomIteratorBasisDependent outer,
AtomIteratorBasisDependent inner) |
Constructs a pair iterator that returns iterates from the given
pairIterator, which is expected to contain two basis-dependent
iterators.
|
Modifier and Type | Method | Description |
---|---|---|
int |
basisSize() |
Returns 2, indicating that the setBasis method expects an array of two
atoms.
|
AtomIteratorBasisDependent |
getInnerIterator() |
Accessor method for the inner-loop atom iterator.
|
AtomIteratorBasisDependent |
getOuterIterator() |
Accessor method for the outer-loop atom iterator.
|
boolean |
haveTarget(IAtom target) |
Returns true if the iterator with its current basis
would return an iterate for the given target.
|
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().
|
IAtomList |
next() |
Returns the next pair of atoms.
|
void |
reset() |
Resets the iterator to loop through its iterates again.
|
void |
setBasis(IMoleculeList basisAtoms) |
Specifies the basis, which identifies the atoms subject to iteration.
|
void |
setTarget(IAtom newTargetAtom) |
Specifies a target atom, which should appear in all iterates.
|
protected void |
setupIterators() |
|
int |
size() |
Returns the number of pairs given by this iterator.
|
void |
unset() |
Sets the iterator such that hasNext is false.
|
protected final AtomPair pair
protected final AtomIteratorBasisDependent aiInner
protected final AtomIteratorBasisDependent aiOuter
protected IAtom targetAtom
protected boolean needSetupIterators
protected final MoleculeSetSinglet atomSetSinglet
public ApiIntergroup()
public ApiIntergroup(AtomIteratorBasisDependent outer, AtomIteratorBasisDependent inner)
public AtomIteratorBasisDependent getOuterIterator()
public AtomIteratorBasisDependent getInnerIterator()
public void unset()
unset
in interface AtomsetIterator
public int size()
size
in interface AtomsetIterator
public final int nBody()
AtomsetIterator
nBody
in interface AtomsetIterator
public IAtomList next()
next
in interface AtomLeafsetIterator
public void setTarget(IAtom newTargetAtom)
setTarget
in interface AtomsetIteratorTargetable
public boolean haveTarget(IAtom target)
AtomsetIteratorBasisDependent
haveTarget
in interface AtomsetIteratorBasisDependent
protected void setupIterators()
public void setBasis(IMoleculeList basisAtoms)
setBasis
in interface AtomsetIteratorBasisDependent
basisAtoms
- The basis atoms; a null basis will
condition the iterator to give no iterates until a valid basis
is specified via another call to this method.public void reset()
AtomsetIterator
reset
in interface AtomsetIterator
public int basisSize()
basisSize
in interface AtomsetIteratorBasisDependent