AtomPlacer3D { public int numberOfUnplacedHeavyAtoms(IAtomContainer ac) { int nUnplacedHeavyAtoms = 0; for (int i = 0; i < ac.getAtomCount(); i++) { if (isUnplacedHeavyAtom(ac.getAtom(i))) { nUnplacedHeavyAtoms++; } } return nUnplacedHeavyAtoms; } AtomPlacer3D(); void initilize(Map parameterSet); int[] findHeavyAtomsInChain(IAtomContainer molecule, IAtomContainer chain); IAtomContainer markPlaced(IAtomContainer ac); void placeAliphaticHeavyChain(IAtomContainer molecule, IAtomContainer chain); void zmatrixChainToCartesian(IAtomContainer molecule, boolean flagBranched); double getBondLengthValue(String id1, String id2); double getAngleValue(String id1, String id2, String id3); IAtom getNextUnplacedHeavyAtomWithAliphaticPlacedNeighbour(IAtomContainer molecule); IAtom getNextPlacedHeavyAtomWithUnplacedAliphaticNeighbour(IAtomContainer molecule); IAtom getNextPlacedHeavyAtomWithUnplacedRingNeighbour(IAtomContainer molecule); IAtom getFarthestAtom(Point3d refAtomPoint, IAtomContainer ac); IAtom getUnplacedRingHeavyAtom(IAtomContainer molecule, IAtom atom); Point3d geometricCenterAllPlacedAtoms(IAtomContainer molecule); IAtom getPlacedHeavyAtom(IAtomContainer molecule, IAtom atom); IAtom getPlacedHeavyAtom(IAtomContainer molecule, IAtom atomA, IAtom atomB); IAtomContainer getPlacedHeavyAtoms(IAtomContainer molecule, IAtom atom); int numberOfUnplacedHeavyAtoms(IAtomContainer ac); boolean allHeavyAtomsPlaced(IAtomContainer ac);  }
@Test public void testNumberOfUnplacedHeavyAtoms_IAtomContainer() { IAtomContainer ac = makeAlphaPinene(); int count = new AtomPlacer3D().numberOfUnplacedHeavyAtoms(ac); Assert.assertEquals(10, count); }
@Test public void testNumberOfUnplacedHeavyAtoms_IAtomContainerWithExplicitHydrogens() { IAtomContainer ac = makeMethaneWithExplicitHydrogens(); int count = new AtomPlacer3D().numberOfUnplacedHeavyAtoms(ac); Assert.assertEquals(1, count); }