dgamore.dga_io#
High-level DMFT input loading and run setup. This module ties the DMFT interface, the global config and the lattice Hamiltonian together: it reads the 1- and 2-particle DMFT quantities (per inequivalent atom), updates the global config (temperature, chemical potential, interaction, frequency boxes, output paths), builds the kinetic and interaction Hamiltonian from the configured inputs, and applies the requested symmetrizations.
Functions
Loads the per-inequivalent-atom DMFT quantities (1- and 2-particle) and updates the global config: inverse temperature, interaction parameters, chemical potential, filling, frequency boxes, band count, Hamiltonian and output paths. |
|
|
Sets the Hamiltonian based on the input from the config file. |
|
Appends an incrementing suffix to |
|
Updates the global frequency-box sizes from the frequencies available in the DMFT four-point object: unset ( |
- dgamore.dga_io.load_from_dmft_file_and_update_config() tuple[list[GreensFunction], list[SelfEnergy], list[LocalFourPoint], list[LocalFourPoint]][source]#
Loads the per-inequivalent-atom DMFT quantities (1- and 2-particle) and updates the global config: inverse temperature, interaction parameters, chemical potential, filling, frequency boxes, band count, Hamiltonian and output paths. Also cuts the two-particle Green’s functions to the core box and applies the requested orbital and \((\nu, \nu')\) symmetrizations.
- Returns:
A tuple of per-inequivalent-atom lists
(g_per_ineq, sigma_per_ineq, g2_dens_per_ineq, g2_magn_per_ineq)of Green’s functions, self-energies and density/magnetic two-particle Green’s functions.- Raises:
ValueError – If the configured DMFT input type is unsupported.
- Return type:
tuple[list[GreensFunction], list[SelfEnergy], list[LocalFourPoint], list[LocalFourPoint]]
- dgamore.dga_io.set_hamiltonian(er_type: str, er_input: str | list, int_type: str, int_input: str | list) Hamiltonian[source]#
Sets the Hamiltonian based on the input from the config file.
The kinetic part can be set in two ways:
By providing the single-band hopping parameters t, tp, tpp.
By providing the path + filename to the wannier_hr / wannier_hk file.
The interaction can be set in three ways:
By retrieving the data from the DMFT files.
By providing the Kanamori interaction parameters [n_bands, U, J, (V)].
By providing the full path + filename to the U-matrix file.
- Parameters:
er_type (str) – The kinetic-input type (
"t_tp_tpp","from_wannier90"or"from_wannierhk").er_input (str | list) – The kinetic input: the
[t, tp, tpp]list, or a path to the hopping file.int_type (str) – The interaction type (
"one_band_from_dmft","kanamori_from_dmft"or"custom").int_input (str | list) – The interaction input (path to the U-matrix file for the
"custom"type).
- Returns:
The constructed
Hamiltonianwith kinetic and interaction terms.- Raises:
ValueError – If a kinetic/interaction input has the wrong type.
NotImplementedError – If the kinetic or interaction type is unsupported.
- Return type:
- dgamore.dga_io.uniquify_path(path: str = None)[source]#
Appends an incrementing suffix to
pathuntil it does not collide with an existing file/directory.- Parameters:
path (str) – The candidate path to make unique.
- Returns:
A path that does not yet exist (
pathitself if it was already free).
- dgamore.dga_io.update_frequency_boxes(niw: int, niv: int) None[source]#
Updates the global frequency-box sizes from the frequencies available in the DMFT four-point object: unset (
-1) boxes are filled with the available counts, and over-large requested boxes are clamped to what is available. Recomputesniv_full.