change return_energies to return_logp, and add citation