Spectroscopic properties in liquid phase: combining ab initio calculations and classical molecular dynamics