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
      @Category(SlowTest.class)
      public void testAllylRadical() throws Exception {
          IAtomContainer molecule = builder.newInstance(IAtomContainer.class);
          molecule.addAtom(builder.newInstance(IAtom.class, "C"));
          molecule.getAtom(0).setFormalCharge(1);
          molecule.addAtom(builder.newInstance(IAtom.class, "C"));
          molecule.addAtom(builder.newInstance(IAtom.class, "C"));
          molecule.addAtom(builder.newInstance(IAtom.class, "C")); // to remove symmetry :)
          molecule.addBond(0, 1, IBond.Order.SINGLE);
          molecule.addBond(1, 2, IBond.Order.DOUBLE);
          molecule.addBond(2, 3, IBond.Order.SINGLE);
          addExplicitHydrogens(molecule);
          molecule.getAtom(0).setFormalCharge(0);
          molecule.addSingleElectron(new SingleElectron(molecule.getAtom(0)));
          Assert.assertEquals(11, molecule.getAtomCount());
  
          AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(molecule);
  
          StructureResonanceGenerator gRI = new StructureResonanceGenerator();
          IAtomContainerSet resonanceStructures = gRI.getStructures(molecule);
          Assert.assertEquals(2, resonanceStructures.getAtomContainerCount());
      }
test_case.class_method_signature: StructureResonanceGeneratorTest.testAllylRadical()
test_case.full_signature: @Test @Category(SlowTest.class) public void testAllylRadical()
test_case.identifier: testAllylRadical
test_case.invocations: newInstance addAtom newInstance setFormalCharge getAtom addAtom newInstance addAtom newInstance addAtom newInstance addBond addBond addBond addExplicitHydrogens setFormalCharge getAtom addSingleElectron getAtom assertEquals getAtomCount percieveAtomTypesAndConfigureAtoms getStructures assertEquals getAtomContainerCount
test_case.modifiers: @Test @Category(SlowTest.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAllylRadical()
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)