Ab initio simulations of electron-nuclear dynamics: from atoms to surfaces