Obtain the energy from DFT at arbitrary density matrix

Hi Tim,

This would be an interesting feature to have. I think ADF has sth like this. Changing the DFT functional after the SCF.

For the Psi4numpy route the DFT tutorials show the principles how to go from density matrix to xc energy: https://github.com/psi4/psi4numpy/blob/master/Tutorials/04_Density_Functional_Theory/4b_LDA_kernel.ipynb

On the C++ side I only see a function to compute the potential, not only the energy, although it does not seem too difficult to add.

Also tagging @dgasmith, if he has further insights.