Class RingSetManipulator

java.lang.Object
org.openscience.cdk.tools.manipulator.RingSetManipulator

public class RingSetManipulator extends Object
Source code:
main
Belongs to CDK module:
standard
  • Constructor Details

    • RingSetManipulator

      public RingSetManipulator()
  • Method Details

    • getAtomCount

      public static int getAtomCount(IRingSet set)
      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

      public static IAtomContainer getAllInOneContainer(IRingSet ringSet)
      Puts all rings of a ringSet in a single atomContainer
      Parameters:
      ringSet - The ringSet to use
      Returns:
      The produced atomContainer
    • getLargestRingSet

      public static IRingSet getLargestRingSet(List<IRingSet> ringSystems)
      Returns the largest (number of atoms) ring set in a molecule
      Parameters:
      ringSystems - RingSystems of a molecule
      Returns:
      The largestRingSet
    • getBondCount

      public static int getBondCount(IRingSet set)
      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

      public static List<IAtomContainer> getAllAtomContainers(IRingSet set)
      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

      public static void sort(IRingSet ringSet)
      Sorts the rings in the set by size. The smallest ring comes first.
      Parameters:
      ringSet - The collection of rings
    • getHeaviestRing

      public static IRing getHeaviestRing(IRingSet ringSet, IBond bond)
      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 rings
      bond - 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

      public static IRing getMostComplexRing(IRingSet ringSet)
      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 with sort(IRingSet).
      Parameters:
      ringSet - The collection of rings
      Returns:
      the ring with the highest numbers of other rings attached to it.
    • isSameRing

      public static boolean isSameRing(IRingSet ringSet, IAtom atom1, IAtom atom2)
      Checks if atom1 and atom2 share 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 atom1 and atom2 are members of the same molecule for which the RingSet was calculated!

      Parameters:
      ringSet - The collection of rings
      atom1 - The first atom
      atom2 - The second atom
      Returns:
      boolean true if atom1 and atom2 share membership of at least one ring or ring system, false otherwise
    • ringAlreadyInSet

      public static boolean ringAlreadyInSet(IRing newRing, IRingSet ringSet)
      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 stored
      ringSet - The collection of rings
      Returns:
      true if it is already stored
    • markAromaticRings

      public static void markAromaticRings(IRingSet ringset)
      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