From ad0f56037e084f051e5b08ebd5938fd01d230415 Mon Sep 17 00:00:00 2001 From: Jiachen Li Date: Tue, 21 Nov 2023 23:37:04 -0500 Subject: [PATCH] fix a bug in KUGWAC that doesn't generate proper GDF when using LDA/GGA functionals --- pyscf/pbc/gw/kugw_ac.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyscf/pbc/gw/kugw_ac.py b/pyscf/pbc/gw/kugw_ac.py index 8481b7a343..e61197496d 100644 --- a/pyscf/pbc/gw/kugw_ac.py +++ b/pyscf/pbc/gw/kugw_ac.py @@ -86,6 +86,9 @@ def kernel(gw, mo_energy, mo_coeff, orbs=None, uhf = scf.KUHF(gw.mol, gw.kpts, exxdiv=exxdiv) uhf.with_df = gw.with_df uhf.with_df._cderi = gw.with_df._cderi + if uhf.with_df._j_only: + logger.debug(gw, 'Rebuild CDERI for exchange integrals') + uhf.with_df.build(j_only=False) vk = uhf.get_veff(gw.mol,dm_kpts=dm) vj = uhf.get_j(gw.mol,dm_kpts=dm) vk[0] = vk[0] - (vj[0] + vj[1])