postprocessing.plot_correlated_bands

Reads DMFT_ouput observables such as real-frequency Sigma and a Wannier90 TB Hamiltonian to compute spectral properties. It runs in two modes, either calculating the bandstructure or Fermi slice.

Written by Sophie Beck, 2021-2022

TODO: - extend to multi impurity systems - make proper use of rot_mat from DFT_Tools (atm it assumed that wannier_hr and Sigma are written in the same basis)

postprocessing.plot_correlated_bands._calc_alatt(n_orb, mu, eta, e_mat, sigma, qp_bands=False, e_vecs=None, proj_nuk=None, proj_orb=None, trace=True, **freq_dict)[source]

calculate slice of lattice spectral function for given TB dispersion / e_mat and self-energy

Parameters:
n_orbint

number of Wannier orbitals

proj_nukoptinal, 2D numpy array (n_orb, n_k)

projections to be applied on A(k,w) in band basis. Only works when band_basis=True

proj_orboptional, 1D numpy array (n_orb)

projections to be applied on A(k,w) in the Wannier orbital basis. In contrast to proj_nuk this is exact, because A(k,w) is diagonal in the same basis the projection is defined in, and no band basis is needed

Returns:
alatt_k_wnumpy array, either (n_k, n_w) or if trace=False (n_k, n_w, n_orb)

Lattice Green’s function on specified k-path / mesh

postprocessing.plot_correlated_bands._calc_kslice(n_orb, mu, eta, e_mat, sigma, qp_bands, e_vecs=None, proj_nuk=None, proj_orb=None, **freq_dict)[source]

calculate lattice spectral function for given TB dispersion / e_mat and self-energy

Parameters:
n_orbint

number of Wannier orbitals

proj_nukoptinal, 2D numpy array (n_orb, n_k)

projections to be applied on A(k,w) in band basis. Only works when band_basis=True

proj_orboptional, 1D numpy array (n_orb)

projections to be applied on A(k,w) in the Wannier orbital basis, exact and without going through the band basis

Returns:
alatt_k_wnumpy array, either (n_k, n_w) or if trace=False (n_k, n_w, n_orb)

Lattice Green’s function on specified k-path / mesh

postprocessing.plot_correlated_bands._check_sigma_embedding(sum_k, n_orb, embedding, tb_hloc=None, explicit_embedding=False, tol=0.001)[source]

Sanity checks for writing the impurity self-energy into the tight-binding basis. All of these warn, none of them abort: the underlying operation is well defined in every case, but the result may not be the object the user expects.

  1. Disentanglement. If the archive was written with bloch_basis=True and an outer window larger than the number of Wannier functions, the number of bands exceeds n_orb. The projectors are then an isometry rather than a unitary, so A(k,w) of the Wannier model is not the lattice spectral function of the DMFT calculation, and mu was converged for a different electron count.

  2. Provenance. “correlated Wannier functions first” is a wannier90 convention. For other DFT codes the correlated basis is whatever the projectors define and the tight-binding model comes from elsewhere.

  3. Local Hamiltonian. Downfolding the archive Hamiltonian with proj_mat gives the local Hamiltonian of each correlated shell in the Wannier basis, in every mode: P H P^dag = U^dag eps U = H_W(k), whose k average is H_W(R=0). Comparing its eigenvalues with those of the corresponding block of the tight-binding H(R=0) validates the embedding. Eigenvalues are used because they are invariant under the orbital order conventions that differ between the archive and seed_hr.dat, and the traceless part is compared because the archive Hamiltonian has the Fermi energy subtracted while the tight-binding one has not.

    What this cannot see, by construction: a wrong order within a shell, since eigenvalues are sorted, and a wrong set of orbitals when both the selected and the correct block are internally degenerate, since the traceless eigenvalues are then zero on both sides. Cubic t2g and eg shells are exactly that case. It is a guard against a grossly wrong mapping, not a proof that the mapping is right.

postprocessing.plot_correlated_bands._get_sigma_embedding(sum_k, n_orb, sigma_embedding=None)[source]

Determines which orbitals of the n_orb tight-binding (Wannier) basis the self-energy of each correlated shell is written into.

The impurity self-energy lives in the Wannier basis of the correlated shells, and so does the tight-binding Hamiltonian read from seed_hr.dat. Placing the former into the latter is therefore a purely k-independent index operation and does not involve proj_mat. By default the wannier90 convention is assumed, i.e. the correlated Wannier functions come first in seed_hr.dat, ordered as the correlated shells.

Parameters:
sum_kSumkDFT

SumkDFT object of the DMFT archive.

n_orbint

Number of Wannier orbitals of the tight-binding model.

