code: public static IAtom[] getAtomArray(IAtomContainer container) {
          IAtom[] ret = new IAtom[container.getAtomCount()];
          for (int i = 0; i < ret.length; ++i)
              ret[i] = container.getAtom(i);
          return ret;
      }
docs: Constructs an array of Atom objects from an AtomContainer.
  @param  container The original AtomContainer.
  @return The array of Atom objects.