dmft_cycle

main DMFT cycle, DMFT step, and helper functions

dmft_cycle._calculate_rotation_matrix(general_params, sum_k)[source]

Applies rotation matrix to make the DMFT calculations easier for the solver. Possible are rotations diagonalizing either the local Hamiltonian or the density. Diagonalizing the density has not proven really helpful but diagonalizing the local Hamiltonian has. Note that the interaction Hamiltonian has to be rotated if it is not fully orbital-gauge invariant (only the Kanamori fulfills that).

Parameters:
general_paramsdict

general parameters as a dict

sum_kSumkDFT object

Sumk Object

Returns:
sum_kSumkDFT Object

updated Sumk object with the new rotation matrices

dmft_cycle._chi_setup(sum_k, solver_params, map_imp_solver)[source]
Parameters:
sum_kSumkDFT object

Sumk object with the information about the correct block structure

solver_params: solver params dict
Returns:
ops_chi_measurementlist of one-particle operators to measure per impurity
dmft_cycle._determine_block_structure(sum_k, general_params, advanced_params, solver_type_per_imp, dens_mat)[source]

Determines block structrure and degenerate deg_shells computes first DFT density matrix to determine block structure and changes the density matrix according to needs i.e. magnetic calculations, or keep off-diag elements

Parameters:
sum_kSumK Object instances
Returns:
sum_kSumK Object instances

updated sum_k Object

dmft_cycle._dmft_step(sum_k, solvers, it, general_params, solver_params, gw_params, advanced_params, dft_params, map_imp_solver, solver_type_per_imp, h_int, archive, shell_multiplicity, E_kin_dft, observables, conv_obs, ops_chi_measure, dft_irred_kpt_indices, dft_energy, broadening, is_converged, is_sampling)[source]

Contains the actual dmft steps when all the preparation is done

dmft_cycle._extract_quantity_per_inequiv(param_name, n_inequiv_shells, general_params)[source]

For quantities that can be different for each inequivalent shell, this function checks if the quantity is a single value or a list of the correct length. If just a single value is given, this value is applied to each shell.

Parameters:
param_namestr

name of the parameter to be checked

n_inequiv_shellsint

number of inequivalent shells

general_paramsdict

general parameters as a dict

Returns:
general_paramsdict

updated general parameters as a dict

dmft_cycle.dmft_cycle(general_params, solver_params, advanced_params, dft_params, gw_params, n_iter, dft_irred_kpt_indices=None, dft_energy=None)[source]

main dmft cycle that works for one shot and CSC equally

Parameters:
general_paramsdict

general parameters as a dict

solver_paramsdict

solver parameters as a dict

advanced_paramsdict

advanced parameters as a dict

dft_paramsdict

dft parameters as a dict

gw_paramsdict

gw parameters as a dict

n_iterint

number of iterations to be executed

dft_irred_kpt_indices: iterable of int

If given, writes density correction for csc calculations only for irreducible kpoints

Returns:
observablesdict

updated observable array for calculation