dgamore.config#
Global configuration singleton. This module holds the process-wide mutable state of a DGAmore run as module-level
instances of the *Config classes (box, lattice, sys, dmft, eliashberg,
lambda_correction, self_consistency, self_energy_interpolation, output, memory, ana_cont,
and the logger). ConfigParser populates these from a YAML file on rank 0, after which they are
broadcast to all MPI ranks; most modules read their parameters directly off this module rather than receiving them
as arguments, so mutating a field changes behavior everywhere. Each *Config class documents its fields; the
example YAML config is dgamore/dga_config.yaml.
- class dgamore.config.AnaContConfig[source]#
Bases:
objectStores the analytic-continuation (maximum-entropy) configuration.
- Variables:
do_spectrum_dga (bool) – Whether to continue the DGA Green’s function to real frequencies.
do_spectrum_dmft (bool) – Whether to continue the DMFT Green’s function to real frequencies.
w_count (int) – Number of real-frequency points.
plot_spectrum (bool) – Whether to plot the resulting spectral function.
k_path (list) – The k-path (list of
(kx, ky, kz, label)tuples) for the spectral function.energy_window (tuple) – The real-frequency window
(w_min, w_max).
- class dgamore.config.BoxConfig[source]#
Bases:
objectStores the Matsubara frequency box sizes. The main quantities live in the core region; explicit asymptotics correct it with shell-region quantities. The full region is the sum of core and shell and exists for convenience.
- Variables:
niw_core (int) – Number of positive bosonic core frequencies \(\omega\).
niv_core (int) – Number of positive fermionic core frequencies \(\nu\).
niv_shell (int) – Number of positive fermionic shell frequencies (asymptotic correction region).
niv_full (int) – Number of positive fermionic full-region frequencies (core + shell).
niv_dmft (int) – Number of positive fermionic frequencies available in the DMFT 1-particle input.
- class dgamore.config.DmftConfig[source]#
Bases:
objectStores the DMFT input-file parameters: the input path, the 1- and 2-particle data filenames, symmetrization options and the inequivalent-atom structure.
- Variables:
type (str) – DMFT solver/format of the input (e.g.
"w2dyn").input_path (str) – Directory containing the DMFT input files.
fname_1p (str) – Filename of the 1-particle data.
fname_2p (str) – Filename of the 2-particle data.
do_sym_v_vp (bool) – Whether to symmetrize the 2-particle data with respect to \((\nu, \nu')\).
symmetrize_orbitals (list) – 1-based orbital indices to symmetrize over (empty for none).
n_ineq (int) – Number of inequivalent atoms.
ineq_ordering (list) – Ordering of the inequivalent atoms.
n_bands_per_ineq (list) – Number of bands per inequivalent atom.
- class dgamore.config.EliashbergConfig[source]#
Bases:
objectStores the Eliashberg-step configuration: whether to run it, power-iteration settings, and saving options for the pairing/full vertex in pp notation.
- Variables:
perform_eliashberg (bool) – Whether to solve the Eliashberg equation.
save_pairing_vertex (bool) – Whether to save the singlet/triplet pairing vertices.
save_fq (bool) – Whether to save the full ladder vertex (in ph notation) in the irreducible BZ.
construct_fq_cheap (bool) – Whether to build the full vertex on the smaller pp frequency box (cheaper).
n_eig (int) – Number of leading eigenvalues/gap functions to compute per channel.
epsilon (float) – Convergence tolerance for the Lanczos eigensolver.
symmetry (str) – Initial gap-function symmetry (
"d-wave","p-wave-x","p-wave-y", or"random").include_local_part (bool) – Whether to add the local reducible pp diagrams to the pairing vertex.
subfolder_name (str) – Output subfolder name for Eliashberg results.
- class dgamore.config.InteractionConfig[source]#
Bases:
objectStores the interaction parameters. Currently only
udd,vdd,jddare used (local and Kanamori-type interactions); the remaining parameters are reserved for future use.- Variables:
udd (float) – Intra-orbital Hubbard interaction \(U_{dd}\) on the d orbitals.
udp (float) – Inter-orbital d-p Hubbard interaction.
upp (float) – Intra-orbital Hubbard interaction \(U_{pp}\) on the p orbitals.
uppod (float) – Off-diagonal p-p Hubbard interaction.
jdd (float) – Hund’s exchange \(J_{dd}\) on the d orbitals.
jdp (float) – Inter-orbital d-p exchange.
jpp (float) – Hund’s exchange \(J_{pp}\) on the p orbitals.
jppod (float) – Off-diagonal p-p exchange.
vdd (float) – Inter-orbital interaction \(V_{dd}\) on the d orbitals.
vpp (float) – Inter-orbital interaction \(V_{pp}\) on the p orbitals.
- class dgamore.config.LambdaCorrectionConfig[source]#
Bases:
objectStores the lambda-correction configuration.
- class dgamore.config.LatticeConfig[source]#
Bases:
objectStores the lattice parameters: the symmetries, lattice type, input Hamiltonian and input interaction. The k and q grids are built from the number of k/q points and the lattice symmetries. See
dga_config.yamlor the author’s master’s thesis for details.- Variables:
symmetries (list) – The lattice symmetries (a list of
KnownSymmetriesor the auto sentinel).type (str) – How the kinetic Hamiltonian is provided (e.g.
"from_wannier90").interaction_type (str) – How the interaction is provided (e.g.
"one_band_from_dmft").interaction_input (str | list) – Path(s) to the interaction input.
nk (tuple) – Number of k-points per spatial direction.
nq (tuple) – Number of q-points per spatial direction (defaults to
nk).interaction (InteractionConfig) – The
InteractionConfig.hamiltonian (Hamiltonian) – The
Hamiltonianinstance.k_grid (KGrid) – The k-space
KGrid.q_grid (KGrid) – The q-space
KGrid.
- class dgamore.config.MemoryConfig[source]#
Bases:
objectStores the speed-vs-memory trade-off switches. Each flag, when True, selects a slower but more memory-lean code path for the corresponding quantity.
- Variables:
save_memory_for_chi0q (bool) – Use the per-q einsum bubble instead of the FFT bubble.
save_memory_for_chiq_aux (bool) – Use the per-q auxiliary-susceptibility path and per-rank BZ mapping.
save_memory_for_sde (bool) – Use the q-loop self-energy contraction instead of the FFT one.
save_memory_for_fq (bool) – Use the per-q full-vertex construction in the Eliashberg step.
save_memory_for_lanczos (bool) – Use the frequency-distributed Lanczos solver.
- class dgamore.config.OutputConfig[source]#
Bases:
objectStores the output paths.
- Variables:
output_path (str) – Directory where the main results are written.
do_plotting (bool) – Whether to produce plots (rank 0 only).
plotting_path (str) – Directory where plots are written.
plotting_subfolder_name (str) – Subfolder name (under
plotting_path) for the plots.eliashberg_path (str) – Directory where Eliashberg results are written.
- class dgamore.config.SelfConsistencyConfig[source]#
Bases:
objectStores the self-consistency-loop parameters: the maximum iteration count, the convergence criterion, the mixing parameter/scheme and continuation options. If
previous_sc_pathis set, the loop resumes from a previous run. The mixing scheme can be"linear","pulay"or"anderson"(the latter two use an iteration history).- Variables:
max_iter (int) – Maximum number of self-consistency iterations.
epsilon (float) – Relative-residual convergence threshold on the self-energy.
mixing (float) – The mixing parameter \(\alpha\).
mixing_strategy (str) – The mixing scheme (
"linear","pulay"or"anderson").mixing_history_length (int) – Number of past iterations used by the accelerated mixing schemes.
previous_sc_path (str) – Path to a previous self-consistency run to resume from (empty to start fresh).
use_interpolated_sigma (bool) – Whether to resume from the interpolated rather than the raw self-energy.
use_lambda_correction (bool) – Whether the self-consistency loop applies the lambda correction.
restrict_chi_phys (bool) – Whether to restrict the physical susceptibility to positive values.
anderson_prev_res (float | None) – Cached previous Anderson residual (internal use).
- class dgamore.config.SelfEnergyInterpolationConfig[source]#
Bases:
objectStores the self-energy interpolation parameters (re-gridding to a different temperature/frequency box).
- class dgamore.config.SystemConfig[source]#
Bases:
objectStores the physical system parameters and derived quantities updated during the run.
- Variables:
beta (float) – Inverse temperature \(\beta\).
mu (float) – Chemical potential \(\mu\) (updated during self-consistency).
mu_dmft (float) – Chemical potential of the DMFT input.
n (float) – Total filling \(n\).
n_bands (int) – Number of bands.
occ (ndarray) – Local (k-averaged) occupation matrix.
occ_k (ndarray) – Full (k-resolved) occupation matrix.
occ_dmft (ndarray) – Local occupation matrix from the DMFT input.
occ_dmft_per_ineq (list) – DMFT occupation matrices per inequivalent atom.