org.xmlcml.tools
Class RingNucleusImpl

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractSet
              |
              +--java.util.HashSet
                    |
                    +--org.xmlcml.tools.ToolHashSetImpl
                          |
                          +--org.xmlcml.tools.BondSetImpl
                                |
                                +--org.xmlcml.tools.RingNucleusImpl

public class RingNucleusImpl
extends BondSetImpl
implements RingNucleus

a nucleus of rings (e.g. androstane but not biphenyl (which would be 2 separate RingNucleus)). Contains information about which rings overlap.

See Also:
Serialized Form

Field Summary
protected  java.util.Vector ringOverlapVector
          what RingOverlaps are there between these rings?
protected  java.util.Vector ringVector
          what Rings are there in this nucleus?
protected  SpanningTree spanningTree
           
 
Fields inherited from class org.xmlcml.tools.BondSetImpl
atomSet
 
Constructor Summary
RingNucleusImpl()
           
RingNucleusImpl(SpanningTree spanningTree)
           
 
Method Summary
 void addAtoms()
          add atoms from all the rings
 void addRing(Ring ring)
           
 void addSubstituent(ChainSet ch)
          add substituent(s) in ChainSet
 void addSubstituent(RingNucleus rn)
          add substituent(s) in RingNucleus
 void calculateCoordinates()
          calculate coordinates for nucleus de-novo
 int getCount()
          get number of rings
 void getRingOverlaps()
          find which rings have bonds in common
 void getSSSR()
          "Smallest set of smallest rings".
 void getSubstituents(Molecule molecule)
          get substituent atoms (recursively)
 void mergeSpiro(Atom atom, RingNucleus otherNucleus)
           
 java.lang.String toString()
           
 
Methods inherited from class org.xmlcml.tools.BondSetImpl
addBond, and, containsAtom, getAtomSet, not, or, xor
 
Methods inherited from class org.xmlcml.tools.ToolHashSetImpl
and, clone, debug, main, not, or, xor
 
Methods inherited from class java.util.HashSet
add, clear, contains, isEmpty, iterator, remove, size
 
Methods inherited from class java.util.AbstractSet
equals, hashCode
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, removeAll, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ringVector

protected java.util.Vector ringVector
what Rings are there in this nucleus?

ringOverlapVector

protected java.util.Vector ringOverlapVector
what RingOverlaps are there between these rings?

spanningTree

protected SpanningTree spanningTree
Constructor Detail

RingNucleusImpl

public RingNucleusImpl()

RingNucleusImpl

public RingNucleusImpl(SpanningTree spanningTree)
Method Detail

addRing

public void addRing(Ring ring)
             throws CMLException
Specified by:
addRing in interface RingNucleus

getCount

public int getCount()
Description copied from interface: RingNucleus
get number of rings
Specified by:
getCount in interface RingNucleus

getSSSR

public void getSSSR()
             throws CMLException
"Smallest set of smallest rings". Crude - not guaranteed to find minimum
Specified by:
getSSSR in interface RingNucleus

getRingOverlaps

public void getRingOverlaps()
                     throws CMLException
find which rings have bonds in common
Specified by:
getRingOverlaps in interface RingNucleus

addAtoms

public void addAtoms()
              throws CMLException
add atoms from all the rings
Specified by:
addAtoms in interface RingNucleus

calculateCoordinates

public void calculateCoordinates()
calculate coordinates for nucleus de-novo
Specified by:
calculateCoordinates in interface RingNucleus

getSubstituents

public void getSubstituents(Molecule molecule)
                     throws CMLException
get substituent atoms (recursively)
Specified by:
getSubstituents in interface RingNucleus

addSubstituent

public void addSubstituent(RingNucleus rn)
                    throws CMLException
add substituent(s) in RingNucleus
Specified by:
addSubstituent in interface RingNucleus

addSubstituent

public void addSubstituent(ChainSet ch)
                    throws CMLException
add substituent(s) in ChainSet
Specified by:
addSubstituent in interface RingNucleus

mergeSpiro

public void mergeSpiro(Atom atom,
                       RingNucleus otherNucleus)
Specified by:
mergeSpiro in interface RingNucleus

toString

public java.lang.String toString()
Specified by:
toString in interface RingNucleus
Overrides:
toString in class BondSetImpl