code: public static IAtomContainer makeDeepCopy(IAtomContainer container) {
  
          IAtomContainer newAtomContainer = container.getBuilder().newInstance(IAtomContainer.class);
          //      Deep copy of the Atoms
          IAtom[] atoms = copyAtoms(container, newAtomContainer);
  
          //      Deep copy of the bonds
          copyBonds(atoms, container, newAtomContainer);
  
          //      Deep copy of the LonePairs
          for (int index = 0; index < container.getLonePairCount(); index++) {
              if (container.getAtom(index).getSymbol().equalsIgnoreCase("R")
                      || container.getAtom(index).getSymbol().equalsIgnoreCase("A")) {
                  newAtomContainer.addLonePair(container.getBuilder().newInstance(ILonePair.class,
                          container.getAtom(index)));
              } else {
                  newAtomContainer.addLonePair(index);
              }
          }
  
          for (int index = 0; index < container.getSingleElectronCount(); index++) {
              newAtomContainer.addSingleElectron(index);
          }
          newAtomContainer.addProperties(container.getProperties());
          newAtomContainer.setFlags(container.getFlags());
          newAtomContainer.setID(container.getID());
          newAtomContainer.notifyChanged();
  
          return newAtomContainer;
      }
docs: Retrurns deep copy of the molecule
  @param container
  @return deep copy of the mol