test_class.file: legacy/src/test/java/org/openscience/cdk/normalize/SMSDNormalizerTest.java
test_class.identifier: SMSDNormalizerTest
test_case.body: @Test
      public void testMakeDeepCopy() throws InvalidSmilesException {
          String rawMolSmiles = "[H]POOSC(Br)C(Cl)C(F)I";
          SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance());
          IAtomContainer container = sp.parseSmiles(rawMolSmiles);
  
          int counter = 0;
          for (IAtom a : container.atoms()) {
              a.setID(String.valueOf(counter++));
          }
  
          IAtomContainer result = SMSDNormalizer.makeDeepCopy(container);
          for (int i = 0; i < result.getAtomCount(); i++) {
              assertEquals(result.getAtom(i).getSymbol(), container.getAtom(i).getSymbol());
              assertEquals(result.getAtom(i).getID(), container.getAtom(i).getID());
          }
  
      }
test_case.class_method_signature: SMSDNormalizerTest.testMakeDeepCopy()
test_case.full_signature: @Test public void testMakeDeepCopy()
test_case.identifier: testMakeDeepCopy
test_case.invocations: getInstance parseSmiles atoms setID valueOf makeDeepCopy getAtomCount assertEquals getSymbol getAtom getSymbol getAtom assertEquals getID getAtom getID getAtom
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMakeDeepCopy()
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 IAtomContainer makeDeepCopy(IAtomContainer container) {
  
          IAtomContainer newAtomContainer = DefaultChemObjectBuilder.getInstance().newInstance(IAtomContainer.class);
  
          int lonePairCount = container.getLonePairCount();
          int singleElectronCount = container.getSingleElectronCount();
  
          ILonePair[] lonePairs = new ILonePair[lonePairCount];
          ISingleElectron[] singleElectrons = new ISingleElectron[singleElectronCount];
  
          //      Deep copy of the Atoms
          IAtom[] atoms = copyAtoms(container, newAtomContainer);
  
          //      Deep copy of the bonds
          copyBonds(atoms, container, newAtomContainer);
  
          //      Deep copy of the LonePairs
          for (int index = 0; index < container.getLonePairCount(); index++) {
  
              if (container.getAtom(index).getSymbol().equalsIgnoreCase("R")) {
                  lonePairs[index] = DefaultChemObjectBuilder.getInstance().newInstance(ILonePair.class,
                          container.getAtom(index));
              }
              newAtomContainer.addLonePair(lonePairs[index]);
          }
  
          for (int index = 0; index < container.getSingleElectronCount(); index++) {
              singleElectrons[index] = DefaultChemObjectBuilder.getInstance().newInstance(ISingleElectron.class,
                      container.getAtom(index));
              newAtomContainer.addSingleElectron(singleElectrons[index]);
  
          }
          newAtomContainer.addProperties(container.getProperties());
          newAtomContainer.setFlags(container.getFlags());
  
          newAtomContainer.setID(container.getID());
  
          newAtomContainer.notifyChanged();
          return newAtomContainer;
  
      }
focal_method.class_method_signature: SMSDNormalizer.makeDeepCopy(IAtomContainer container)
focal_method.full_signature: public static IAtomContainer makeDeepCopy(IAtomContainer container)
focal_method.identifier: makeDeepCopy
focal_method.invocations: newInstance getInstance getLonePairCount getSingleElectronCount copyAtoms copyBonds getLonePairCount equalsIgnoreCase getSymbol getAtom newInstance getInstance getAtom addLonePair getSingleElectronCount newInstance getInstance getAtom addSingleElectron addProperties getProperties setFlags getFlags setID getID notifyChanged
focal_method.modifiers: public static
focal_method.parameters: (IAtomContainer container)
focal_method.return: IAtomContainer
focal_method.signature: IAtomContainer makeDeepCopy(IAtomContainer container)