Simulation of nonadiabatic charge transfer during molecular scattering at metal surfaces