Class RingPartitioner


  • public class RingPartitioner
    extends Object
    Partitions a RingSet into RingSets of connected rings. Rings which share an Atom, a Bond or three or more atoms with at least on other ring in the RingSet are considered connected.
    Source code:
    main
    Belongs to CDK module:
    standard
    • Constructor Detail

      • RingPartitioner

        public RingPartitioner()
    • Method Detail

      • partitionRings

        public static List<IRingSet> partitionRings​(IRingSet ringSet)
        Partitions a RingSet into RingSets of connected rings. Rings which share an Atom, a Bond or three or more atoms with at least on other ring in the RingSet are considered connected. Thus molecules such as azulene and indole will return a List with 1 element.

        Note that an isolated ring is considered to be self-connect. As a result a molecule such as biphenyl will result in a 2-element List being returned (each element corresponding to a phenyl ring).

        Parameters:
        ringSet - The RingSet to be partitioned
        Returns:
        A List of connected RingSets
      • convertToAtomContainer

        public static IAtomContainer convertToAtomContainer​(IRingSet ringSet)
        Converts a RingSet to an AtomContainer.
        Parameters:
        ringSet - The RingSet to be converted.
        Returns:
        The AtomContainer containing the bonds and atoms of the ringSet.