PharmacophoreBond extends Bond { public double getBondLength() { PharmacophoreAtom atom1 = PharmacophoreAtom.get(getAtom(0)); PharmacophoreAtom atom2 = PharmacophoreAtom.get(getAtom(1)); return atom1.getPoint3d().distance(atom2.getPoint3d()); } PharmacophoreBond(PharmacophoreAtom patom1, PharmacophoreAtom patom2); static PharmacophoreBond get(IBond bond); double getBondLength();  }
@Test public void testGetBondLength() { PharmacophoreAtom patom1 = new PharmacophoreAtom("[CX2]N", "Amine", new Point3d(0, 0, 0)); PharmacophoreAtom patom2 = new PharmacophoreAtom("c1ccccc1", "Aromatic", new Point3d(1, 1, 1)); PharmacophoreBond pbond = new PharmacophoreBond(patom1, patom2); Assert.assertEquals(1.732051, pbond.getBondLength(), 0.00001); }