test_class.declarator: builder = SilentChemObjectBuilder.getInstance()
test_class.modifier: private final static
test_class.original_string: private final static IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
test_class.type: IChemObjectBuilder
test_class.var_name: builder
test_class.declarator: lpcheck = new LonePairElectronChecker()
test_class.original_string: LonePairElectronChecker                 lpcheck = new LonePairElectronChecker();
test_class.type: LonePairElectronChecker
test_class.var_name: lpcheck
test_class.file: base/reaction/src/test/java/org/openscience/cdk/tools/StructureResonanceGeneratorTest.java
test_class.identifier: StructureResonanceGeneratorTest
test_class.superclass: extends CDKTestCase
test_case.body: @Test
      public void testFluoroethene() throws Exception {
          IAtomContainer molecule = builder.newInstance(IAtomContainer.class);
          molecule.addAtom(builder.newInstance(IAtom.class, "F"));
          molecule.addAtom(builder.newInstance(IAtom.class, "C"));
          molecule.addBond(0, 1, IBond.Order.SINGLE);
          molecule.addAtom(builder.newInstance(IAtom.class, "C"));
          molecule.addBond(1, 2, IBond.Order.DOUBLE);
          addExplicitHydrogens(molecule);
          AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(molecule);
          lpcheck.saturate(molecule);
  
          StructureResonanceGenerator gR = new StructureResonanceGenerator();
          IAtomContainerSet setOfMolecules = gR.getStructures(molecule);
  
          Assert.assertEquals(2, setOfMolecules.getAtomContainerCount());
  
          IAtomContainer molecule1 = builder.newInstance(IAtomContainer.class);
          molecule1.addAtom(builder.newInstance(IAtom.class, "F"));
          molecule1.addAtom(builder.newInstance(IAtom.class, "C"));
          molecule1.addBond(0, 1, IBond.Order.DOUBLE);
          molecule1.addAtom(builder.newInstance(IAtom.class, "C"));
          molecule1.addBond(1, 2, IBond.Order.SINGLE);
          molecule1.getAtom(0).setFormalCharge(+1); // workaround for bug #1875949
          molecule1.getAtom(2).setFormalCharge(-1);
          addExplicitHydrogens(molecule1);
          AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(molecule1);
          lpcheck.saturate(molecule1);
  
          QueryAtomContainer qAC = QueryAtomContainerCreator.createSymbolAndChargeQueryContainer(molecule1);
          Assert.assertTrue(new UniversalIsomorphismTester().isIsomorph(setOfMolecules.getAtomContainer(1), qAC));
      }
test_case.class_method_signature: StructureResonanceGeneratorTest.testFluoroethene()
test_case.full_signature: @Test public void testFluoroethene()
test_case.identifier: testFluoroethene
test_case.invocations: newInstance addAtom newInstance addAtom newInstance addBond addAtom newInstance addBond addExplicitHydrogens percieveAtomTypesAndConfigureAtoms saturate getStructures assertEquals getAtomContainerCount newInstance addAtom newInstance addAtom newInstance addBond addAtom newInstance addBond setFormalCharge getAtom setFormalCharge getAtom addExplicitHydrogens percieveAtomTypesAndConfigureAtoms saturate createSymbolAndChargeQueryContainer assertTrue isIsomorph getAtomContainer
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFluoroethene()
focal_class.declarator: logger        = LoggingToolFactory
                                                           .createLoggingTool(StructureResonanceGenerator.class)
focal_class.modifier: private
focal_class.original_string: private ILoggingTool           logger        = LoggingToolFactory
                                                           .createLoggingTool(StructureResonanceGenerator.class);
