postprocessing.maxent_gf_latt
Analytic continuation of the lattice Green’s function to the lattice spectral function using maxent.
Reads G_latt(i omega) from the h5 archive and writes A_latt(omega) back. See the docstring of main() for more information.
mpi parallelized for the generation of the imaginary-frequency lattice GF over k points.
Author: Maximilian Merkel, Materials Theory Group, ETH Zurich, 2020 - 2022
- postprocessing.maxent_gf_latt._generate_lattice_gf(sum_k, sum_spins)[source]
Generates the lattice GF from the SumkDFT object. If sum_spins, it has one block “total”. Otherwise, the block names are the spins.
- postprocessing.maxent_gf_latt._read_h5(external_path, iteration)[source]
Reads the h5 archive to get the Matsubara self energy, the double-counting potential, the chemical potential and the block structure.
- Parameters:
- external_pathstring
path to h5 archive
- iterationint
The iteration that is being read from, None corresponds to ‘last_iter’
- Returns:
- sigma_iwlist
Self energy as block Green’s function for each impurity
- chemical_potentialfloat
The chemical potential of the problem. Should be approximately real
- dc_potentiallist
Double counting for each impurity
- block_structuretriqs_dft_tools.BlockStructure
Block structure mapping from the DMFT calculation
- postprocessing.maxent_gf_latt._run_maxent(gf_lattice_iw, sum_k, error, omega_min, omega_max, n_points_maxent, n_points_alpha, analyzer='LineFitAnalyzer')[source]
Runs maxent to get the spectral function from the block GF.
- postprocessing.maxent_gf_latt._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_latt._unpack_maxent_results(results, omega_mesh)[source]
Converts maxent result to dict with mesh and spectral function from each analyzer.
- postprocessing.maxent_gf_latt._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_latt.main(external_path, iteration=None, sum_spins=False, maxent_error=0.02, n_points_maxent=200, n_points_alpha=50, omega_min=None, omega_max=None)[source]
Main function that reads the lattice Green’s function (GF) from h5, analytically continues it, writes the result back to the h5 archive and also returns the results. Only the trace can be used because the Kohn-Sham energies (“hopping”) are not sorted by “orbital” but by energy, leading to crossovers.
- Parameters:
- external_path: string
Path to the h5 archive to read from and write to.
- iteration: int/string
Iteration to read from and write to. Defaults to last_iter.
- sum_spins: bool
Whether to sum over the spins or continue the lattice 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 lattice GF for correct normalization. If omega_min and omega_max are None, they are chosen automatically based on the diagonal entries in the hopping matrix but at least to -20…20 eV.
- omega_maxfloat
Upper end of range where the GF is being continued. See omega_min.
- Returns:
- unpacked_resultsdict
The omega mesh and lattice spectral function from two different analyzers