Hi all,

how do I obtain manually the energy from the matrices H, J, K of a HF calculation. I use

```
J = wfn.jk().J()[0].to_array()
K = wfn.jk().K()[0].to_array()
H = wfn.H().to_array()
C = wfn.Ca_subset("AO", "OCC").to_array()
```

From theory we know the energy without nucleus Coulomb part is

```
E = trace(C.T * H * C) + 0.5 * (trace(C.T * J * C) - trace(C.T * K * C))
```

Somehow, this result is not identical to the HF energy (without nucleus Coulomb).

How do I get the resulting energy of a HF calculation?

Thanks in advance,

Wiktor