test_class.file: legacy/src/test/java/org/openscience/cdk/normalize/SMSDNormalizerTest.java
test_class.identifier: SMSDNormalizerTest
test_case.body: @Test
      public void testAromatizeMolecule() throws InvalidSmilesException {
          String rawMolSmiles = "C1=CC2=C(C=C1)C=CC=C2";
          SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance());
          IAtomContainer mol = sp.parseSmiles(rawMolSmiles);
          SMSDNormalizer.aromatizeMolecule(mol);
          int count = 0;
          for (IBond b : mol.bonds()) {
              if (b.getFlag(CDKConstants.ISAROMATIC) && b.getOrder().equals(IBond.Order.DOUBLE)) {
                  count++;
              }
          }
          assertEquals(5, count);
      }
test_case.class_method_signature: SMSDNormalizerTest.testAromatizeMolecule()
test_case.full_signature: @Test public void testAromatizeMolecule()
test_case.identifier: testAromatizeMolecule
test_case.invocations: getInstance parseSmiles aromatizeMolecule bonds getFlag equals getOrder assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAromatizeMolecule()
focal_class.file: legacy/src/main/java/org/openscience/cdk/normalize/SMSDNormalizer.java
focal_class.identifier: SMSDNormalizer
focal_class.class_method_signature: SMSDNormalizer.makeDeepCopy(IAtomContainer container)
focal_class.full_signature: public static IAtomContainer makeDeepCopy(IAtomContainer container)
focal_class.identifier: makeDeepCopy
focal_class.modifiers: public static
focal_class.parameters: (IAtomContainer container)
focal_class.return: IAtomContainer
focal_class.signature: IAtomContainer makeDeepCopy(IAtomContainer container)
focal_class.class_method_signature: SMSDNormalizer.aromatizeMolecule(IAtomContainer mol)
focal_class.full_signature: public static void aromatizeMolecule(IAtomContainer mol)
focal_class.identifier: aromatizeMolecule
focal_class.modifiers: public static
focal_class.parameters: (IAtomContainer mol)
focal_class.return: void
focal_class.signature: void aromatizeMolecule(IAtomContainer mol)
focal_class.class_method_signature: SMSDNormalizer.getExplicitHydrogenCount(IAtomContainer atomContainer, IAtom atom)
focal_class.full_signature: public static int getExplicitHydrogenCount(IAtomContainer atomContainer, IAtom atom)
focal_class.identifier: getExplicitHydrogenCount
focal_class.modifiers: public static
focal_class.parameters: (IAtomContainer atomContainer, IAtom atom)
focal_class.return: int
focal_class.signature: int getExplicitHydrogenCount(IAtomContainer atomContainer, IAtom atom)
focal_class.class_method_signature: SMSDNormalizer.getImplicitHydrogenCount(IAtomContainer atomContainer, IAtom atom)
focal_class.full_signature: public static int getImplicitHydrogenCount(IAtomContainer atomContainer, IAtom atom)
focal_class.identifier: getImplicitHydrogenCount
focal_class.modifiers: public static
focal_class.parameters: (IAtomContainer atomContainer, IAtom atom)
focal_class.return: int
focal_class.signature: int getImplicitHydrogenCount(IAtomContainer atomContainer, IAtom atom)
focal_class.class_method_signature: SMSDNormalizer.getHydrogenCount(IAtomContainer atomContainer, IAtom atom)
focal_class.full_signature: public static int getHydrogenCount(IAtomContainer atomContainer, IAtom atom)
focal_class.identifier: getHydrogenCount
focal_class.modifiers: public static
focal_class.parameters: (IAtomContainer atomContainer, IAtom atom)
focal_class.return: int
focal_class.signature: int getHydrogenCount(IAtomContainer atomContainer, IAtom atom)
focal_class.class_method_signature: SMSDNormalizer.removeHydrogensAndPreserveAtomID(IAtomContainer atomContainer)
focal_class.full_signature: public static IAtomContainer removeHydrogensAndPreserveAtomID(IAtomContainer atomContainer)
focal_class.identifier: removeHydrogensAndPreserveAtomID
focal_class.modifiers: public static
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: IAtomContainer
focal_class.signature: IAtomContainer removeHydrogensAndPreserveAtomID(IAtomContainer atomContainer)
focal_class.class_method_signature: SMSDNormalizer.convertExplicitToImplicitHydrogens(IAtomContainer atomContainer)
focal_class.full_signature: public static IAtomContainer convertExplicitToImplicitHydrogens(IAtomContainer atomContainer)
focal_class.identifier: convertExplicitToImplicitHydrogens
focal_class.modifiers: public static
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: IAtomContainer
focal_class.signature: IAtomContainer convertExplicitToImplicitHydrogens(IAtomContainer atomContainer)
focal_class.class_method_signature: SMSDNormalizer.percieveAtomTypesAndConfigureAtoms(IAtomContainer container)
focal_class.full_signature: public static void percieveAtomTypesAndConfigureAtoms(IAtomContainer container)
focal_class.identifier: percieveAtomTypesAndConfigureAtoms
focal_class.modifiers: public static
focal_class.parameters: (IAtomContainer container)
focal_class.return: void
focal_class.signature: void percieveAtomTypesAndConfigureAtoms(IAtomContainer container)
focal_class.class_method_signature: SMSDNormalizer.copyAtoms(IAtomContainer container, IAtomContainer newAtomContainer)
focal_class.full_signature: private static IAtom[] copyAtoms(IAtomContainer container, IAtomContainer newAtomContainer)
focal_class.identifier: copyAtoms
focal_class.modifiers: private static
focal_class.parameters: (IAtomContainer container, IAtomContainer newAtomContainer)
focal_class.return: IAtom[]
focal_class.signature: IAtom[] copyAtoms(IAtomContainer container, IAtomContainer newAtomContainer)
focal_class.class_method_signature: SMSDNormalizer.copyBonds(IAtom[] atoms, IAtomContainer container, IAtomContainer newAtomContainer)
focal_class.full_signature: private static void copyBonds(IAtom[] atoms, IAtomContainer container, IAtomContainer newAtomContainer)
focal_class.identifier: copyBonds
focal_class.modifiers: private static
focal_class.parameters: (IAtom[] atoms, IAtomContainer container, IAtomContainer newAtomContainer)
focal_class.return: void
focal_class.signature: void copyBonds(IAtom[] atoms, IAtomContainer container, IAtomContainer newAtomContainer)
focal_class.class_method_signature: SMSDNormalizer.reComputeHydrogens(IAtomContainer mol, IAtomContainer atomContainer,
              List<IAtom> remove, Map<IAtom, IAtom> map)
