code: public static IAtomContainer anonymise(IAtomContainer src) {
  
          IChemObjectBuilder builder = src.getBuilder();
  
          IAtom[] atoms = new IAtom[src.getAtomCount()];
          IBond[] bonds = new IBond[src.getBondCount()];
  
          for (int i = 0; i < atoms.length; i++) {
              atoms[i] = builder.newAtom();
              atoms[i].setAtomicNumber(6);
              atoms[i].setSymbol("C");
              atoms[i].setImplicitHydrogenCount(0);
              IAtom srcAtom = src.getAtom(i);
              if (srcAtom.getPoint2d() != null)
                  atoms[i].setPoint2d(new Point2d(srcAtom.getPoint2d()));
              if (srcAtom.getPoint3d() != null)
                  atoms[i].setPoint3d(new Point3d(srcAtom.getPoint3d()));
          }
          for (int i = 0; i < bonds.length; i++) {
              IBond bond = src.getBond(i);
              int u = src.indexOf(bond.getBegin());
              int v = src.indexOf(bond.getEnd());
              bonds[i] = builder.newInstance(IBond.class, atoms[u], atoms[v]);
          }
  
          IAtomContainer dest = builder.newInstance(IAtomContainer.class, 0, 0, 0, 0);
          dest.setAtoms(atoms);
          dest.setBonds(bonds);
          return dest;
      }
docs: Anonymise the provided container to single-bonded carbon atoms. No
  information other then the connectivity from the original container is
  retrained.
  
  @param src an atom container
  @return anonymised container