BondSigmaElectronegativityDescriptor extends AbstractBondDescriptor implements IBondDescriptor { public BondSigmaElectronegativityDescriptor() { electronegativity = new Electronegativity(); } BondSigmaElectronegativityDescriptor(); @Override DescriptorSpecification getSpecification(); @Override void setParameters(Object[] params); @Override Object[] getParameters(); @Override String[] getDescriptorNames(); @Override DescriptorValue calculate(IBond aBond, IAtomContainer atomContainer); @Override String[] getParameterNames(); @Override Object getParameterType(String name);  }
@Test public void testBondSigmaElectronegativityDescriptor() throws java.lang.Exception { double[] testResult = {2.5882, 1.1894}; Integer[] params = new Integer[1]; SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance()); IAtomContainer mol = sp.parseSmiles("CF"); AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol); addExplicitHydrogens(mol); LonePairElectronChecker lpcheck = new LonePairElectronChecker(); lpcheck.saturate(mol); for (int i = 0; i < 2; i++) { params[0] = 6; descriptor.setParameters(params); double result = ((DoubleResult) descriptor.calculate(mol.getBond(i), mol).getValue()).doubleValue(); Assert.assertEquals(testResult[i], result, 0.01); } }