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: descriptor/qsaratomic/src/test/java/org/openscience/cdk/qsar/descriptors/atomic/PartialSigmaChargeDescriptorTest.java
test_class.identifier: PartialSigmaChargeDescriptorTest
test_class.superclass: extends AtomicDescriptorTest
test_case.body: @Test
      public void testPartialSigmaChargeDescriptor_Allyl_bromide() throws ClassNotFoundException, CDKException,
              java.lang.Exception {
          double testResult = -0.1366;/*
                                       * from Petra online:
                                       * http://www2.chemie.uni-
                                       * erlangen.de/services/petra/smiles.phtml
                                       */
  
          IAtomContainer molecule = builder.newInstance(IAtomContainer.class);
          molecule.addAtom(builder.newInstance(IAtom.class, "C"));
          molecule.addAtom(builder.newInstance(IAtom.class, "C"));
          molecule.addBond(0, 1, IBond.Order.DOUBLE);
          molecule.addAtom(builder.newInstance(IAtom.class, "C"));
          molecule.addBond(1, 2, IBond.Order.SINGLE);
          molecule.addAtom(builder.newInstance(IAtom.class, "Br"));
          molecule.addBond(2, 3, IBond.Order.SINGLE);
  
          AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(molecule);
          addExplicitHydrogens(molecule);
          lpcheck.saturate(molecule);
  
          double result = ((DoubleResult) descriptor.calculate(molecule.getAtom(3), molecule).getValue()).doubleValue();
          Assert.assertEquals(testResult, result, 0.01);
      }
