org.xmlcml.tools
Interface Ring

All Known Implementing Classes:
RingImpl

public interface Ring
extends BondSet


Method Summary
 void addBond(Bond bond)
          add a bond, checking for nullity and duplicates
 void addRingOverlap(RingOverlap ringOverlap)
           
 BondSet and(Ring ring)
          create a new ring as the AND of this and ring (i.e.
 void calculateCoordinates(Real2 repelPoint)
          calculate coordinates of a ring through two points.
 void calculateCoordinates(Ring overlapRing)
          stores knowledge of what rings are neighbours ?????
 Real2 getCentroid()
           
 java.util.Vector getCyclicAtomVector()
          returns an ordered list of atoms corresponding to traversal of the ring
 java.util.Vector getCyclicBondVector()
          ordered cycle of bonds (e.g.
 java.lang.String getId()
           
 java.util.Vector getRingOverlapVector()
           
 Ring xor(Ring ring)
          create a new ring as the XOR of this and ring (i.e.
 
Methods inherited from interface org.xmlcml.tools.BondSet
and, containsAtom, getAtomSet, not, or, xor
 
Methods inherited from interface org.xmlcml.tools.ToolHashSet
add, addAll, and, clone, contains, debug, iterator, not, or, remove, removeAll, retainAll, size, xor
 

Method Detail

addBond

public void addBond(Bond bond)
             throws CMLException
Description copied from interface: BondSet
add a bond, checking for nullity and duplicates
Specified by:
addBond in interface BondSet

xor

public Ring xor(Ring ring)
create a new ring as the XOR of this and ring (i.e. formed from bonds NOT in common)

and

public BondSet and(Ring ring)
create a new ring as the AND of this and ring (i.e. formed from bonds in common)

getCyclicBondVector

public java.util.Vector getCyclicBondVector()
ordered cycle of bonds (e.g. for creating Polygon). Starts at bond, if bond is part of ring, else arbitrary point. The second bond contains bond.atom2 and so on.

getCyclicAtomVector

public java.util.Vector getCyclicAtomVector()
returns an ordered list of atoms corresponding to traversal of the ring

calculateCoordinates

public void calculateCoordinates(Ring overlapRing)
stores knowledge of what rings are neighbours ?????

calculateCoordinates

public void calculateCoordinates(Real2 repelPoint)
calculate coordinates of a ring through two points. If offset = 0 or 1 these points are assumed to be adjacent, else the separation is by offset number of atoms (e.g. offset = 2 implies point[0] and point[2]). The result is an arrary of Points which is NOT applied to the coordinate table.

getCentroid

public Real2 getCentroid()

getRingOverlapVector

public java.util.Vector getRingOverlapVector()

addRingOverlap

public void addRingOverlap(RingOverlap ringOverlap)

getId

public java.lang.String getId()