Configurational density of states from molecular dynamics simulations