From 3b7fde642d282670dbf5e1aca4602a787920d319 Mon Sep 17 00:00:00 2001 From: Munkhorgil Wang Date: Wed, 19 Nov 2025 11:27:00 +0100 Subject: [PATCH 1/3] Adjust modchg_offset to accommodate angular basis --- python/green_igen/df.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/green_igen/df.py b/python/green_igen/df.py index 5fb27dc..ce8ea56 100644 --- a/python/green_igen/df.py +++ b/python/green_igen/df.py @@ -1121,7 +1121,8 @@ def fuse_auxcell(mydf, auxcell): aux_loc = auxcell.ao_loc_nr() naux = aux_loc[-1] - modchg_offset = -numpy.ones((chgcell.natm,8), dtype=int) + lmax = auxcell._bas[:,gto.ANG_OF].max() + modchg_offset = -np.ones((chgcell.natm,lmax+1), dtype=int) smooth_loc = chgcell.ao_loc_nr() for i in range(chgcell.nbas): ia = chgcell.bas_atom(i) From a7e6beb0bd716ed0e8fb88d877d97f675f93bd9c Mon Sep 17 00:00:00 2001 From: Munkhorgil Wang Date: Wed, 19 Nov 2025 12:22:50 +0100 Subject: [PATCH 2/3] Replace np with numpy for consistency --- python/green_igen/df.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/green_igen/df.py b/python/green_igen/df.py index ce8ea56..0ae9979 100644 --- a/python/green_igen/df.py +++ b/python/green_igen/df.py @@ -1122,7 +1122,7 @@ def fuse_auxcell(mydf, auxcell): aux_loc = auxcell.ao_loc_nr() naux = aux_loc[-1] lmax = auxcell._bas[:,gto.ANG_OF].max() - modchg_offset = -np.ones((chgcell.natm,lmax+1), dtype=int) + modchg_offset = -numpy.ones((chgcell.natm,lmax+1), dtype=int) smooth_loc = chgcell.ao_loc_nr() for i in range(chgcell.nbas): ia = chgcell.bas_atom(i) From 33c455f0a9d7869b8f347db109485829376b769a Mon Sep 17 00:00:00 2001 From: Munkhorgil Wang Date: Wed, 19 Nov 2025 18:50:37 +0100 Subject: [PATCH 3/3] Fix modchg_offset initialization size Update modchg_offset array size to 9. --- python/green_igen/df.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/green_igen/df.py b/python/green_igen/df.py index 0ae9979..094df73 100644 --- a/python/green_igen/df.py +++ b/python/green_igen/df.py @@ -1121,8 +1121,7 @@ def fuse_auxcell(mydf, auxcell): aux_loc = auxcell.ao_loc_nr() naux = aux_loc[-1] - lmax = auxcell._bas[:,gto.ANG_OF].max() - modchg_offset = -numpy.ones((chgcell.natm,lmax+1), dtype=int) + modchg_offset = -numpy.ones((chgcell.natm,9), dtype=int) smooth_loc = chgcell.ao_loc_nr() for i in range(chgcell.nbas): ia = chgcell.bas_atom(i)