focal_class.full_signature: private static IAtomContainer reComputeHydrogens(IAtomContainer mol, IAtomContainer atomContainer,
              List<IAtom> remove, Map<IAtom, IAtom> map)
focal_class.identifier: reComputeHydrogens
focal_class.modifiers: private static
focal_class.parameters: (IAtomContainer mol, IAtomContainer atomContainer,
              List<IAtom> remove, Map<IAtom, IAtom> map)
focal_class.return: IAtomContainer
focal_class.signature: IAtomContainer reComputeHydrogens(IAtomContainer mol, IAtomContainer atomContainer,
              List<IAtom> remove, Map<IAtom, IAtom> map)
focal_class.class_method_signature: SMSDNormalizer.cloneAndMarkNonHBonds(IAtomContainer mol, IAtomContainer atomContainer,
              List<IAtom> remove, Map<IAtom, IAtom> map)
focal_class.full_signature: private static IAtomContainer cloneAndMarkNonHBonds(IAtomContainer mol, IAtomContainer atomContainer,
              List<IAtom> remove, Map<IAtom, IAtom> map)
focal_class.identifier: cloneAndMarkNonHBonds
focal_class.modifiers: private static
focal_class.parameters: (IAtomContainer mol, IAtomContainer atomContainer,
              List<IAtom> remove, Map<IAtom, IAtom> map)
focal_class.return: IAtomContainer
focal_class.signature: IAtomContainer cloneAndMarkNonHBonds(IAtomContainer mol, IAtomContainer atomContainer,
              List<IAtom> remove, Map<IAtom, IAtom> map)
