InductivePartialCharges implements IChargeCalculator { public InductivePartialCharges() throws IOException, ClassNotFoundException { if (pauling == null) { pauling = new double[]{0, 2.1, 0, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 0, 0.9, 1.2, 1.5, 1.8, 2.1, 2.5, 3.0, 0, 0.8, 1.0, 1.3, 1.5, 1.6, 1.6, 1.5, 1.8, 1.8, 1.8, 1.9, 1.6, 1.6, 1.8, 2.0, 2.4, 2.8, 0, 0.8, 1.0, 1.3, 1.4, 1.6, 1.8, 1.9, 2.2, 2.2, 2.2, 1.9, 1.7, 1.7, 1.8, 1.9, 2.1, 2.5, 0.7, 0.9, 1.1, 1.3, 1.5, 1.7, 1.9, 2.2, 2.2, 2.2, 2.4, 1.9, 1.8, 1.8, 1.9, 2.0, 2.2, 0, 0.7, 0.9, 1.1}; } } 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 testInductivePartialCharges() throws java.lang.Exception { double[] testResult = {0.197, -0.492, 0.051, 0.099, 0.099}; Point3d c_coord = new Point3d(1.392, 0.0, 0.0); Point3d f_coord = new Point3d(0.0, 0.0, 0.0); Point3d h1_coord = new Point3d(1.7439615035767404, 1.0558845107302222, 0.0); Point3d h2_coord = new Point3d(1.7439615035767404, -0.5279422553651107, 0.914422809754875); Point3d h3_coord = new Point3d(1.7439615035767402, -0.5279422553651113, -0.9144228097548747); IAtomContainer mol = new AtomContainer(); Atom c = new Atom("C"); mol.addAtom(c); c.setPoint3d(c_coord); Atom f = new Atom("F"); mol.addAtom(f); f.setPoint3d(f_coord); Atom h1 = new Atom("H"); mol.addAtom(h1); h1.setPoint3d(h1_coord); Atom h2 = new Atom("H"); mol.addAtom(h2); h2.setPoint3d(h2_coord); Atom h3 = new Atom("H"); mol.addAtom(h3); h3.setPoint3d(h3_coord); mol.addBond(0, 1, IBond.Order.SINGLE); mol.addBond(0, 2, IBond.Order.SINGLE); mol.addBond(0, 3, IBond.Order.SINGLE); mol.addBond(0, 4, IBond.Order.SINGLE); InductivePartialCharges ipc = new InductivePartialCharges(); ipc.assignInductivePartialCharges(mol); for (int i = 0; i < mol.getAtomCount(); i++) { Assert.assertEquals(testResult[i], ((Double) mol.getAtom(i).getProperty("InductivePartialCharge")).doubleValue(), 0.1); } }