Electronegativity { public double calculateSigmaElectronegativity(IAtomContainer ac, IAtom atom) { return calculateSigmaElectronegativity(ac, atom, maxI, maxRS); } Electronegativity();  Electronegativity(int maxIterations, int maxResonStruc); double calculateSigmaElectronegativity(IAtomContainer ac, IAtom atom); double calculateSigmaElectronegativity(IAtomContainer ac, IAtom atom, int maxIterations, int maxResonStruc); void setMaxIterations(int maxIterations); void setMaxResonStruc(int maxResonStruc); int getMaxIterations(); int getMaxResonStruc();  }
@Test public void testCalculateSigmaElectronegativity_IAtomContainer_IAtom() throws Exception { double[] testResult = {11.308338, 8.7184094, 7.5289848, 7.5289848, 7.5289848}; Electronegativity pe = new Electronegativity(); IAtomContainer molecule = builder.newInstance(IAtomContainer.class); molecule.addAtom(new Atom("F")); molecule.addAtom(new Atom("C")); molecule.addBond(0, 1, IBond.Order.SINGLE); addExplicitHydrogens(molecule); AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(molecule); lpcheck.saturate(molecule); for (int i = 0; i < molecule.getAtomCount(); i++) Assert.assertEquals(testResult[i], pe.calculateSigmaElectronegativity(molecule, molecule.getAtom(i)), 0.001); }
@Test public void testCalculateSigmaElectronegativity_IAtomContainer_IAtom_Int_Int() throws Exception { double[] testResult = {11.308338, 8.7184094, 7.5289848, 7.5289848, 7.5289848}; Electronegativity pe = new Electronegativity(); IAtomContainer molecule = builder.newInstance(IAtomContainer.class); molecule.addAtom(new Atom("F")); molecule.addAtom(new Atom("C")); molecule.addBond(0, 1, IBond.Order.SINGLE); addExplicitHydrogens(molecule); AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(molecule); lpcheck.saturate(molecule); for (int i = 0; i < molecule.getAtomCount(); i++) { Assert.assertEquals(testResult[i], pe.calculateSigmaElectronegativity(molecule, molecule.getAtom(i), 6, 50), 0.001); } }