Formulation and application of a molecular dynamics approach to photoabsorption and molecule surface scattering processes