code: public static IAtomContainer getAtomContainer(IMolecularFormula formula, IAtomContainer atomContainer) {
  
          for (IIsotope isotope : formula.isotopes()) {
              int occur = formula.getIsotopeCount(isotope);
              for (int i = 0; i < occur; i++) {
                  IAtom atom = formula.getBuilder().newInstance(IAtom.class, isotope);
                  atom.setImplicitHydrogenCount(0);
                  atomContainer.addAtom(atom);
              }
          }
          return atomContainer;
      }
docs: Method that actually does the work of convert the IMolecularFormula
  to IAtomContainer given a IAtomContainer.
  <p> The hydrogens must be implicit.
  
  @param  formula           IMolecularFormula object
  @param  atomContainer     IAtomContainer to put the new Elements
  @return                   the filled AtomContainer
  @see                      #getAtomContainer(IMolecularFormula)