From db8a7e543e61cf3ae20038906a827317b4b541fc Mon Sep 17 00:00:00 2001 From: Hermann Schnait <42941106+hschnait@users.noreply.github.com> Date: Wed, 9 Jun 2021 13:06:25 +0200 Subject: [PATCH] Bugfix in block_structure.py In the (rare) case that one has multiple shells with different number of orbitals (e.g. p-d-systems) the old code crashed when converting GFs from the second shell as matrix dimensions were not fitting (the tmp matrix was always created for the first shell). --- python/triqs_dft_tools/block_structure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/triqs_dft_tools/block_structure.py b/python/triqs_dft_tools/block_structure.py index 5bfb1ca9..276989c9 100644 --- a/python/triqs_dft_tools/block_structure.py +++ b/python/triqs_dft_tools/block_structure.py @@ -997,7 +997,7 @@ class BlockStructure(object): maxdiff = G_back[name] - G[name] if space_to == 'solver' and self == G_struct: # do comparison in solver (ignore diff. in ignored orbitals) - tmp = self.create_matrix(space='sumk') + tmp = self.create_matrix(space='sumk', ish=ish_from) tmp[name] = maxdiff maxdiff = G_struct._convert_gf_or_matrix(tmp, self, ish_from=ish_from, ish_to=ish_to,