From 2d3dcb3398a4b7bd80497b7de11020f8edbf66c5 Mon Sep 17 00:00:00 2001 From: hschnait Date: Mon, 30 Aug 2021 14:14:11 +0200 Subject: [PATCH] Bugfixes in blockstructure.py for the case of #corr_shells != #ineq_shells --- python/triqs_dft_tools/block_structure.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python/triqs_dft_tools/block_structure.py b/python/triqs_dft_tools/block_structure.py index 8f879e0c..840779b2 100644 --- a/python/triqs_dft_tools/block_structure.py +++ b/python/triqs_dft_tools/block_structure.py @@ -416,8 +416,12 @@ class BlockStructure(object): new_gf_struct[ish][block]=list of indices in that block. """ + assert len(self.gf_struct_solver) == len(new_gf_struct),\ + "new_gf_struct has the wrong length" + + for ish in range(len(self.gf_struct_solver)): - gf_struct = new_gf_struct[ish] + gf_struct = new_gf_struct[ish].copy() # create new solver_to_sumk so2su = {} @@ -507,7 +511,7 @@ class BlockStructure(object): """ eff_trans_sumk = self.effective_transformation_sumk - assert len(eff_trans_sumk) == len(new_gf_struct),\ + assert len(self.gf_struct_solver) == len(new_gf_struct),\ "new_gf_struct has the wrong length" new_gf_struct_transformed = copy.deepcopy(new_gf_struct)