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/PartialPiChargeDescriptorTest.java
test_class.identifier: PartialPiChargeDescriptorTest
test_class.superclass: extends AtomicDescriptorTest
test_case.body: @Test
      @Category(SlowTest.class)
      public void testPartialPiChargeDescriptor_Methyl_Fluoride() throws
              Exception {
          double[] testResult = {0.0, 0.0, 0.0, 0.0, 0.0};/*
                                                           * from Petra online:
                                                           * http
                                                           * ://www2.chemie.uni
                                                           * -erlangen
                                                           * .de/services/
                                                           * petra/smiles.phtml
                                                           */
          IAtomicDescriptor descriptor = new PartialPiChargeDescriptor();
  
          IAtomContainer molecule = builder.newInstance(IAtomContainer.class);
          molecule.addAtom(new Atom("F"));
          molecule.addAtom(new Atom("C"));
          molecule.addBond(0, 1, IBond.Order.SINGLE);
  
          AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(molecule);
          addExplicitHydrogens(molecule);
          lpcheck.saturate(molecule);
  
          for (int i = 0; i < molecule.getAtomCount(); i++) {
              double result = ((DoubleResult) descriptor.calculate(molecule.getAtom(i), molecule).getValue())
                      .doubleValue();
              Assert.assertEquals(testResult[i], result, 0.0001);
          }
      }
test_case.class_method_signature: PartialPiChargeDescriptorTest.testPartialPiChargeDescriptor_Methyl_Fluoride()
test_case.full_signature: @Test @Category(SlowTest.class) public void testPartialPiChargeDescriptor_Methyl_Fluoride()
test_case.identifier: testPartialPiChargeDescriptor_Methyl_Fluoride
test_case.invocations: newInstance addAtom addAtom addBond percieveAtomTypesAndConfigureAtoms addExplicitHydrogens saturate getAtomCount doubleValue getValue calculate getAtom assertEquals
test_case.modifiers: @Test @Category(SlowTest.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testPartialPiChargeDescriptor_Methyl_Fluoride()
focal_class.declarator: NAMES = {"pepe"}
focal_class.modifier: private static final
focal_class.original_string: private static final String[]       NAMES = {"pepe"};
focal_class.type: String[]
focal_class.var_name: NAMES
focal_class.declarator: pepe          = null
focal_class.modifier: private
focal_class.original_string: private GasteigerPEPEPartialCharges pepe          = null;
focal_class.type: GasteigerPEPEPartialCharges
focal_class.var_name: pepe
focal_class.declarator: maxIterations = -1
focal_class.modifier: private
focal_class.original_string: private int                         maxIterations = -1;
focal_class.type: int
focal_class.var_name: maxIterations
focal_class.declarator: maxResonStruc = -1
focal_class.modifier: private
focal_class.original_string: private int                         maxResonStruc = -1;
focal_class.type: int
focal_class.var_name: maxResonStruc
focal_class.declarator: lpeChecker    = true
focal_class.modifier: private
focal_class.original_string: private boolean                     lpeChecker    = true;
focal_class.type: boolean
focal_class.var_name: lpeChecker
focal_class.file: descriptor/qsaratomic/src/main/java/org/openscience/cdk/qsar/descriptors/atomic/PartialPiChargeDescriptor.java
focal_class.identifier: PartialPiChargeDescriptor
focal_class.class_method_signature: PartialPiChargeDescriptor.PartialPiChargeDescriptor()
focal_class.full_signature: public  PartialPiChargeDescriptor()
focal_class.identifier: PartialPiChargeDescriptor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  PartialPiChargeDescriptor()
focal_class.class_method_signature: PartialPiChargeDescriptor.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: PartialPiChargeDescriptor.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: PartialPiChargeDescriptor.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: PartialPiChargeDescriptor.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: PartialPiChargeDescriptor.getDummyDescriptorValue(Exception e)
focal_class.full_signature: private DescriptorValue getDummyDescriptorValue(Exception e)
focal_class.identifier: getDummyDescriptorValue
focal_class.modifiers: private
focal_class.parameters: (Exception e)
focal_class.return: DescriptorValue
focal_class.signature: DescriptorValue getDummyDescriptorValue(Exception e)
focal_class.class_method_signature: PartialPiChargeDescriptor.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: PartialPiChargeDescriptor.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: PartialPiChargeDescriptor.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) {
          // FIXME: for now I'll cache a few modified atomic properties, and restore them at the end of this method
          Double originalCharge = atom.getCharge();
          String originalAtomtypeName = atom.getAtomTypeName();
          Integer originalNeighborCount = atom.getFormalNeighbourCount();
          Integer originalValency = atom.getValency();
          IAtomType.Hybridization originalHybridization = atom.getHybridization();
          Double originalBondOrderSum = atom.getBondOrderSum();
          Order originalMaxBondOrder = atom.getMaxBondOrder();
          if (!isCachedAtomContainer(ac)) {
              try {
                  AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(ac);
              } catch (CDKException e) {
                  return getDummyDescriptorValue(e);
              }
  
              if (lpeChecker) {
                  LonePairElectronChecker lpcheck = new LonePairElectronChecker();
                  try {
                      lpcheck.saturate(ac);
                  } catch (CDKException e) {
                      return getDummyDescriptorValue(e);
                  }
              }
  
              if (maxIterations != -1) pepe.setMaxGasteigerIters(maxIterations);
              if (maxResonStruc != -1) pepe.setMaxResoStruc(maxResonStruc);
              try {
                  for (int i = 0; i < ac.getAtomCount(); i++)
                      ac.getAtom(i).setCharge(0.0);
                  pepe.assignGasteigerPiPartialCharges(ac, 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(ac.getAtom(i).getCharge()));
                  }
              } catch (Exception exception) {
                  return getDummyDescriptorValue(exception);
              }
          }
          // restore original props
          atom.setCharge(originalCharge);
          atom.setAtomTypeName(originalAtomtypeName);
          atom.setFormalNeighbourCount(originalNeighborCount);
          atom.setValency(originalValency);
          atom.setHybridization(originalHybridization);
          atom.setMaxBondOrder(originalMaxBondOrder);
          atom.setBondOrderSum(originalBondOrderSum);
  
          return getCachedDescriptorValue(atom) != null ? new DescriptorValue(getSpecification(), getParameterNames(),
                  getParameters(), getCachedDescriptorValue(atom), NAMES) : null;
      }
focal_method.class_method_signature: PartialPiChargeDescriptor.calculate(IAtom atom, IAtomContainer ac)
focal_method.full_signature: @Override public DescriptorValue calculate(IAtom atom, IAtomContainer ac)
focal_method.identifier: calculate
focal_method.invocations: getCharge getAtomTypeName getFormalNeighbourCount getValency getHybridization getBondOrderSum getMaxBondOrder isCachedAtomContainer percieveAtomTypesAndConfigureAtoms getDummyDescriptorValue saturate getDummyDescriptorValue setMaxGasteigerIters setMaxResoStruc getAtomCount setCharge getAtom assignGasteigerPiPartialCharges getAtomCount cacheDescriptorValue getAtom getCharge getAtom getDummyDescriptorValue setCharge setAtomTypeName setFormalNeighbourCount setValency setHybridization setMaxBondOrder setBondOrderSum 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)