mirror of
https://github.com/triqs/dft_tools
synced 2025-03-14 20:56:51 +01:00
Update map_gf_struct_solver function to new gf_struct convention
This commit is contained in:
parent
0a95ffd9d0
commit
abf70b6ead
@ -280,13 +280,9 @@ class BlockStructure(object):
|
|||||||
|
|
||||||
# zero out all the lines of the transformation that are
|
# zero out all the lines of the transformation that are
|
||||||
# not included in gf_struct_solver
|
# not included in gf_struct_solver
|
||||||
#TODO CHECK THIS!
|
|
||||||
for iorb in range(self.gf_struct_sumk_dict[icrsh][block]):
|
for iorb in range(self.gf_struct_sumk_dict[icrsh][block]):
|
||||||
if self.sumk_to_solver[ish][(block, iorb)][0] is None:
|
if self.sumk_to_solver[ish][(block, iorb)][0] is None:
|
||||||
trans[icrsh][block][iorb, :] = 0.0
|
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
|
return trans
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -560,7 +556,6 @@ class BlockStructure(object):
|
|||||||
gfs[icrsh][ind_sol[0]].append(ind_sol[1])
|
gfs[icrsh][ind_sol[0]].append(ind_sol[1])
|
||||||
self.pick_gf_struct_solver(gfs)
|
self.pick_gf_struct_solver(gfs)
|
||||||
|
|
||||||
# TODO!
|
|
||||||
def map_gf_struct_solver(self, mapping):
|
def map_gf_struct_solver(self, mapping):
|
||||||
r""" Map the Green function structure from one struct to another.
|
r""" Map the Green function structure from one struct to another.
|
||||||
|
|
||||||
@ -612,6 +607,11 @@ class BlockStructure(object):
|
|||||||
if not k in su2so:
|
if not k in su2so:
|
||||||
su2so[k] = (None, None)
|
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)
|
self.adapt_deg_shells(gf_struct, ish)
|
||||||
|
|
||||||
self.gf_struct_solver[ish] = gf_struct
|
self.gf_struct_solver[ish] = gf_struct
|
||||||
|
Loading…
x
Reference in New Issue
Block a user