From bcd6ff69dd9b59ad390bde26435d2868a6086c70 Mon Sep 17 00:00:00 2001 From: Hatem Helal Date: Wed, 17 Apr 2024 21:02:18 +0100 Subject: [PATCH] separate E_core --- mess/hamiltonian.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mess/hamiltonian.py b/mess/hamiltonian.py index d3ea6d7..d85a290 100644 --- a/mess/hamiltonian.py +++ b/mess/hamiltonian.py @@ -153,10 +153,11 @@ def __init__( self.xcfunc = build_xcfunc(xc_method, basis, self.two_electron) def __call__(self, P: FloatNxN) -> float: + E_core = jnp.sum(self.H_core * P) E_xc = self.xcfunc(P) J = self.two_electron.coloumb(P) E_es = 0.5 * jnp.sum(J * P) - E = jnp.sum(self.H_core * P) + E_xc + E_es + E = E_core + E_xc + E_es return E