code: private void trim(IAtom atom, IAtomContainer molecule) {
          List<IBond> bonds = molecule.getConnectedBondsList(atom);
          for (int i = 0; i < bonds.size(); i++) {
              molecule.removeElectronContainer((IBond) bonds.get(i));
          }
          // you are erased! Har, har, har.....  >8-)
      }
docs: removes all bonds connected to the given atom leaving it with degree zero.
  
  @param   atom  The atom to be disconnecred
  @param   molecule  The molecule containing the atom