test_case.class_method_signature: PartialSigmaChargeDescriptorTest.testPartialSigmaChargeDescriptor_Allyl_bromide()
test_case.full_signature: @Test public void testPartialSigmaChargeDescriptor_Allyl_bromide()
test_case.identifier: testPartialSigmaChargeDescriptor_Allyl_bromide
test_case.invocations: newInstance addAtom newInstance addAtom newInstance addBond addAtom newInstance addBond addAtom newInstance addBond percieveAtomTypesAndConfigureAtoms addExplicitHydrogens saturate doubleValue getValue calculate getAtom assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testPartialSigmaChargeDescriptor_Allyl_bromide()
focal_class.declarator: NAMES = {"partialSigmaCharge"}
focal_class.modifier: private static final
focal_class.original_string: private static final String[]          NAMES = {"partialSigmaCharge"};
focal_class.type: String[]
focal_class.var_name: NAMES
focal_class.declarator: peoe  = null
focal_class.modifier: private
focal_class.original_string: private GasteigerMarsiliPartialCharges peoe  = null;
focal_class.type: GasteigerMarsiliPartialCharges
focal_class.var_name: peoe
focal_class.declarator: maxIterations
focal_class.modifier: private
focal_class.original_string: private int                            maxIterations;
focal_class.type: int
focal_class.var_name: maxIterations
focal_class.file: descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/PartialSigmaChargeDescriptor.java
focal_class.identifier: PartialSigmaChargeDescriptor
focal_class.class_method_signature: PartialSigmaChargeDescriptor.PartialSigmaChargeDescriptor()
focal_class.full_signature: public  PartialSigmaChargeDescriptor()
focal_class.identifier: PartialSigmaChargeDescriptor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  PartialSigmaChargeDescriptor()
focal_class.class_method_signature: PartialSigmaChargeDescriptor.getSpecification()
focal_class.full_signature: @Override public DescriptorSpecification getSpecification()
focal_class.identifier: getSpecification
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: DescriptorSpecification
focal_class.signature: DescriptorSpecification getSpecification()
focal_class.class_method_signature: PartialSigmaChargeDescriptor.setParameters(Object[] params)
focal_class.full_signature: @Override public void setParameters(Object[] params)
focal_class.identifier: setParameters
focal_class.modifiers: @Override public
focal_class.parameters: (Object[] params)
focal_class.return: void
focal_class.signature: void setParameters(Object[] params)
focal_class.class_method_signature: PartialSigmaChargeDescriptor.getParameters()
focal_class.full_signature: @Override public Object[] getParameters()
focal_class.identifier: getParameters
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Object[]
focal_class.signature: Object[] getParameters()
focal_class.class_method_signature: PartialSigmaChargeDescriptor.getDescriptorNames()
focal_class.full_signature: @Override public String[] getDescriptorNames()
focal_class.identifier: getDescriptorNames
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String[]
focal_class.signature: String[] getDescriptorNames()
focal_class.class_method_signature: PartialSigmaChargeDescriptor.calculate(IAtom atom, IAtomContainer ac)
focal_class.full_signature: @Override public DescriptorValue calculate(IAtom atom, IAtomContainer ac)
focal_class.identifier: calculate
focal_class.modifiers: @Override public
focal_class.parameters: (IAtom atom, IAtomContainer ac)
focal_class.return: DescriptorValue
focal_class.signature: DescriptorValue calculate(IAtom atom, IAtomContainer ac)
focal_class.class_method_signature: PartialSigmaChargeDescriptor.getParameterNames()
focal_class.full_signature: @Override public String[] getParameterNames()
focal_class.identifier: getParameterNames
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String[]
focal_class.signature: String[] getParameterNames()
focal_class.class_method_signature: PartialSigmaChargeDescriptor.getParameterType(String name)
focal_class.full_signature: @Override public Object getParameterType(String name)
focal_class.identifier: getParameterType
focal_class.modifiers: @Override public
focal_class.parameters: (String name)
focal_class.return: Object
focal_class.signature: Object getParameterType(String name)
focal_class.superclass: extends AbstractAtomicDescriptor
focal_method.body: @Override
      public DescriptorValue calculate(IAtom atom, IAtomContainer ac) {
          if (!isCachedAtomContainer(ac)) {
              Double[] org = new Double[ac.getAtomCount()];
              for (int i = 0; i < org.length; i++)
                  org[i] = ac.getAtom(i).getCharge();
              IAtomContainer mol = atom.getBuilder().newInstance(IAtomContainer.class, ac);
              if (maxIterations != 0) peoe.setMaxGasteigerIters(maxIterations);
              try {
                  peoe.assignGasteigerMarsiliSigmaPartialCharges(mol, true);
                  for (int i = 0; i < ac.getAtomCount(); i++) {
                      // assume same order, so mol.getAtom(i) == ac.getAtom(i)
                      cacheDescriptorValue(ac.getAtom(i), ac, new DoubleResult(mol.getAtom(i).getCharge()));
                  }
              } catch (Exception e) {
                  return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(
                          Double.NaN), NAMES, e);
              }
              for (int i = 0; i < org.length; i++)
                  mol.getAtom(i).setCharge(org[i]);
          }
          return getCachedDescriptorValue(atom) != null ? new DescriptorValue(getSpecification(), getParameterNames(),
                  getParameters(), getCachedDescriptorValue(atom), NAMES) : null;
      }
focal_method.class_method_signature: PartialSigmaChargeDescriptor.calculate(IAtom atom, IAtomContainer ac)
focal_method.full_signature: @Override public DescriptorValue calculate(IAtom atom, IAtomContainer ac)
focal_method.identifier: calculate
focal_method.invocations: isCachedAtomContainer getAtomCount getCharge getAtom newInstance getBuilder setMaxGasteigerIters assignGasteigerMarsiliSigmaPartialCharges getAtomCount cacheDescriptorValue getAtom getCharge getAtom getSpecification getParameterNames getParameters setCharge getAtom getCachedDescriptorValue getSpecification getParameterNames getParameters getCachedDescriptorValue
focal_method.modifiers: @Override public
focal_method.parameters: (IAtom atom, IAtomContainer ac)
focal_method.return: DescriptorValue
focal_method.signature: DescriptorValue calculate(IAtom atom, IAtomContainer ac)