test_class.file: descriptor/qsarbond/src/test/java/org/openscience/cdk/qsar/descriptors/bond/BondPartialSigmaChargeDescriptorTest.java
test_class.identifier: BondPartialSigmaChargeDescriptorTest
test_class.superclass: extends BondDescriptorTest
test_case.body: @Test
      public void testBondSigmaElectronegativityDescriptor_Methyl_chloride() throws ClassNotFoundException, CDKException,
              java.lang.Exception {
          double[] testResult = {0.2137, 0.0075};/*
                                                  * from Petra online:
                                                  * http://www2.
                                                  * chemie.uni-erlangen
                                                  * .de/services
                                                  * /petra/smiles.phtml
                                                  */
  
          SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance());
          IAtomContainer mol = sp.parseSmiles("CCl");
          addExplicitHydrogens(mol);
          for (int i = 0; i < 2; i++) {
              double result = ((DoubleResult) descriptor.calculate(mol.getBond(i), mol).getValue()).doubleValue();
              Assert.assertEquals(testResult[i], result, 0.05);
          }
      }
test_case.class_method_signature: BondPartialSigmaChargeDescriptorTest.testBondSigmaElectronegativityDescriptor_Methyl_chloride()
test_case.full_signature: @Test public void testBondSigmaElectronegativityDescriptor_Methyl_chloride()
test_case.identifier: testBondSigmaElectronegativityDescriptor_Methyl_chloride
test_case.invocations: getInstance parseSmiles addExplicitHydrogens doubleValue getValue calculate getBond assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testBondSigmaElectronegativityDescriptor_Methyl_chloride()
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.declarator: NAMES = {"peoeB"}
focal_class.modifier: private static final
focal_class.original_string: private static final String[] NAMES = {"peoeB"};
focal_class.type: String[]
focal_class.var_name: NAMES
focal_class.file: descriptor/qsarbond/src/main/java/org/openscience/cdk/qsar/descriptors/bond/BondPartialSigmaChargeDescriptor.java
focal_class.identifier: BondPartialSigmaChargeDescriptor
focal_class.class_method_signature: BondPartialSigmaChargeDescriptor.BondPartialSigmaChargeDescriptor()
focal_class.full_signature: public  BondPartialSigmaChargeDescriptor()
focal_class.identifier: BondPartialSigmaChargeDescriptor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  BondPartialSigmaChargeDescriptor()
focal_class.class_method_signature: BondPartialSigmaChargeDescriptor.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: BondPartialSigmaChargeDescriptor.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: BondPartialSigmaChargeDescriptor.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: BondPartialSigmaChargeDescriptor.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: BondPartialSigmaChargeDescriptor.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: BondPartialSigmaChargeDescriptor.calculate(IBond bond, IAtomContainer ac)
focal_class.full_signature: @Override public DescriptorValue calculate(IBond bond, IAtomContainer ac)
focal_class.identifier: calculate
focal_class.modifiers: @Override public
focal_class.parameters: (IBond bond, IAtomContainer ac)
focal_class.return: DescriptorValue
focal_class.signature: DescriptorValue calculate(IBond bond, IAtomContainer ac)
focal_class.class_method_signature: BondPartialSigmaChargeDescriptor.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: BondPartialSigmaChargeDescriptor.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 AbstractBondDescriptor
focal_method.body: @Override
      public DescriptorValue calculate(IBond bond, IAtomContainer ac) {
          // FIXME: for now I'll cache a few modified atomic properties, and restore them at the end of this method
          Double originalCharge1 = bond.getBegin().getCharge();
          Double originalCharge2 = bond.getEnd().getCharge();
          if (!isCachedAtomContainer(ac)) {
              IAtomContainer mol = ac.getBuilder().newInstance(IAtomContainer.class, ac);
              if (maxIterations != 0) peoe.setMaxGasteigerIters(maxIterations);
              try {
                  peoe.assignGasteigerMarsiliSigmaPartialCharges(mol, true);
                  for (Iterator<IBond> it = ac.bonds().iterator(); it.hasNext();) {
                      IBond bondi = it.next();
                      double result = Math.abs(bondi.getBegin().getCharge() - bondi.getEnd().getCharge());
                      cacheDescriptorValue(bondi, ac, new DoubleResult(result));
                  }
              } catch (Exception ex1) {
                  return getDummyDescriptorValue(ex1);
              }
          }
          bond.getBegin().setCharge(originalCharge1);
          bond.getEnd().setCharge(originalCharge2);
          return getCachedDescriptorValue(bond) != null ? new DescriptorValue(getSpecification(), getParameterNames(),
                  getParameters(), getCachedDescriptorValue(bond), NAMES) : null;
      }
focal_method.class_method_signature: BondPartialSigmaChargeDescriptor.calculate(IBond bond, IAtomContainer ac)
focal_method.full_signature: @Override public DescriptorValue calculate(IBond bond, IAtomContainer ac)
focal_method.identifier: calculate
focal_method.invocations: getCharge getBegin getCharge getEnd isCachedAtomContainer newInstance getBuilder setMaxGasteigerIters assignGasteigerMarsiliSigmaPartialCharges iterator bonds hasNext next abs getCharge getBegin getCharge getEnd cacheDescriptorValue getDummyDescriptorValue setCharge getBegin setCharge getEnd getCachedDescriptorValue getSpecification getParameterNames getParameters getCachedDescriptorValue
focal_method.modifiers: @Override public
focal_method.parameters: (IBond bond, IAtomContainer ac)
focal_method.return: DescriptorValue
focal_method.signature: DescriptorValue calculate(IBond bond, IAtomContainer ac)