sigma_embeddinglist of list of int, optional

Explicit mapping, one entry per correlated shell, giving the indices of the tight-binding orbitals that shell occupies. Overrides the default.

Returns:
embeddinglist of np.ndarray

Orbital indices per correlated shell.

postprocessing.plot_correlated_bands.get_dmft_bands(n_orb, mu_tb, w90_path=None, w90_seed=None, TB_obj=None, add_spin=False, add_lambda=None, add_local=None, with_sigma=None, fermi_slice=False, qp_bands=False, orbital_order_to=None, add_mu_tb=False, band_basis=False, proj_on_orb=None, trace=True, eta=0.0, mu_shift=0.0, proj_nuk=None, sigma_embedding=None, **specs)[source]

Extract tight-binding from given w90 seed_hr.dat and seed.wout files or alternatively given TB_obj, and then extract from given solid_dmft calculation the self-energy and construct the spectral function A(k,w) on given k-path.

Parameters:
n_orbint

Number of Wannier orbitals in seed_hr.dat

mu_tbfloat

Chemical potential of tight-binding calculation

w90_pathstring

Path to w90 files

w90_seedstring

Seed of wannier90 calculation, i.e. seed_hr.dat and seed.wout

TB_objTB object

Tight-binding object from TB_from_wannier90

add_spinbool, default=False

Extend w90 Hamiltonian by spin indices

add_lambdafloat, default=None

Add SOC term with strength add_lambda (works only for t2g shells)

add_localnumpy array, default=None

Add local term of dimension (n_orb x n_orb)

with_sigmastr, or BlockGf, default=None

Add self-energy to spectral function? Can be either directly take a triqs BlockGf object or can be either ‘calc’ or ‘model’ ‘calc’ reads results from h5 archive (solid_dmft) in case ‘calc’ or ‘model’ are specified a extra kwargs dict has to be given sigma_dict containing information about the self-energy

add_mu_tbbool, default=False

Add the TB specified chemical potential to the lattice Green function set to True if DMFT calculation was performed with DFT fermi subtracted.

proj_on_orbint or list of int, default=None

orbital projections to be made for the spectral function and TB bands the integer refer to the orbitals read. The projection is taken on the diagonal of the lattice Green function in the Wannier orbital basis and is therefore exact. Passing band_basis=True instead weights the band-resolved spectral function with the orbital character |<orb|band>|^2, which is the usual fat-band picture but differs from the orbital-resolved spectral function whenever the self-energy is orbital dependent. Both give the same trace.

tracebool, default=True

Return trace over orbitals for spectral function. For special post-processing purposes this can be set to False giving the returned alatt_k_w an extra dimension n_orb

etafloat, default=0.0

Broadening of spectral function, finitie shift on imaginary axis if with_sigma=None it has to be provided !=0.0

mu_shiftfloat, default=0.0

Manual extra shift when calculating the spectral function

proj_nuknumpy array, default [None]

Extra projections to be applied to the final spectral function per orbital and k-point. Has to match shape of final lattice Green function. Will be applied together with proj_on_orb if specified.

sigma_embeddinglist of list of int, optional

Which orbitals of the tight-binding model each correlated shell of the DMFT archive occupies, one entry per correlated shell. By default the wannier90 convention is assumed, i.e. the correlated Wannier functions are the first orbitals of seed_hr.dat, ordered as the correlated shells. Only needed if the tight-binding model orders its orbitals differently, e.g. for an archive written by a non-wannier90 converter. The indices refer to the orbital order of the DMFT archive, i.e. orbital_order_dmft, which is the basis the self-energy is written into before it is rotated to orbital_order_to. Note that proj_on_orb indexes orbital_order_to instead.

Returns:
tb_datadict

tight binding dict containing the kpoint mesh, dispersion / emat, and eigenvectors

alatt_k_wnumpy array (float) of dim n_k x n_w ( x n_orb if trace=False)

lattice spectral function data on the kpoint mesh defined in tb_data and frequency mesh defined in freq_dict

freq_dictdict

frequency mesh information on which alatt_k_w is evaluated

postprocessing.plot_correlated_bands.get_tb_bands(e_mat, proj_on_orb=[None], **specs)[source]

calculate eigenvalues and eigenvectors for given list of e_mat on kmesh

Parameters:
e_matnumpy array of shape (n_orb, n_orb, nk) or (n_orb, n_orb, nk, nk)
Returns:
e_valnumpy array of shape (n_orb, n_orb, nk) or (n_orb, n_orb, nk, nk)

eigenvalues as matrix

e_vecnumpy array of shape (n_orb, n_orb, nk) or (n_orb, n_orb, nk, nk)

eigenvectors as matrix