InductivePartialCharges implements IChargeCalculator { public double[] getPaulingElectronegativities(IAtomContainer ac, boolean modified) throws CDKException { double[] paulingElectronegativities = new double[ac.getAtomCount()]; IElement element = null; String symbol = null; int atomicNumber = 0; try { ifac = Isotopes.getInstance(); for (int i = 0; i < ac.getAtomCount(); i++) { IAtom atom = ac.getAtom(i); symbol = ac.getAtom(i).getSymbol(); element = ifac.getElement(symbol); atomicNumber = element.getAtomicNumber(); if (modified) { if (symbol.equals("Cl")) { paulingElectronegativities[i] = 3.28; } else if (symbol.equals("Br")) { paulingElectronegativities[i] = 3.13; } else if (symbol.equals("I")) { paulingElectronegativities[i] = 2.93; } else if (symbol.equals("H")) { paulingElectronegativities[i] = 2.10; } else if (symbol.equals("C")) { if (ac.getMaximumBondOrder(atom) == IBond.Order.SINGLE) { paulingElectronegativities[i] = 2.20; } else if (ac.getMaximumBondOrder(atom) == IBond.Order.DOUBLE) { paulingElectronegativities[i] = 2.31; } else { paulingElectronegativities[i] = 3.15; } } else if (symbol.equals("O")) { if (ac.getMaximumBondOrder(atom) == IBond.Order.SINGLE) { paulingElectronegativities[i] = 3.20; } else if (ac.getMaximumBondOrder(atom) != IBond.Order.SINGLE) { paulingElectronegativities[i] = 4.34; } } else if (symbol.equals("Si")) { paulingElectronegativities[i] = 1.99; } else if (symbol.equals("S")) { paulingElectronegativities[i] = 2.74; } else if (symbol.equals("N")) { paulingElectronegativities[i] = 2.59; } else { paulingElectronegativities[i] = pauling[atomicNumber]; } } else { paulingElectronegativities[i] = pauling[atomicNumber]; } } return paulingElectronegativities; } catch (Exception ex1) { logger.debug(ex1); throw new CDKException("Problems with IsotopeFactory due to " + ex1.toString(), ex1); } } InductivePartialCharges(); IAtomContainer assignInductivePartialCharges(IAtomContainer ac); @Override void calculateCharges(IAtomContainer container); double[] getPaulingElectronegativities(IAtomContainer ac, boolean modified); double getAtomicSoftnessCore(IAtomContainer ac, int atomPosition);  }
@Test public void testGetPaulingElectronegativities() throws Exception { InductivePartialCharges ipc = new InductivePartialCharges(); double[] eneg = ipc.getPaulingElectronegativities(mol, true); long[] expected = {}; Assert.assertEquals("Error in C electronegativity", 2.20, eneg[0], 0.01); Assert.assertEquals("Error in Cl electronegativity", 3.28, eneg[1], 0.01); Assert.assertEquals("Error in Br electronegativity", 3.13, eneg[2], 0.01); Assert.assertEquals("Error in H electronegativity", 2.10, eneg[3], 0.01); Assert.assertEquals("Error in O electronegativity", 3.20, eneg[4], 0.01); }