The Octet Molecular Representation Framework v0.8.2

net.sf.octet.model
Interface AtomGraph

All Superinterfaces:
AtomCollection, AtomPairCollection
All Known Subinterfaces:
BondingSystem, GammaSequence, Molecule
All Known Implementing Classes:
AtomGraphDecorator, BasicAtomGraph, BasicBondingSystem, BasicGammaSequence, MoleculeDecorator, SimpleBondingSystem

public interface AtomGraph
extends AtomCollection, AtomPairCollection

AtomGraph represents the graph theoretical construct of a graph as applied to a set of Atoms. AtomGraph places the additional restriction on the AtomCollection and AtomPairCollection interfaces that there are no duplicate items as determined by operator ==.

In graph theoretical terms, an AtomGraph is a simple, undirected, unweighted graph whose verticies are Atoms and whose edges are AtomPairs.

The Atoms and AtomPairs in an AtomGraph may or may not belong to a single Molecule, depending on implementation.

Author:
Richard Apodaca

Method Summary
 int countNeighbors(Atom atom)
          Returns the number of Atoms connected to atom in the context of this AtomGraph.
 AtomIterator iterateNeighbors(Atom atom)
          Returns an iterator over all neighbors of atom in the context of this AtomGraph.
 
Methods inherited from interface net.sf.octet.collection.AtomCollection
containsAtom, countAtoms, getAtom, getAtomIndex, iterateAtoms, toAtomArray
 
Methods inherited from interface net.sf.octet.collection.AtomPairCollection
containsAtomPair, containsAtomPair, countAtomPairs, getAtomPair, getAtomPair, getAtomPairIndex, iterateAtomPairs, toAtomPairArray
 

Method Detail

iterateNeighbors

public AtomIterator iterateNeighbors(Atom atom)
Returns an iterator over all neighbors of atom 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.

Parameters:
atom - the Atom to examine
Returns:
an iterator over all neighbors of atom
Throws:
NoSuchAtomException - if the specified Atom can not be found

countNeighbors

public int countNeighbors(Atom atom)
Returns the number of Atoms connected to atom in the context of this AtomGraph. This value will be less than or equal to the value returned by atom.countNeighbors().

Parameters:
atom - the Atom to examine
Returns:
the number of neighbors of atom
Throws:
NoSuchAtomException - if the specified Atom can not be found

The Octet Molecular Representation Framework v0.8.2