Ab initio molecular dynamics based on density matrix propagation applied to the study of spectroscopic properties