Skip to content

Commit

Permalink
Update map_gf_struct_solver function to 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 0a95ffd commit abf70b6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions python/triqs_dft_tools/block_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,9 @@ def effective_transformation_sumk(self):

# zero out all the lines of the transformation that are
# not included in gf_struct_solver
#TODO CHECK THIS!
for iorb in range(self.gf_struct_sumk_dict[icrsh][block]):
if self.sumk_to_solver[ish][(block, iorb)][0] is None:
trans[icrsh][block][iorb, :] = 0.0
# for iorb, norb in enumerate(self.gf_struct_sumk_dict[icrsh][block]):
# if self.sumk_to_solver[ish][(block, norb)][0] is None:
# trans[icrsh][block][iorb, :] = 0.0
return trans

@property
Expand Down Expand Up @@ -560,7 +556,6 @@ def pick_gf_struct_sumk(self, new_gf_struct):
gfs[icrsh][ind_sol[0]].append(ind_sol[1])
self.pick_gf_struct_solver(gfs)

# TODO!
def map_gf_struct_solver(self, mapping):
r""" Map the Green function structure from one struct to another.
Expand Down Expand Up @@ -611,6 +606,11 @@ def map_gf_struct_solver(self, mapping):
for k in list(self.sumk_to_solver[ish].keys()):
if not k in su2so:
su2so[k] = (None, None)

for new_block in gf_struct:
assert all(np.sort(gf_struct[new_block]) == list(range(len(gf_struct[new_block])))) ,\
"New gf_struct does not have valid 0-based indices!"
gf_struct[new_block] = len(gf_struct[new_block])

self.adapt_deg_shells(gf_struct, ish)

Expand Down

0 comments on commit abf70b6

Please sign in to comment.