test_class.file: legacy/src/test/java/org/openscience/cdk/tools/DeAromatizationToolTest.java
test_class.identifier: DeAromatizationToolTest
test_class.superclass: extends CDKTestCase
test_case.body: @Test
      public void testPyridine() {
          Ring pyridine = new Ring(6, "C");
          pyridine.getAtom(0).setSymbol("N");
          Iterator<IBond> bonds = pyridine.bonds().iterator();
          while (bonds.hasNext())
              bonds.next().setFlag(CDKConstants.ISAROMATIC, true);
          boolean success = DeAromatizationTool.deAromatize(pyridine);
          Assert.assertTrue(success);
          double bondOrderSum = AtomContainerManipulator.getSingleBondEquivalentSum(pyridine);
          Assert.assertEquals(9.0, bondOrderSum, 0.00001);
      }
test_case.class_method_signature: DeAromatizationToolTest.testPyridine()
test_case.full_signature: @Test public void testPyridine()
test_case.identifier: testPyridine
test_case.invocations: setSymbol getAtom iterator bonds hasNext setFlag next deAromatize assertTrue getSingleBondEquivalentSum assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testPyridine()
focal_class.file: legacy/src/main/java/org/openscience/cdk/tools/DeAromatizationTool.java
focal_class.identifier: DeAromatizationTool
focal_class.class_method_signature: DeAromatizationTool.deAromatize(IRing ring)
focal_class.full_signature: public static boolean deAromatize(IRing ring)
focal_class.identifier: deAromatize
focal_class.modifiers: public static
focal_class.parameters: (IRing ring)
focal_class.return: boolean
focal_class.signature: boolean deAromatize(IRing ring)
focal_class.class_method_signature: DeAromatizationTool.deAromatizePyridine(IRing ring)
focal_class.full_signature: private static boolean deAromatizePyridine(IRing ring)
focal_class.identifier: deAromatizePyridine
focal_class.modifiers: private static
focal_class.parameters: (IRing ring)
focal_class.return: boolean
focal_class.signature: boolean deAromatizePyridine(IRing ring)
focal_class.class_method_signature: DeAromatizationTool.deAromatizePyrolle(IRing ring)
focal_class.full_signature: private static boolean deAromatizePyrolle(IRing ring)
focal_class.identifier: deAromatizePyrolle
focal_class.modifiers: private static
focal_class.parameters: (IRing ring)
focal_class.return: boolean
focal_class.signature: boolean deAromatizePyrolle(IRing ring)
focal_class.class_method_signature: DeAromatizationTool.getNextBond(IAtom atom, IBond bond, IRing ring)
focal_class.full_signature: private static IBond getNextBond(IAtom atom, IBond bond, IRing ring)
focal_class.identifier: getNextBond
focal_class.modifiers: private static
focal_class.parameters: (IAtom atom, IBond bond, IRing ring)
focal_class.return: IBond
focal_class.signature: IBond getNextBond(IAtom atom, IBond bond, IRing ring)
focal_class.class_method_signature: DeAromatizationTool.deAromatizeBenzene(IRing ring)
focal_class.full_signature: private static boolean deAromatizeBenzene(IRing ring)
focal_class.identifier: deAromatizeBenzene
focal_class.modifiers: private static
focal_class.parameters: (IRing ring)
focal_class.return: boolean
focal_class.signature: boolean deAromatizeBenzene(IRing ring)
focal_class.class_method_signature: DeAromatizationTool.Dearomatize(IAtomContainer molecule)
focal_class.full_signature: public static void Dearomatize(IAtomContainer molecule)
focal_class.identifier: Dearomatize
focal_class.modifiers: public static
focal_class.parameters: (IAtomContainer molecule)
focal_class.return: void
focal_class.signature: void Dearomatize(IAtomContainer molecule)
focal_class.class_method_signature: DeAromatizationTool.Dearomatize666Rings(IRingSet rings)
focal_class.full_signature: public static boolean Dearomatize666Rings(IRingSet rings)
focal_class.identifier: Dearomatize666Rings
focal_class.modifiers: public static
focal_class.parameters: (IRingSet rings)
focal_class.return: boolean
focal_class.signature: boolean Dearomatize666Rings(IRingSet rings)
focal_class.class_method_signature: DeAromatizationTool.Dearomatize566Rings(IRingSet rings)
focal_class.full_signature: public static boolean Dearomatize566Rings(IRingSet rings)
focal_class.identifier: Dearomatize566Rings
focal_class.modifiers: public static
focal_class.parameters: (IRingSet rings)
focal_class.return: boolean
focal_class.signature: boolean Dearomatize566Rings(IRingSet rings)
focal_class.class_method_signature: DeAromatizationTool.Dearomatize66Rings(IRingSet rings)
focal_class.full_signature: public static boolean Dearomatize66Rings(IRingSet rings)
focal_class.identifier: Dearomatize66Rings
focal_class.modifiers: public static
focal_class.parameters: (IRingSet rings)
focal_class.return: boolean
focal_class.signature: boolean Dearomatize66Rings(IRingSet rings)
focal_class.class_method_signature: DeAromatizationTool.Dearomatize56Rings(IRingSet rings)
focal_class.full_signature: public static boolean Dearomatize56Rings(IRingSet rings)
focal_class.identifier: Dearomatize56Rings
focal_class.modifiers: public static
focal_class.parameters: (IRingSet rings)
focal_class.return: boolean
focal_class.signature: boolean Dearomatize56Rings(IRingSet rings)
focal_class.class_method_signature: DeAromatizationTool.Dearomatize6Ring(IRingSet rings)
focal_class.full_signature: public static boolean Dearomatize6Ring(IRingSet rings)
focal_class.identifier: Dearomatize6Ring
focal_class.modifiers: public static
focal_class.parameters: (IRingSet rings)
focal_class.return: boolean
focal_class.signature: boolean Dearomatize6Ring(IRingSet rings)
focal_class.class_method_signature: DeAromatizationTool.Dearomatize5Ring(IRingSet rings)
focal_class.full_signature: public static boolean Dearomatize5Ring(IRingSet rings)
focal_class.identifier: Dearomatize5Ring
focal_class.modifiers: public static
focal_class.parameters: (IRingSet rings)
focal_class.return: boolean
focal_class.signature: boolean Dearomatize5Ring(IRingSet rings)
focal_class.class_method_signature: DeAromatizationTool.isAllAtomsAromatic(IAtomContainer ring)
focal_class.full_signature: private static boolean isAllAtomsAromatic(IAtomContainer ring)
focal_class.identifier: isAllAtomsAromatic
focal_class.modifiers: private static
focal_class.parameters: (IAtomContainer ring)
focal_class.return: boolean
focal_class.signature: boolean isAllAtomsAromatic(IAtomContainer ring)
focal_class.class_method_signature: DeAromatizationTool.isMiddleRing(IAtomContainer ring, IAtomContainer ringA, IAtomContainer ringB)
focal_class.full_signature: private static boolean isMiddleRing(IAtomContainer ring, IAtomContainer ringA, IAtomContainer ringB)
focal_class.identifier: isMiddleRing
focal_class.modifiers: private static
focal_class.parameters: (IAtomContainer ring, IAtomContainer ringA, IAtomContainer ringB)
focal_class.return: boolean
focal_class.signature: boolean isMiddleRing(IAtomContainer ring, IAtomContainer ringA, IAtomContainer ringB)
focal_class.class_method_signature: DeAromatizationTool.RemoveAromaticFlag(IAtomContainer ring)
focal_class.full_signature: private static void RemoveAromaticFlag(IAtomContainer ring)
focal_class.identifier: RemoveAromaticFlag
focal_class.modifiers: private static
focal_class.parameters: (IAtomContainer ring)
focal_class.return: void
focal_class.signature: void RemoveAromaticFlag(IAtomContainer ring)
focal_class.class_method_signature: DeAromatizationTool.InvalidateBonds(IAtomContainer ring)
focal_class.full_signature: private static void InvalidateBonds(IAtomContainer ring)
focal_class.identifier: InvalidateBonds
focal_class.modifiers: private static
focal_class.parameters: (IAtomContainer ring)
focal_class.return: void
focal_class.signature: void InvalidateBonds(IAtomContainer ring)
focal_class.class_method_signature: DeAromatizationTool.DearomatizeRing(IAtomContainer ring, IAtom startAtom, IBond startBond)
focal_class.full_signature: private static void DearomatizeRing(IAtomContainer ring, IAtom startAtom, IBond startBond)
focal_class.identifier: DearomatizeRing
focal_class.modifiers: private static
focal_class.parameters: (IAtomContainer ring, IAtom startAtom, IBond startBond)
focal_class.return: void
focal_class.signature: void DearomatizeRing(IAtomContainer ring, IAtom startAtom, IBond startBond)
focal_method.body: public static boolean deAromatize(IRing ring) {
          boolean allaromatic = true;
          for (int i = 0; i < ring.getBondCount(); i++) {
              if (!ring.getBond(i).getFlag(CDKConstants.ISAROMATIC)) allaromatic = false;
          }
          if (!allaromatic) return false;
          for (int i = 0; i < ring.getBondCount(); i++) {
              if (ring.getBond(i).getFlag(CDKConstants.ISAROMATIC)) ring.getBond(i).setOrder(IBond.Order.SINGLE);
          }
          boolean result = false;
          IMolecularFormula formula = MolecularFormulaManipulator.getMolecularFormula(ring);
          //		Map elementCounts = new MFAnalyser(ring).getFormulaHashtable();
          if (ring.getRingSize() == 6) {
              if (MolecularFormulaManipulator.getElementCount(formula, new Element("C")) == 6) {
                  result = DeAromatizationTool.deAromatizeBenzene(ring);
              } else if (MolecularFormulaManipulator.getElementCount(formula, new Element("C")) == 5
                      && MolecularFormulaManipulator.getElementCount(formula, new Element("N")) == 1) {
                  result = DeAromatizationTool.deAromatizePyridine(ring);
              }
          }
          if (ring.getRingSize() == 5) {
              if (MolecularFormulaManipulator.getElementCount(formula, new Element("C")) == 4
                      && MolecularFormulaManipulator.getElementCount(formula, new Element("N")) == 1) {
                  result = deAromatizePyrolle(ring);
              }
          }
          return result;
      }
focal_method.class_method_signature: DeAromatizationTool.deAromatize(IRing ring)
focal_method.full_signature: public static boolean deAromatize(IRing ring)
focal_method.identifier: deAromatize
focal_method.invocations: getBondCount getFlag getBond getBondCount getFlag getBond setOrder getBond getMolecularFormula getRingSize getElementCount deAromatizeBenzene getElementCount getElementCount deAromatizePyridine getRingSize getElementCount getElementCount deAromatizePyrolle
focal_method.modifiers: public static
focal_method.parameters: (IRing ring)
focal_method.return: boolean
focal_method.signature: boolean deAromatize(IRing ring)