focal_class.type: ILoggingTool
focal_class.var_name: logger
focal_class.declarator: reactionsList = new ArrayList<IReactionProcess>()
focal_class.modifier: private
focal_class.original_string: private List<IReactionProcess> reactionsList = new ArrayList<IReactionProcess>();
focal_class.type: List<IReactionProcess>
focal_class.var_name: reactionsList
focal_class.declarator: lookingSymmetry
focal_class.modifier: private
focal_class.original_string: private boolean                lookingSymmetry;
focal_class.type: boolean
focal_class.var_name: lookingSymmetry
focal_class.declarator: maxStructures = 50
focal_class.modifier: private
focal_class.original_string: private int                    maxStructures = 50;
focal_class.type: int
focal_class.var_name: maxStructures
focal_class.file: base/reaction/src/main/java/org/openscience/cdk/tools/StructureResonanceGenerator.java
focal_class.identifier: StructureResonanceGenerator
focal_class.class_method_signature: StructureResonanceGenerator.StructureResonanceGenerator()
focal_class.full_signature: public  StructureResonanceGenerator()
focal_class.identifier: StructureResonanceGenerator
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  StructureResonanceGenerator()
focal_class.class_method_signature: StructureResonanceGenerator.StructureResonanceGenerator(boolean lookingSymmetry)
focal_class.full_signature: public  StructureResonanceGenerator(boolean lookingSymmetry)
focal_class.identifier: StructureResonanceGenerator
focal_class.modifiers: public
focal_class.parameters: (boolean lookingSymmetry)
focal_class.signature:  StructureResonanceGenerator(boolean lookingSymmetry)
focal_class.class_method_signature: StructureResonanceGenerator.setReactions(List<IReactionProcess> newReactionsList)
focal_class.full_signature: public void setReactions(List<IReactionProcess> newReactionsList)
focal_class.identifier: setReactions
focal_class.modifiers: public
focal_class.parameters: (List<IReactionProcess> newReactionsList)
focal_class.return: void
focal_class.signature: void setReactions(List<IReactionProcess> newReactionsList)
focal_class.class_method_signature: StructureResonanceGenerator.getReactions()
focal_class.full_signature: public List<IReactionProcess> getReactions()
focal_class.identifier: getReactions
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<IReactionProcess>
focal_class.signature: List<IReactionProcess> getReactions()
focal_class.class_method_signature: StructureResonanceGenerator.setMaximalStructures(int maxStruct)
focal_class.full_signature: public void setMaximalStructures(int maxStruct)
focal_class.identifier: setMaximalStructures
focal_class.modifiers: public
focal_class.parameters: (int maxStruct)
focal_class.return: void
focal_class.signature: void setMaximalStructures(int maxStruct)
focal_class.class_method_signature: StructureResonanceGenerator.getMaximalStructures()
focal_class.full_signature: public int getMaximalStructures()
focal_class.identifier: getMaximalStructures
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMaximalStructures()
focal_class.class_method_signature: StructureResonanceGenerator.setDefaultReactions()
focal_class.full_signature: public void setDefaultReactions()
focal_class.identifier: setDefaultReactions
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void setDefaultReactions()
focal_class.class_method_signature: StructureResonanceGenerator.callDefaultReactions()
focal_class.full_signature: private void callDefaultReactions()
focal_class.identifier: callDefaultReactions
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void callDefaultReactions()
focal_class.class_method_signature: StructureResonanceGenerator.getStructures(IAtomContainer molecule)
focal_class.full_signature: public IAtomContainerSet getStructures(IAtomContainer molecule)
focal_class.identifier: getStructures
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer molecule)
focal_class.return: IAtomContainerSet
focal_class.signature: IAtomContainerSet getStructures(IAtomContainer molecule)
focal_class.class_method_signature: StructureResonanceGenerator.getContainers(IAtomContainer molecule)
focal_class.full_signature: public IAtomContainerSet getContainers(IAtomContainer molecule)
focal_class.identifier: getContainers
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer molecule)
focal_class.return: IAtomContainerSet
focal_class.signature: IAtomContainerSet getContainers(IAtomContainer molecule)
focal_class.class_method_signature: StructureResonanceGenerator.getContainer(IAtomContainer molecule, IAtom atom)
focal_class.full_signature: public IAtomContainer getContainer(IAtomContainer molecule, IAtom atom)
focal_class.identifier: getContainer
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer molecule, IAtom atom)
focal_class.return: IAtomContainer
focal_class.signature: IAtomContainer getContainer(IAtomContainer molecule, IAtom atom)
focal_class.class_method_signature: StructureResonanceGenerator.getContainer(IAtomContainer molecule, IBond bond)
focal_class.full_signature: public IAtomContainer getContainer(IAtomContainer molecule, IBond bond)
focal_class.identifier: getContainer
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer molecule, IBond bond)
focal_class.return: IAtomContainer
focal_class.signature: IAtomContainer getContainer(IAtomContainer molecule, IBond bond)
focal_class.class_method_signature: StructureResonanceGenerator.existAC(IAtomContainerSet set, IAtomContainer atomContainer)
focal_class.full_signature: private boolean existAC(IAtomContainerSet set, IAtomContainer atomContainer)
focal_class.identifier: existAC
focal_class.modifiers: private
focal_class.parameters: (IAtomContainerSet set, IAtomContainer atomContainer)
focal_class.return: boolean
focal_class.signature: boolean existAC(IAtomContainerSet set, IAtomContainer atomContainer)
focal_method.body: public IAtomContainerSet getStructures(IAtomContainer molecule) {
          int countStructure = 0;
          IAtomContainerSet setOfMol = molecule.getBuilder().newInstance(IAtomContainerSet.class);
          setOfMol.addAtomContainer(molecule);
  
          for (int i = 0; i < setOfMol.getAtomContainerCount(); i++) {
              IAtomContainer mol = setOfMol.getAtomContainer(i);
              for (IReactionProcess aReactionsList : reactionsList) {
                  IReactionProcess reaction = aReactionsList;
                  IAtomContainerSet setOfReactants = molecule.getBuilder().newInstance(IAtomContainerSet.class);
                  setOfReactants.addAtomContainer(mol);
                  try {
                      IReactionSet setOfReactions = reaction.initiate(setOfReactants, null);
                      if (setOfReactions.getReactionCount() != 0)
                          for (int k = 0; k < setOfReactions.getReactionCount(); k++)
                              for (int j = 0; j < setOfReactions.getReaction(k).getProducts().getAtomContainerCount(); j++) {
                                  IAtomContainer product = setOfReactions.getReaction(k).getProducts()
                                          .getAtomContainer(j);
                                  if (!existAC(setOfMol, product)) {
                                      setOfMol.addAtomContainer(product);
                                      countStructure++;
                                      if (countStructure > maxStructures) return setOfMol;
                                  }
                              }
                  } catch (CDKException e) {
                      e.printStackTrace();
                  }
              }
          }
          return setOfMol;
      }
focal_method.class_method_signature: StructureResonanceGenerator.getStructures(IAtomContainer molecule)
focal_method.full_signature: public IAtomContainerSet getStructures(IAtomContainer molecule)
focal_method.identifier: getStructures
focal_method.invocations: newInstance getBuilder addAtomContainer getAtomContainerCount getAtomContainer newInstance getBuilder addAtomContainer initiate getReactionCount getReactionCount getAtomContainerCount getProducts getReaction getAtomContainer getProducts getReaction existAC addAtomContainer printStackTrace
focal_method.modifiers: public
focal_method.parameters: (IAtomContainer molecule)
focal_method.return: IAtomContainerSet
focal_method.signature: IAtomContainerSet getStructures(IAtomContainer molecule)