From de6a7b5fb34264e17fd86b56347a8ac6e8fd02c2 Mon Sep 17 00:00:00 2001 From: Ollie Backhouse Date: Wed, 28 Oct 2020 10:02:11 +0000 Subject: [PATCH] Fixes chfkile bug --- examples/agf2/04-restart.py | 1 - pyscf/agf2/chkfile.py | 2 -- 2 files changed, 3 deletions(-) diff --git a/examples/agf2/04-restart.py b/examples/agf2/04-restart.py index a21cf89f39..9bc238f22c 100644 --- a/examples/agf2/04-restart.py +++ b/examples/agf2/04-restart.py @@ -35,7 +35,6 @@ mf.__dict__.update(agf2.chkfile.load('agf2.chk', 'scf')) # Restore the AGF2 calculation -dic = agf2.chkfile.load_agf2('agf2.chk') gf2a = agf2.AGF2(mf) gf2a.__dict__.update(agf2.chkfile.load_agf2('agf2.chk')[1]) gf2a.max_cycle = 50 diff --git a/pyscf/agf2/chkfile.py b/pyscf/agf2/chkfile.py index 7dcb618095..285885ff71 100644 --- a/pyscf/agf2/chkfile.py +++ b/pyscf/agf2/chkfile.py @@ -83,7 +83,6 @@ def load_agf2(chkfile): if 'gf' in dic: gf = dic['gf'] dic['gf'] = GreensFunction(gf['energy'], gf['coupling'], chempot=gf['chempot']) - del(dic['gf']) elif 'gfa' in dic: gfa, gfb = dic['gfa'], dic['gfb'] dic['gf'] = (GreensFunction(gfa['energy'], gfa['coupling'], chempot=gfa['chempot']), @@ -93,7 +92,6 @@ def load_agf2(chkfile): if 'se' in dic: se = dic['se'] dic['se'] = SelfEnergy(se['energy'], se['coupling'], chempot=se['chempot']) - del(dic['se']) elif 'sea' in dic: sea, seb = dic['sea'], dic['seb'] dic['se'] = (SelfEnergy(sea['energy'], sea['coupling'], chempot=sea['chempot']),