code: public static IAtomContainer getRelevantAtomContainer(IChemModel chemModel, IBond bond) {
          IAtomContainer result = null;
          if (chemModel.getMoleculeSet() != null) {
              IAtomContainerSet moleculeSet = chemModel.getMoleculeSet();
              result = MoleculeSetManipulator.getRelevantAtomContainer(moleculeSet, bond);
              if (result != null) {
                  return result;
              }
          }
          if (chemModel.getReactionSet() != null) {
              IReactionSet reactionSet = chemModel.getReactionSet();
              return ReactionSetManipulator.getRelevantAtomContainer(reactionSet, bond);
          }
          // This should never happen.
          return null;
      }
docs: Retrieves the first IAtomContainer containing a given IBond from an
  IChemModel.
  
  @param chemModel  The IChemModel object.
  @param bond       The IBond object to search.
  @return           The IAtomContainer object found, null if none is found.