test_class.file: descriptor/qsarbond/src/test/java/org/openscience/cdk/qsar/descriptors/bond/BondSigmaElectronegativityDescriptorTest.java
test_class.identifier: BondSigmaElectronegativityDescriptorTest
test_class.superclass: extends BondDescriptorTest
test_case.body: @Test
      public void testBondSigmaElectronegativityDescriptor_Allyl_bromide() throws java.lang.Exception {
          double[] testResult = {0.2396, 0.3635, 1.7086, 0.3635, 0.338, 0.574, 0.969, 0.969}; /*
                                                                                               * from
                                                                                               * Petra
                                                                                               * online
                                                                                               * :
                                                                                               * http
                                                                                               * :
                                                                                               * /
                                                                                               * /
                                                                                               * www2
                                                                                               * .
                                                                                               * chemie
                                                                                               * .
                                                                                               * uni
                                                                                               * -
                                                                                               * erlangen
                                                                                               * .
                                                                                               * de
                                                                                               * /
                                                                                               * services
                                                                                               * /
                                                                                               * petra
                                                                                               * /
                                                                                               * smiles
                                                                                               * .
                                                                                               * phtml
                                                                                               */
  
          SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance());
          IAtomContainer mol = sp.parseSmiles("C=CCBr");
          AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
          addExplicitHydrogens(mol);
  
          for (int i = 0; i < 8; i++) {
              double result = ((DoubleResult) descriptor.calculate(mol.getBond(i), mol).getValue()).doubleValue();
              Assert.assertEquals(testResult[i], result, 0.03);
          }
      }
test_case.class_method_signature: BondSigmaElectronegativityDescriptorTest.testBondSigmaElectronegativityDescriptor_Allyl_bromide()
test_case.full_signature: @Test public void testBondSigmaElectronegativityDescriptor_Allyl_bromide()
test_case.identifier: testBondSigmaElectronegativityDescriptor_Allyl_bromide
test_case.invocations: getInstance parseSmiles percieveAtomTypesAndConfigureAtoms addExplicitHydrogens doubleValue getValue calculate getBond assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testBondSigmaElectronegativityDescriptor_Allyl_bromide()
focal_class.declarator: maxIterations = 6
focal_class.modifier: private
focal_class.original_string: private int maxIterations = 6;
focal_class.type: int
focal_class.var_name: maxIterations
focal_class.declarator: electronegativity
focal_class.modifier: private
focal_class.original_string: private Electronegativity electronegativity;
focal_class.type: Electronegativity
focal_class.var_name: electronegativity
focal_class.declarator: NAMES = {"elecSigB"}
focal_class.modifier: private static final
focal_class.original_string: private static final String[] NAMES = {"elecSigB"};
focal_class.type: String[]
focal_class.var_name: NAMES
focal_class.file: descriptor/qsarbond/src/main/java/org/openscience/cdk/qsar/descriptors/bond/BondSigmaElectronegativityDescriptor.java
focal_class.identifier: BondSigmaElectronegativityDescriptor
focal_class.interfaces: implements IBondDescriptor
focal_class.class_method_signature: BondSigmaElectronegativityDescriptor.BondSigmaElectronegativityDescriptor()
focal_class.full_signature: public  BondSigmaElectronegativityDescriptor()
focal_class.identifier: BondSigmaElectronegativityDescriptor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  BondSigmaElectronegativityDescriptor()
focal_class.class_method_signature: BondSigmaElectronegativityDescriptor.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: BondSigmaElectronegativityDescriptor.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: BondSigmaElectronegativityDescriptor.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: BondSigmaElectronegativityDescriptor.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: BondSigmaElectronegativityDescriptor.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: BondSigmaElectronegativityDescriptor.calculate(IBond aBond, IAtomContainer atomContainer)
focal_class.full_signature: @Override public DescriptorValue calculate(IBond aBond, IAtomContainer atomContainer)
focal_class.identifier: calculate
focal_class.modifiers: @Override public
focal_class.parameters: (IBond aBond, IAtomContainer atomContainer)
focal_class.return: DescriptorValue
focal_class.signature: DescriptorValue calculate(IBond aBond, IAtomContainer atomContainer)
focal_class.class_method_signature: BondSigmaElectronegativityDescriptor.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: BondSigmaElectronegativityDescriptor.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 aBond, IAtomContainer atomContainer) {
          IAtomContainer ac;
          IBond bond;
  
          try {
              ac = (IAtomContainer) atomContainer.clone();
              bond = ac.getBond(atomContainer.indexOf(aBond));
              AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(ac);
          } catch (CDKException e) {
              return getDummyDescriptorValue(e);
          } catch (CloneNotSupportedException e) {
              return getDummyDescriptorValue(e);
          }
  
          if (maxIterations != -1 && maxIterations != 0) electronegativity.setMaxIterations(maxIterations);
  
          double electroAtom1 = electronegativity.calculateSigmaElectronegativity(ac, bond.getBegin());
          double electroAtom2 = electronegativity.calculateSigmaElectronegativity(ac, bond.getEnd());
  
          return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(
                  Math.abs(electroAtom1 - electroAtom2)), NAMES);
  
      }
focal_method.class_method_signature: BondSigmaElectronegativityDescriptor.calculate(IBond aBond, IAtomContainer atomContainer)
focal_method.full_signature: @Override public DescriptorValue calculate(IBond aBond, IAtomContainer atomContainer)
focal_method.identifier: calculate
focal_method.invocations: clone getBond indexOf percieveAtomTypesAndConfigureAtoms getDummyDescriptorValue getDummyDescriptorValue setMaxIterations calculateSigmaElectronegativity getBegin calculateSigmaElectronegativity getEnd getSpecification getParameterNames getParameters abs
focal_method.modifiers: @Override public
focal_method.parameters: (IBond aBond, IAtomContainer atomContainer)
focal_method.return: DescriptorValue
focal_method.signature: DescriptorValue calculate(IBond aBond, IAtomContainer atomContainer)