Skip to content

Commit

Permalink
Update trans_basis for new gf_struct convention.
Browse files Browse the repository at this point in the history
  • Loading branch information
hschnait committed Mar 8, 2022
1 parent abf70b6 commit cbeb26c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions python/triqs_dft_tools/trans_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,14 @@ def rotate_gf(self, gf_to_rot):

# build a full GF
gfrotated = BlockGf(name_block_generator=[(block, GfImFreq(
indices=inner, mesh=gf_to_rot.mesh)) for block, inner in self.SK.gf_struct_sumk[0]], make_copies=False)
target_shape=(block_dim, block_dim), mesh=gf_to_rot.mesh)) for block, block_dim in self.SK.gf_struct_sumk[0]], make_copies=False)

# transform the CTQMC blocks to the full matrix:
# ish is the index of the inequivalent shell corresponding to icrsh
ish = self.SK.corr_to_inequiv[0]
for block, inner in self.gf_struct_solver[ish].items():
for ind1 in inner:
for ind2 in inner:
for block, block_dim in self.gf_struct_solver[ish].items():
for ind1 in range(block_dim):
for ind2 in range(block_dim):
gfrotated[self.SK.solver_to_sumk_block[ish][block]][
ind1, ind2] << gf_to_rot[block][ind1, ind2]

Expand All @@ -168,9 +168,9 @@ def rotate_gf(self, gf_to_rot):

gfreturn = gf_to_rot.copy()
# Put back into CTQMC basis:
for block, inner in self.gf_struct_solver[ish].items():
for ind1 in inner:
for ind2 in inner:
for block, block_dim in self.gf_struct_solver[ish].items():
for ind1 in range(block_dim):
for ind2 in range(block_dim):
gfreturn[block][ind1, ind2] << gfrotated[
self.SK.solver_to_sumk_block[0][block]][ind1, ind2]

Expand Down

0 comments on commit cbeb26c

Please sign in to comment.