A Fourier method solution for the time dependent Schrödinger equation as a tool in molecular dynamics