postprocessing.maxent_gf_imp
Analytic continuation of the impurity Green’s function to the impurity spectral function using maxent.
Reads G_imp(i omega) from the h5 archive and writes A_imp(omega) back. See the docstring of main() for more information.
Not mpi parallelized.
Author: Maximilian Merkel, Materials Theory Group, ETH Zurich, 2020 - 2022
- postprocessing.maxent_gf_imp._read_h5(external_path, iteration)[source]
Reads the h5 archive to get the impurity Green’s functions.
- Parameters:
- external_pathstring
path to h5 archive
- iterationint
The iteration that is being read from, None corresponds to ‘last_iter’
- Returns:
- gf_imp_taulist
Impurity Green’s function as block Green’s function for each impurity
- postprocessing.maxent_gf_imp._run_maxent(gf_imp_list, maxent_error, n_points_maxent, n_points_alpha, omega_min, omega_max, analyzer='LineFitAnalyzer')[source]
Runs maxent to get the spectral functions from the list of block GFs.
- postprocessing.maxent_gf_imp._strtobool(val)[source]
Convert a string representation of truth to true (1) or false (0). True values are ‘y’, ‘yes’, ‘t’, ‘true’, ‘on’, and ‘1’; false values are ‘n’, ‘no’, ‘f’, ‘false’, ‘off’, and ‘0’. Raises ValueError if ‘val’ is anything else. Copied from distutils.util in python 3.10.
- postprocessing.maxent_gf_imp._sum_greens_functions(block_gf, sum_spins)[source]
Sums over spin channels if sum_spins. It combines “up” and “down” into one block “total”, or for SOC, simply renames the blocks ud into “total”.
- postprocessing.maxent_gf_imp._write_spectral_function_to_h5(unpacked_results, external_path, iteration)[source]
Writes the mesh and the maxent result for each analyzer to h5 archive.
- postprocessing.maxent_gf_imp.main(external_path, iteration=None, sum_spins=False, maxent_error=0.02, n_points_maxent=200, n_points_alpha=50, omega_min=-20, omega_max=20)[source]
Main function that reads the impurity Greens (GF) function from h5, analytically continues it, writes the result back to the h5 archive and also returns the results.
- Parameters:
- external_pathstring
Path to the h5 archive to read from and write to.
- iterationint/string
Iteration to read from and write to. Defaults to last_iter.
- sum_spinsbool
Whether to sum over the spins or continue the impurity GF for the up and down spin separately, for example for magnetized results.
- maxent_errorfloat
The error that is used for the analyzers.
- n_points_maxentint
Number of omega points on the hyperbolic mesh used in the continuation.
- n_points_alphaint
Number of points that the MaxEnt alpha parameter is varied on logarithmically.
- omega_minfloat
Lower end of range where the GF is being continued. Range has to comprise all features of the impurity GF for correct normalization.
- omega_maxfloat
Upper end of range where the GF is being continued. See omega_min.
- Returns:
- maxent_resultslist
The omega mesh and impurity spectral function from two different analyzers in a dict for each impurity