3
0
mirror of https://github.com/triqs/dft_tools synced 2024-06-29 00:15:00 +02:00

Merge pull request #205 from phibeck/sumk_bugfix

Bugfix for analyse_block_structure in sumk_dft
This commit is contained in:
Alexander Hampel 2022-03-01 12:01:03 -05:00 committed by GitHub
commit 94630a4495
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -729,8 +729,8 @@ class SumkDFT(object):
G_loc : list of BlockGf (Green's function) objects
List of the local Green's functions for all (inequivalent) correlated shells,
rotated into the corresponding local frames.
If ``transform_to_solver_blocks`` is True, it will be one per correlated shell, else one per
inequivalent correlated shell.
If ``transform_to_solver_blocks`` is True, it will be one per inequivalent correlated shell, else one per
correlated shell.
"""
if mu is None:
@ -853,11 +853,11 @@ class SumkDFT(object):
If include_shells is not provided all correlated shells will be analysed.
dm : list of dict, optional
List of density matrices from which block stuctures are to be analysed.
Each density matrix is a dict {block names: 2d numpy arrays}.
Each density matrix is a dict {block names: 2d numpy arrays} for each correlated shell.
If not provided, dm will be calculated from the DFT Hamiltonian by a simple-point BZ integration.
hloc : list of dict, optional
List of local Hamiltonian matrices from which block stuctures are to be analysed
Each Hamiltonian is a dict {block names: 2d numpy arrays}.
Each Hamiltonian is a dict {block names: 2d numpy arrays} for each inequivalent shell.
If not provided, it will be calculated using eff_atomic_levels.
"""
@ -873,8 +873,6 @@ class SumkDFT(object):
for ish in range(self.n_inequiv_shells)]
if hloc is None:
hloc = self.eff_atomic_levels()
H_loc = [hloc[self.corr_to_inequiv[ish]]
for ish in range(self.n_corr_shells)]
if include_shells is None:
include_shells = list(range(self.n_inequiv_shells))
@ -884,7 +882,7 @@ class SumkDFT(object):
n_orb = self.corr_shells[self.inequiv_to_corr[ish]]['dim']
# gives an index list of entries larger that threshold
dmbool = (abs(dens_mat[ish][sp]) > threshold)
hlocbool = (abs(H_loc[ish][sp]) > threshold)
hlocbool = (abs(hloc[ish][sp]) > threshold)
# Determine off-diagonal entries in upper triangular part of
# density matrix