I want to save the CCSD density so that I can read it into a DFT/HF calculation later. It seems (unsurprisingly) that with the input I have below I’m saving the SCF density (at least when I read it in in a new calculation):
Do you want to calculate the HF/DFT energy using a CCSD density?
Restarting a HF calculation is technically only possible using orbital coefficients, not a density.
The CCSD density is not available for energy calculations as its not needed and expensive to calculate.
Here you would typically request a gradient computation.
Yes I want to calculate the HF/DFT energy using a CCSD density. Is there a way to do this? Changing “energy” to “gradient” doesn’t seem to have done anything different.
This is not so easily done because our JK object cannot take a density as input only orbitals.
So then you need to compute the integrals and contract them with the density yourself.
There might be more elegant solutions that I haven’t though of. Possibly one can reuse the integrals written to disk during the CCSD calculation but for a prototype code the psi4numpy approach will get you far already
and I need to be absolutely clear about which you’re asking about, because they’re both unusual things to ask.
You could be asking for computing the energy delivered by a functional for the CCSD density or using the CCSD density as an initial guess for the iterative solution of the KS-DFT equations. If you want to use CCSD as an initial guess, I have to ask if this is absolutely essential, or you just want a robust “trick” to converge KS-DFT for difficult systems.
There are two annoying technicalities to worry about: first, the “CCSD density” is ambiguous. Some people define the CCSD density excluding the so-called orbital response terms, and some people define the CCSD density including the so-called orbital response terms. If you just want an initial guess, you should be fine without orbital response terms. Otherwise, it is essential that you know the difference and specify which you want.
Second, some functionals may be ill-behaved for non-idempotent densities or even undefined without orbitals to compute the non-density quantities used by modern DFT (example: kinetic energy density).