Hello all,
I’m running a RHF and CCSD calculation for H2O and trying to reproduce the 1-electron level energies (i.e. everything except the 2-electron repulsion) using the corresponding 1-electron density matrices and the K, V matrices like this.
    grad, ccwfn = psi4.gradient('ccsd', return_wfn=True, ref_wfn=wfn)
    mints = psi4.core.MintsHelper(ccwfn.basisset())
    Da_cc = ccwfn.Da().to_array(copy=False, dense=True)
    K = mints.ao_kinetic().to_array(copy=False, dense=True)
    V = mints.ao_potential().to_array(copy=False, dense=True)
    E_ke_cc = 2 * np.trace(np.matmul(K, Da_cc))
    E_v_cc = 2 * np.trace(np.matmul(V, Da_cc))
The HF energies match the output file numbers. However the KE from the CCSD 1-RDM differs from the one in the output file by 1.69mH.
- Why aren’t they matching exactly (till floating point precision)?
- Also where can I find the CCSD potential (nuclear-electron) energy in the output file?
Here’s the full script which will print an output like the following.
Any help would be greatly appreciated. Thank you!
Energies from HF 1-RDM
Nuclear:                        9.168193296424349
Kinetic:                        74.58220348386018
Potential:                       -196.9063503606068
Coulomb:                        47.29435182717615
Exchange:                       -9.101796533055854
Total :                       -74.96339828620196
Energies from CCSD 1-RDM
Nuclear:                        9.168193296424349
Kinetic:                        74.62366469678517
Potential:                      -196.82537980565303
Coulomb:                        47.24918874993827
Exchange:                       -9.082702767239162
Total :                        -74.8670358297444