InductivePartialCharges implements IChargeCalculator { public double getAtomicSoftnessCore(IAtomContainer ac, int atomPosition) throws CDKException { if (factory == null) { factory = AtomTypeFactory .getInstance("org/openscience/cdk/config/data/jmol_atomtypes.txt", ac.getBuilder()); } IAtom target = null; double core = 0; double radiusTarget = 0; target = ac.getAtom(atomPosition); double partial = 0; double radius = 0; String symbol = null; IAtomType type = null; try { symbol = ac.getAtom(atomPosition).getSymbol(); type = factory.getAtomType(symbol); if (getCovalentRadius(symbol, ac.getMaximumBondOrder(target)) > 0) { radiusTarget = getCovalentRadius(symbol, ac.getMaximumBondOrder(target)); } else { radiusTarget = type.getCovalentRadius(); } } catch (Exception ex1) { logger.debug(ex1); throw new CDKException("Problems with AtomTypeFactory due to " + ex1.getMessage(), ex1); } Iterator<IAtom> atoms = ac.atoms().iterator(); while (atoms.hasNext()) { IAtom atom = atoms.next(); if (!target.equals(atom)) { symbol = atom.getSymbol(); partial = 0; try { type = factory.getAtomType(symbol); } catch (Exception ex1) { logger.debug(ex1); throw new CDKException("Problems with AtomTypeFactory due to " + ex1.getMessage(), ex1); } if (getCovalentRadius(symbol, ac.getMaximumBondOrder(atom)) > 0) { radius = getCovalentRadius(symbol, ac.getMaximumBondOrder(atom)); } else { radius = type.getCovalentRadius(); } partial += radius * radius; partial += (radiusTarget * radiusTarget); partial = partial / (calculateSquaredDistanceBetweenTwoAtoms(target, atom)); core += partial; } } core = 2 * core; core = 0.172 * core; return core; } InductivePartialCharges(); IAtomContainer assignInductivePartialCharges(IAtomContainer ac); @Override void calculateCharges(IAtomContainer container); double[] getPaulingElectronegativities(IAtomContainer ac, boolean modified); double getAtomicSoftnessCore(IAtomContainer ac, int atomPosition);  }
@Ignore @Test public void testGetAtomicSoftness() throws Exception { InductivePartialCharges ipc = new InductivePartialCharges(); double softness = ipc.getAtomicSoftnessCore(mol, 0); Assert.fail("Not validated - need known values"); }