Polarizability { public double calculateBondPolarizability(IAtomContainer atomContainer, IBond bond) { double polarizabilitiy = 0; IAtomContainer acH = atomContainer.getBuilder().newInstance(IAtomContainer.class, atomContainer); addExplicitHydrogens(acH); if (bond.getAtomCount() == 2) { polarizabilitiy += getKJPolarizabilityFactor(acH, bond.getBegin()); polarizabilitiy += getKJPolarizabilityFactor(acH, bond.getEnd()); } return (polarizabilitiy / 2); } Polarizability(); double getPolarizabilitiyFactorForAtom(IAtomContainer atomContainer, IAtom atom); double calculateKJMeanMolecularPolarizability(IAtomContainer atomContainer); double calculateGHEffectiveAtomPolarizability(IAtomContainer atomContainer, IAtom atom,
            int influenceSphereCutOff, boolean addExplicitH); double calculateGHEffectiveAtomPolarizability(IAtomContainer atomContainer, IAtom atom,
            boolean addExplicitH, int[][] distanceMatrix); double calculateBondPolarizability(IAtomContainer atomContainer, IBond bond);  }
@Test public void testCalculateBondPolarizability_IAtomContainer_IBond() throws Exception { Polarizability pol = new Polarizability(); SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance()); IAtomContainer mol = sp.parseSmiles("NCCN(C)(C)"); double result = pol.calculateBondPolarizability((IAtomContainer) mol, mol.getBond(0)); Assert.assertFalse(Double.isNaN(result)); }