@Override public void calculateCharges(IAtomContainer container) throws CDKException { try { this.assignInductivePartialCharges(container); } catch (Exception exception) { throw new CDKException("Could not calculate inductive partial charges: " + exception.getMessage(), exception); } }
double[] ElEn = new double[atoms.length * (stepsLimit + 1)]; double[] pCh = new double[atoms.length * (stepsLimit + 1)]; double[] startEE = getPaulingElectronegativities(ac, true); for (int e = 0; e < atoms.length; e++) { ElEn[e] = startEE[e]; pChInch[a + (s * atoms.length)] = getAtomicChargeIncrement(ac, a, ElEn, s); pCh[a + (s * atoms.length)] = pChInch[a + (s * atoms.length)] + pCh[a + ((s - 1) * atoms.length)]; ElEn[a + (s * atoms.length)] = ElEn[a + ((s - 1) * atoms.length)] + (pChInch[a + (s * atoms.length)] / getAtomicSoftnessCore(ac, a)); if (s == 9) { atoms[a].setProperty("InductivePartialCharge", new Double(pCh[a + (s * atoms.length)]));
@Ignore @Test public void testGetAtomicSoftness() throws Exception { InductivePartialCharges ipc = new InductivePartialCharges(); double softness = ipc.getAtomicSoftnessCore(mol, 0); Assert.fail("Not validated - need known values"); }
mol.addBond(0, 3, IBond.Order.SINGLE); // 1 mol.addBond(0, 4, IBond.Order.SINGLE); // 1 InductivePartialCharges ipc = new InductivePartialCharges(); ipc.assignInductivePartialCharges(mol); for (int i = 0; i < mol.getAtomCount(); i++) { Assert.assertEquals(testResult[i],
symbol = target.getSymbol(); type = factory.getAtomType(symbol); if (getCovalentRadius(symbol, ac.getMaximumBondOrder(target)) > 0) { radiusTarget = getCovalentRadius(symbol, ac.getMaximumBondOrder(target)); } else { radiusTarget = type.getCovalentRadius(); throw new CDKException("Problems with AtomTypeFactory due to " + ex1.getMessage(), ex1); if (getCovalentRadius(symbol, ac.getMaximumBondOrder(allAtoms[a])) > 0) { radius = getCovalentRadius(symbol, ac.getMaximumBondOrder(allAtoms[a])); } else { radius = type.getCovalentRadius(); tmp = tmp / (calculateSquaredDistanceBetweenTwoAtoms(target, allAtoms[a])); incrementedCharge += tmp;
@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); }
mol.addBond(0, 3, IBond.Order.SINGLE); // 1 mol.addBond(0, 4, IBond.Order.SINGLE); // 1 InductivePartialCharges ipc = new InductivePartialCharges(); ipc.assignInductivePartialCharges(mol); for (int i = 0; i < mol.getAtomCount(); i++) { Assert.assertEquals(testResult[i],
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(); 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 = partial / (calculateSquaredDistanceBetweenTwoAtoms(target, atom)); core += partial;
double[] ElEn = new double[atoms.length * (stepsLimit + 1)]; double[] pCh = new double[atoms.length * (stepsLimit + 1)]; double[] startEE = getPaulingElectronegativities(ac, true); for (int e = 0; e < atoms.length; e++) { ElEn[e] = startEE[e]; pChInch[a + (s * atoms.length)] = getAtomicChargeIncrement(ac, a, ElEn, s); pCh[a + (s * atoms.length)] = pChInch[a + (s * atoms.length)] + pCh[a + ((s - 1) * atoms.length)]; ElEn[a + (s * atoms.length)] = ElEn[a + ((s - 1) * atoms.length)] + (pChInch[a + (s * atoms.length)] / getAtomicSoftnessCore(ac, a)); if (s == 9) { atoms[a].setProperty("InductivePartialCharge", new Double(pCh[a + (s * atoms.length)]));
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(); 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 = partial / (calculateSquaredDistanceBetweenTwoAtoms(target, atom)); core += partial;
@Override public void calculateCharges(IAtomContainer container) throws CDKException { try { this.assignInductivePartialCharges(container); } catch (Exception exception) { throw new CDKException("Could not calculate inductive partial charges: " + exception.getMessage(), exception); } }
symbol = target.getSymbol(); type = factory.getAtomType(symbol); if (getCovalentRadius(symbol, ac.getMaximumBondOrder(target)) > 0) { radiusTarget = getCovalentRadius(symbol, ac.getMaximumBondOrder(target)); } else { radiusTarget = type.getCovalentRadius(); throw new CDKException("Problems with AtomTypeFactory due to " + ex1.getMessage(), ex1); if (getCovalentRadius(symbol, ac.getMaximumBondOrder(allAtoms[a])) > 0) { radius = getCovalentRadius(symbol, ac.getMaximumBondOrder(allAtoms[a])); } else { radius = type.getCovalentRadius(); tmp = tmp / (calculateSquaredDistanceBetweenTwoAtoms(target, allAtoms[a])); incrementedCharge += tmp;