dmft_tools.observables

Contains all functions related to the observables.

dmft_tools.observables.add_dft_values_as_zeroth_iteration(observables, general_params, solver_type_per_imp, dft_mu, dft_energy, sum_k, G_loc_all_dft, shell_multiplicity)[source]

Calculates the DFT observables that should be written as the zeroth iteration.

Parameters:
observablesobservable arrays/dicts
general_paramsgeneral parameters as a dict
solver_type_per_implist of strings

list of solver types for each impurity

dft_mudft chemical potential
sum_kSumK Object instances
G_loc_all_dftGloc from DFT for G(beta/2)
shell_multiplicitydegeneracy of impurities
Returns:
observables: list of dicts
dmft_tools.observables.add_dmft_observables(observables, general_params, solver_params, map_imp_solver, solver_type_per_imp, dft_energy, it, solvers, h_int, previous_mu, sum_k, density_mat, shell_multiplicity, E_bandcorr)[source]

calculates the observables for given Input, I decided to calculate the observables not adhoc since it should be done only once by the master_node

Parameters:
observablesobservable arrays/dicts
general_paramsgeneral parameters as a dict
solver_paramssolver parameters as a dict
ititeration counter
solversSolver instances
h_intinteraction hamiltonian
previous_mudmft chemical potential for which the calculation was just done
sum_kSumK Object instances
density_matDMFT occupations
shell_multiplicitydegeneracy of impurities
E_bandcorrE_kin_dmft - E_kin_dft, either calculated man or from sum_k method if CSC
Returns:
observables: list of dicts
dmft_tools.observables.calc_Z(Sigma)[source]

calculates the inverse mass enhancement from the impurity self-energy by a simple linear fit estimate: [ 1 - ((Im S_iw[n_iw0+1]-S_iw[n_iw0])/(iw[n_iw0+1]-iw[n_iw0])) ]^-1

Parameters:
Sigma: Gf on MeshImFreq

self-energy on Matsubara mesh

Returns:
orb_Z: 1d numpy array

list of Z values per orbital in Sigma

dmft_tools.observables.calc_bandcorr_man(general_params, sum_k, E_kin_dft)[source]

Calculates the correlated kinetic energy from DMFT for target states and then determines the band correction energy

Parameters:
general_paramsdict

general parameters as a dict

sum_kSumK Object instances
E_kin_dft: float

kinetic energy from DFT

Returns:
E_bandcorr: float

band energy correction E_kin_dmft - E_kin_dft

dmft_tools.observables.calc_dft_kin_en(general_params, sum_k, dft_mu)[source]

Calculates the kinetic energy from DFT for target states

Parameters:
general_paramsdict

general parameters as a dict

sum_kSumK Object instances
dft_mu: float

DFT fermi energy

Returns:
E_kin_dft: float

kinetic energy from DFT

dmft_tools.observables.prep_observables(h5_archive, sum_k)[source]

prepares the observable arrays and files for the DMFT calculation

Parameters:
h5_archive: hdf archive instance

hdf archive for calculation

sum_kSumK Object instances
Returns:
observablesdict

observable array for calculation

dmft_tools.observables.write_header_to_file(general_params, sum_k)[source]

Writes the header to the observable files

Parameters:
general_paramsdict

general parameters as a dict

n_inequiv_shellsint

number of impurities for calculations

Returns:
nothing
dmft_tools.observables.write_obs(observables, sum_k, general_params)[source]

writes the last entries of the observable arrays to the files

Parameters:
observableslist of dicts

observable arrays/dicts

sum_kSumK Object instances
general_paramsdict
Returns:
nothing