|
The Octet Molecular Representation Framework v0.8.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.octet.model.SimpleBondingSystem
An implementation of the BondingSystem interface that is optimized for two-
Atom bonding. Use SimpleBondingSystem to optimize performance in those cases
in which a two-Atom BondingSystem is used. Because the majority of
BondingSystems in any represenation will be restricted to two Atoms only,
SimpleBondingSystem offers faster access time and a lower memory footprint compared
to BasicBondingSystem.
| Constructor Summary | |
SimpleBondingSystem(AtomPair pair,
int bondingElectronCount)
Convenience constructor that constructs a SimpleBondingSystem with bonding electrons
only. |
|
SimpleBondingSystem(AtomPair pair,
int bondingElectronCount,
int antibondingElectronCount)
Constructs a SimpleBondingSystem from pair with the indicated
electron counts. |
|
| Method Summary | |
boolean |
containsAtom(Atom atom)
Returns true if the specified Atom is contained in this
collection, and false otherwise. |
boolean |
containsAtomPair(Atom source,
Atom target)
Returns true if an AtomPair connecting
source and target is contained in this
collection. |
boolean |
containsAtomPair(AtomPair pair)
Returns true if an AtomPair matching
pair is contained in this collection. |
int |
countAntibondingElectrons()
Returns the number of antibonding electrons in this BondingSystem. |
int |
countAtomPairs()
Returns the number of AtomPairs contained in this collection. |
int |
countAtoms()
Returns the number of Atoms contained in this atom collection. |
int |
countBondingElectrons()
Returns the number of bonding electrons associated with this BondingSystem. |
int |
countNeighbors(Atom atom)
Returns the number of Atoms connected to atom in the context of
this AtomGraph. |
Atom |
getAtom(int index)
Returns the Atom located at the specified zero-based index. |
int |
getAtomIndex(Atom atom)
Returns the zero-based index of the specified Atom. |
AtomPair |
getAtomPair(Atom source,
Atom target)
Returns an AtomPair containing the specified source
and target Atoms. |
AtomPair |
getAtomPair(int index)
Returns the AtomPair corresponding to the specified integer index. |
int |
getAtomPairIndex(AtomPair pair)
Returns the index of the specified AtomPair. |
AtomPairIterator |
iterateAtomPairs()
Returns an iterator over all AtomPairs in this collection. |
AtomIterator |
iterateAtoms()
Returns an iterator over all Atoms in this collection. |
AtomIterator |
iterateNeighbors(Atom atom)
Returns an iterator over all neighbors of atom in the context of this
AtomGraph. |
Atom[] |
toAtomArray()
Returns a copy of the Atoms contained in this collection as an array. |
AtomPair[] |
toAtomPairArray()
Returns a copy of the atom pairs contained in this collection as an array. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SimpleBondingSystem(AtomPair pair,
int bondingElectronCount,
int antibondingElectronCount)
SimpleBondingSystem from pair with the indicated
electron counts.
pair - the AtomPairbondingElectronCount - the bonding electron countantibondingElectronCount - the antibonding electron count
public SimpleBondingSystem(AtomPair pair,
int bondingElectronCount)
SimpleBondingSystem with bonding electrons
only. Antibonding electron count is initialized to zero.
pair - the AtomPairbondingElectronCount - the bonding electron count| Method Detail |
public int countBondingElectrons()
BondingSystemBondingSystem.
countBondingElectrons in interface BondingSystemBondingSystempublic int countAntibondingElectrons()
BondingSystemBondingSystem.
countAntibondingElectrons in interface BondingSystemBondingSystempublic AtomIterator iterateNeighbors(Atom atom)
AtomGraphatom in the context of this
AtomGraph. This iterator may contain only a subset of the Atoms
returned by atom.iterateNeighbors(), depending on the nature of this
AtomGraph.
iterateNeighbors in interface AtomGraphatom - the Atom to examine
atompublic int countNeighbors(Atom atom)
AtomGraphAtoms connected to atom in the context of
this AtomGraph. This value will be less than or equal to the value returned
by atom.countNeighbors().
countNeighbors in interface AtomGraphatom - the Atom to examine
atompublic boolean containsAtom(Atom atom)
AtomCollectiontrue if the specified Atom is contained in this
collection, and false otherwise.
containsAtom in interface AtomCollectionatom - the Atom
true if contained, false otherwisepublic int countAtoms()
AtomCollectionAtoms contained in this atom collection.
countAtoms in interface AtomCollectionpublic int getAtomIndex(Atom atom)
AtomCollectionAtom.
getAtomIndex in interface AtomCollectionatom - the atom
atompublic Atom getAtom(int index)
AtomCollectionAtom located at the specified zero-based index.
getAtom in interface AtomCollectionindex - the index
Atom at index, or null
if the index is invalidpublic AtomIterator iterateAtoms()
AtomCollectionAtoms in this collection.
iterateAtoms in interface AtomCollectionAtoms in this collectionpublic Atom[] toAtomArray()
AtomCollection
toAtomArray in interface AtomCollectionpublic boolean containsAtomPair(AtomPair pair)
AtomPairCollectiontrue if an AtomPair matching
pair is contained in this collection.
containsAtomPair in interface AtomPairCollectionpair - the AtomPair to search for
true if found, false otherwise
public boolean containsAtomPair(Atom source,
Atom target)
AtomPairCollectiontrue if an AtomPair connecting
source and target is contained in this
collection.
containsAtomPair in interface AtomPairCollectionsource - the source atomtarget - the target atom
true if the atom pair exists, false otherwise
public AtomPair getAtomPair(Atom source,
Atom target)
AtomPairCollectionAtomPair containing the specified source
and target Atoms. If no such pair is found,
null is returned.
getAtomPair in interface AtomPairCollectionsource - the source atomtarget - the target atom
AtomPairpublic int countAtomPairs()
AtomPairCollectionAtomPairs contained in this collection.
countAtomPairs in interface AtomPairCollectionAtomPairs contained in this collection.public AtomPairIterator iterateAtomPairs()
AtomPairCollectionAtomPairs in this collection.
iterateAtomPairs in interface AtomPairCollectionAtomPairs in this collectionpublic int getAtomPairIndex(AtomPair pair)
AtomPairCollectionAtomPair.
getAtomPairIndex in interface AtomPairCollectionpair - the AtomPair to search for
AtomPairpublic AtomPair getAtomPair(int index)
AtomPairCollectionAtomPair corresponding to the specified integer index.
getAtomPair in interface AtomPairCollectionindex - the index to search for
AtomPair at the specified indexpublic AtomPair[] toAtomPairArray()
AtomPairCollection
toAtomPairArray in interface AtomPairCollection
|
The Octet Molecular Representation Framework v0.8.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||