dmft_tools.initial_self_energies
Contains all functions related to determining the double counting and the initial self-energy.
- dmft_tools.initial_self_energies._load_sigma_from_h5(h5_archive, iteration)[source]
Reads impurity self-energy for all impurities from file and returns them as a list
- Parameters:
- h5_archiveHDFArchive
HDFArchive to read from
- iterationint
at which iteration will sigma be loaded
- Returns:
- self_energieslist of green functions
- dc_impnumpy array
DC potentials
- dc_energynumpy array
DC energies per impurity
- density_matrixnumpy arrays
Density matrix from the previous self-energy
- dmft_tools.initial_self_energies._set_loaded_sigma(sum_k, loaded_sigma, loaded_dc_imp, general_params)[source]
Adjusts for the Hartree shift when loading a self energy Sigma_freq from a previous calculation that was run with a different U, J or double counting.
- Parameters:
- sum_kSumkDFT object
Sumk object with the information about the correct block structure
- loaded_sigmalist of BlockGf (Green’s function) objects
List of Sigmas loaded from the previous calculation
- loaded_dc_implist of dicts
List of dicts containing the loaded DC. Used to adjust the Hartree shift.
- general_paramsdict
general parameters as a dict
- Returns:
- start_sigmalist of BlockGf (Green’s function) objects
List of Sigmas, loaded Sigma adjusted for the new Hartree term
- Raises:
- ValueError
Raised if the block structure between the loaded and the Sumk DC_imp does not agree.
- dmft_tools.initial_self_energies._sumk_sigma_to_solver_struct(sum_k, start_sigma)[source]
Extracts the local Sigma. Copied from SumkDFT.extract_G_loc, version 2.1.x.
- Parameters:
- sum_kSumkDFT object
Sumk object with the information about the correct block structure
- start_sigmalist of BlockGf (Green’s function) objects
List of Sigmas in sum_k block structure that are to be converted.
- Returns:
- Sigma_inequivlist of BlockGf (Green’s function) objects
List of Sigmas that can be used to initialize the solver
- dmft_tools.initial_self_energies.calculate_double_counting(sum_k, density_matrix, general_params, gw_params, advanced_params, solver_type_per_imp, G_loc_all=None)[source]
Calculates the double counting, including all manipulations from advanced_params.
- Parameters:
- sum_kSumkDFT object
- density_matrixlist of gf_struct_solver like
List of density matrices for all inequivalent shells
- general_paramsdict
general parameters as a dict
- gw_paramsdict
GW parameters as a dict
- advanced_paramsdict
advanced parameters as a dict
- solver_type_per_implist of str
List of solver types for each impurity
- G_loc_alllist of BlockGf (Green’s function) objects, optional
List of local Green’s functions for all shells
- Returns:
- sum_kSumKDFT object
The SumKDFT object containing the updated double counting
- dmft_tools.initial_self_energies.determine_dc_and_initial_sigma(general_params, gw_params, advanced_params, sum_k, archive, iteration_offset, G_loc_all, solvers, solver_type_per_imp)[source]
Determines the double counting (DC) and the initial Sigma. This can happen in five different ways: * Calculation resumed: use the previous DC and the Sigma of the last complete calculation.
Calculation initialized with load_sigma: use the DC and Sigma from the previous file. If the DC changed (and therefore the Hartree shift), the initial Sigma is adjusted by that.
New calculation, with DC: calculate the DC, then initialize the Sigma as the DC, effectively starting the calculation from the DFT Green’s function. Also breaks magnetic symmetry if calculation is magnetic.
New calculation, without DC: Sigma is initialized as 0, starting the calculation from the DFT Green’s function.
- Parameters:
- general_paramsdict
general parameters as a dict
- gw_paramsdict
GW parameters as a dict
- advanced_paramsdict
advanced parameters as a dict
- sum_kSumkDFT object
Sumk object with the information about the correct block structure
- archiveHDFArchive
the archive of the current calculation
- iteration_offsetint
the iterations done before this calculation
- G_loc_allGf
local Green function for all shells
- solverslist
list of Solver instances
- Returns:
- sum_kSumkDFT object
the SumkDFT object, updated by the initial Sigma and the DC
- solverslist
list of Solver instances, updated by the initial Sigma