Class ConjugatedPiSystemsDetector

  • public class ConjugatedPiSystemsDetector
    extends Object
    Source code:
    Belongs to CDK module:
    Created on:
    To do:
    add negatively charged atoms (e.g. O-) to the pi system
    • Constructor Detail

      • ConjugatedPiSystemsDetector

        public ConjugatedPiSystemsDetector()
    • Method Detail

      • detect

        public static IAtomContainerSet detect​(IAtomContainer ac)
        Detect all conjugated pi systems in an AtomContainer. This method returns a AtomContainerSet with Atom and Bond objects from the original AtomContainer. The aromaticity has to be known before calling this method.

        An example for detection of Radical Allyl:

                Atom a0 = new Atom("C"); mol.addAtom(a0);
                Atom a1 = new Atom("C"); mol.addAtom(a1);
                Atom a2 = new Atom("C"); mol.addAtom(a2);
                Atom h1 = new Atom("H"); mol.addAtom(h1);
                Atom h2 = new Atom("H"); mol.addAtom(h2);
                Atom h3 = new Atom("H"); mol.addAtom(h3);
                Atom h4 = new Atom("H"); mol.addAtom(h4);
                Atom h5 = new Atom("H"); mol.addAtom(h5);
                mol.addBond(0, 1, IBond.Order.DOUBLE);
                mol.addBond(1, 2, IBond.Order.SINGLE);
                mol.addBond(0, 3, IBond.Order.SINGLE);
                mol.addBond(0, 4, IBond.Order.SINGLE);
                mol.addBond(1, 5, IBond.Order.SINGLE);
                mol.addBond(2, 6, IBond.Order.SINGLE);
                mol.addBond(2, 7, IBond.Order.SINGLE);
                SingleElectron se = new SingleElectron(a2);
        ac - The AtomContainer for which to detect conjugated pi systems
        The set of AtomContainers with conjugated pi systems