Class RingSetManipulator
java.lang.Object
org.openscience.cdk.tools.manipulator.RingSetManipulator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<IAtomContainer>Returns all the AtomContainer's in a RingSet.static IAtomContainergetAllInOneContainer(IRingSet ringSet) Puts all rings of a ringSet in a single atomContainerstatic intgetAtomCount(IRingSet set) Return the total number of atoms over all the rings in the colllection.static intgetBondCount(IRingSet set) Return the total number of bonds over all the rings in the colllection.static IRinggetHeaviestRing(IRingSet ringSet, IBond bond) We define the heaviest ring as the one with the highest number of double bonds.static IRingSetgetLargestRingSet(List<IRingSet> ringSystems) Returns the largest (number of atoms) ring set in a moleculestatic IRinggetMostComplexRing(IRingSet ringSet) Returns the ring with the highest numbers of other rings attached to it.static booleanisSameRing(IRingSet ringSet, IAtom atom1, IAtom atom2) Checks ifatom1andatom2share membership in the same ring or ring system.static voidmarkAromaticRings(IRingSet ringset) Iterates over the rings in the ring set, and marks the ring aromatic if all atoms and all bonds are aromatic.static booleanringAlreadyInSet(IRing newRing, IRingSet ringSet) Checks - and returns 'true' - if a certain ring is already stored in the ringset.static voidSorts the rings in the set by size.
-
Constructor Details
-
RingSetManipulator
public RingSetManipulator()
-
-
Method Details
-
getAtomCount
Return the total number of atoms over all the rings in the colllection.- Parameters:
set- The collection of rings- Returns:
- The total number of atoms
-
getAllInOneContainer
Puts all rings of a ringSet in a single atomContainer- Parameters:
ringSet- The ringSet to use- Returns:
- The produced atomContainer
-
getLargestRingSet
Returns the largest (number of atoms) ring set in a molecule- Parameters:
ringSystems- RingSystems of a molecule- Returns:
- The largestRingSet
-
getBondCount
Return the total number of bonds over all the rings in the colllection.- Parameters:
set- The collection of rings- Returns:
- The total number of bonds
-
getAllAtomContainers
Returns all the AtomContainer's in a RingSet.- Parameters:
set- The collection of rings- Returns:
- A list of IAtomContainer objects corresponding to individual rings
-
sort
Sorts the rings in the set by size. The smallest ring comes first.- Parameters:
ringSet- The collection of rings
-
getHeaviestRing
We define the heaviest ring as the one with the highest number of double bonds. Needed for example for the placement of in-ring double bonds.- Parameters:
ringSet- The collection of ringsbond- A bond which must be contained by the heaviest ring- Returns:
- The ring with the higest number of double bonds connected to a given bond
-
getMostComplexRing
Returns the ring with the highest numbers of other rings attached to it. If an equally complex ring is found the last one is selected allow prioritization by size withsort(IRingSet).- Parameters:
ringSet- The collection of rings- Returns:
- the ring with the highest numbers of other rings attached to it.
-
isSameRing
Checks ifatom1andatom2share membership in the same ring or ring system. Membership in the same ring is checked if the RingSet contains the SSSR of a molecule; membership in the same ring or same ring system is checked if the RingSet contains all rings of a molecule.
Important: This method only returns meaningful results if
atom1andatom2are members of the same molecule for which the RingSet was calculated!- Parameters:
ringSet- The collection of ringsatom1- The first atomatom2- The second atom- Returns:
- boolean true if
atom1andatom2share membership of at least one ring or ring system, false otherwise
-
ringAlreadyInSet
Checks - and returns 'true' - if a certain ring is already stored in the ringset. This is not a test for equality of Ring objects, but compares all Bond objects of the ring.- Parameters:
newRing- The ring to be tested if it is already storedringSet- The collection of rings- Returns:
- true if it is already stored
-
markAromaticRings
Iterates over the rings in the ring set, and marks the ring aromatic if all atoms and all bonds are aromatic. This method assumes that aromaticity perception has been done before hand.- Parameters:
ringset- The collection of rings
-