Skip to content

Commit

Permalink
[feat] introduce dc_imp_dyn for dynamic part of interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
the-hampel committed May 13, 2024
1 parent 8f5a3b8 commit 10bf947
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions python/triqs_dft_tools/sumk_dft.py
Original file line number Diff line number Diff line change
Expand Up @@ -1657,11 +1657,13 @@ def init_dc(self):
"""
self.dc_imp = [{} for icrsh in range(self.n_corr_shells)]
self.dc_imp_dyn = [{} for icrsh in range(self.n_corr_shells)]
for icrsh in range(self.n_corr_shells):
dim = self.corr_shells[icrsh]['dim']
spn = self.spin_block_names[self.corr_shells[icrsh]['SO']]
for sp in spn:
self.dc_imp[icrsh][sp] = np.zeros([dim, dim], float)
self.dc_imp_dyn[icrsh][sp] = None
self.dc_energ = [0.0 for icrsh in range(self.n_corr_shells)]

def set_dc(self, dc_imp, dc_energ):
Expand Down Expand Up @@ -1812,14 +1814,16 @@ def add_dc(self):
for bname, gf in sigma_minus_dc[icrsh]:
# Transform dc_imp to global coordinate system
if self.use_rotations:
# if dc_imp is an numpy array simple rotate by hand, otherwise assume it is a triqs Gf
if isinstance(self.dc_imp[icrsh][bname], np.ndarray):
gf -= np.dot(self.rot_mat[icrsh], np.dot(self.dc_imp[icrsh][bname], self.rot_mat[icrsh].conjugate().transpose()))
else:
gf -= self.rotloc(icrsh, self.dc_imp[icrsh][bname], direction='toGlobal')
gf -= np.dot(self.rot_mat[icrsh], np.dot(self.dc_imp[icrsh][bname], self.rot_mat[icrsh].conjugate().transpose()))
else:
gf -= self.dc_imp[icrsh][bname]

if self.dc_imp_dyn[icrsh][bname] is not None:
if self.use_rotations:
gf -= self.rotloc(icrsh, self.dc_imp_dyn[icrsh][bname], direction='toGlobal')
else:
gf -= self.dc_imp_dyn[icrsh][bname]

return sigma_minus_dc

def symm_deg_gf(self, gf_to_symm, ish=0):
Expand Down

0 comments on commit 10bf947

Please sign in to comment.