focal_class.class_method_signature: SMSDNormalizer.set2D(IAtomContainer container, int index, IAtom[] atoms)
focal_class.full_signature: private static void set2D(IAtomContainer container, int index, IAtom[] atoms)
focal_class.identifier: set2D
focal_class.modifiers: private static
focal_class.parameters: (IAtomContainer container, int index, IAtom[] atoms)
focal_class.return: void
focal_class.signature: void set2D(IAtomContainer container, int index, IAtom[] atoms)
focal_class.class_method_signature: SMSDNormalizer.set3D(IAtomContainer container, int index, IAtom[] atoms)
focal_class.full_signature: private static void set3D(IAtomContainer container, int index, IAtom[] atoms)
focal_class.identifier: set3D
focal_class.modifiers: private static
focal_class.parameters: (IAtomContainer container, int index, IAtom[] atoms)
focal_class.return: void
focal_class.signature: void set3D(IAtomContainer container, int index, IAtom[] atoms)
focal_class.class_method_signature: SMSDNormalizer.setFractionalPoint3d(IAtomContainer container, int index, IAtom[] atoms)
focal_class.full_signature: private static void setFractionalPoint3d(IAtomContainer container, int index, IAtom[] atoms)
focal_class.identifier: setFractionalPoint3d
focal_class.modifiers: private static
focal_class.parameters: (IAtomContainer container, int index, IAtom[] atoms)
focal_class.return: void
focal_class.signature: void setFractionalPoint3d(IAtomContainer container, int index, IAtom[] atoms)
focal_class.class_method_signature: SMSDNormalizer.setID(IAtomContainer container, int index, IAtom[] atoms)
focal_class.full_signature: private static void setID(IAtomContainer container, int index, IAtom[] atoms)
focal_class.identifier: setID
focal_class.modifiers: private static
focal_class.parameters: (IAtomContainer container, int index, IAtom[] atoms)
focal_class.return: void
focal_class.signature: void setID(IAtomContainer container, int index, IAtom[] atoms)
focal_class.class_method_signature: SMSDNormalizer.setHydrogenCount(IAtomContainer container, int index, IAtom[] atoms)
focal_class.full_signature: private static void setHydrogenCount(IAtomContainer container, int index, IAtom[] atoms)
focal_class.identifier: setHydrogenCount
focal_class.modifiers: private static
focal_class.parameters: (IAtomContainer container, int index, IAtom[] atoms)
focal_class.return: void
focal_class.signature: void setHydrogenCount(IAtomContainer container, int index, IAtom[] atoms)
focal_class.class_method_signature: SMSDNormalizer.setCharge(IAtomContainer container, int index, IAtom[] atoms)
focal_class.full_signature: private static void setCharge(IAtomContainer container, int index, IAtom[] atoms)
focal_class.identifier: setCharge
focal_class.modifiers: private static
focal_class.parameters: (IAtomContainer container, int index, IAtom[] atoms)
focal_class.return: void
focal_class.signature: void setCharge(IAtomContainer container, int index, IAtom[] atoms)
focal_class.class_method_signature: SMSDNormalizer.setStereoParity(IAtomContainer container, int index, IAtom[] atoms)
focal_class.full_signature: private static void setStereoParity(IAtomContainer container, int index, IAtom[] atoms)
focal_class.identifier: setStereoParity
focal_class.modifiers: private static
focal_class.parameters: (IAtomContainer container, int index, IAtom[] atoms)
focal_class.return: void
focal_class.signature: void setStereoParity(IAtomContainer container, int index, IAtom[] atoms)
focal_class.superclass: extends AtomContainerManipulator
focal_method.body: public static void aromatizeMolecule(IAtomContainer mol) {
  
          // need to find rings and aromaticity again since added H's
  
          IRingSet ringSet = null;
          try {
              AllRingsFinder arf = new AllRingsFinder();
              ringSet = arf.findAllRings(mol);
  
              // SSSRFinder s = new SSSRFinder(atomContainer);
              // srs = s.findEssentialRings();
  
          } catch (Exception e) {
              e.printStackTrace();
          }
  
          try {
              // figure out which atoms are in aromatic rings:
              //            printAtoms(atomContainer);
              SMSDNormalizer.percieveAtomTypesAndConfigureAtoms(mol);
              //            printAtoms(atomContainer);
              Aromaticity.cdkLegacy().apply(mol);
              //            printAtoms(atomContainer);
              // figure out which rings are aromatic:
              RingSetManipulator.markAromaticRings(ringSet);
              //            printAtoms(atomContainer);
              // figure out which simple (non cycles) rings are aromatic:
              // HueckelAromaticityDetector.detectAromaticity(atomContainer, srs);
          } catch (Exception e) {
              e.printStackTrace();
          }
  
          // only atoms in 6 membered rings are aromatic
          // determine largest ring that each atom is atom part of
  
          for (int i = 0; i <= mol.getAtomCount() - 1; i++) {
  
              mol.getAtom(i).setFlag(CDKConstants.ISAROMATIC, false);
  
              jloop: for (int j = 0; j <= ringSet.getAtomContainerCount() - 1; j++) {
                  //logger.debug(i+"\t"+j);
                  IRing ring = (IRing) ringSet.getAtomContainer(j);
                  if (!ring.getFlag(CDKConstants.ISAROMATIC)) {
                      continue jloop;
                  }
  
                  boolean haveatom = ring.contains(mol.getAtom(i));
  
                  //logger.debug("haveatom="+haveatom);
  
                  if (haveatom && ring.getAtomCount() == 6) {
                      mol.getAtom(i).setFlag(CDKConstants.ISAROMATIC, true);
                  }
              }
          }
      }
focal_method.class_method_signature: SMSDNormalizer.aromatizeMolecule(IAtomContainer mol)
focal_method.full_signature: public static void aromatizeMolecule(IAtomContainer mol)
focal_method.identifier: aromatizeMolecule
focal_method.invocations: findAllRings printStackTrace percieveAtomTypesAndConfigureAtoms apply cdkLegacy markAromaticRings printStackTrace getAtomCount setFlag getAtom getAtomContainerCount getAtomContainer getFlag contains getAtom getAtomCount setFlag getAtom
focal_method.modifiers: public static
focal_method.parameters: (IAtomContainer mol)
focal_method.return: void
focal_method.signature: void aromatizeMolecule(IAtomContainer mol)