Molecule excitation in sputtering, scattering and electron or photon induced desorption