/** * Get the container which the bond is found on resonance from a IMolecule. It is based on looking * if the order of the bond changes. Return null is any is found. * * @param molecule The IMolecule to analyze * @param bond The IBond * @return The container with the bond */ @TestMethod("testGetContainer_IMolecule_IBond") public IAtomContainer getContainer(IMolecule molecule, IBond bond) { IAtomContainerSet setOfCont = getContainers(molecule); if (setOfCont == null) return null; for (IAtomContainer container : setOfCont.atomContainers()) { if (container.contains(bond)) return container; } return null; }