code: public static IAtomContainer getRelevantAtomContainer(IChemModel chemModel, IAtom atom) {
          IAtomContainer result = null;
          if (chemModel.getMoleculeSet() != null) {
              IAtomContainerSet moleculeSet = chemModel.getMoleculeSet();
              result = MoleculeSetManipulator.getRelevantAtomContainer(moleculeSet, atom);
              if (result != null) {
                  return result;
              }
          }
          if (chemModel.getReactionSet() != null) {
              IReactionSet reactionSet = chemModel.getReactionSet();
              return ReactionSetManipulator.getRelevantAtomContainer(reactionSet, atom);
          }
          if (chemModel.getCrystal() != null && chemModel.getCrystal().contains(atom)) {
              return chemModel.getCrystal();
          }
          if (chemModel.getRingSet() != null) {
              return AtomContainerSetManipulator.getRelevantAtomContainer(chemModel.getRingSet(), atom);
          }
          throw new IllegalArgumentException("The provided atom is not part of this IChemModel.");
      }
docs: This badly named methods tries to determine which AtomContainer in the
  ChemModel is best suited to contain added Atom's and Bond's.