dgamore.dmft_interface#

DMFT input interface. DMFTInterface is the abstract contract for reading the quantities a DGA run needs from a converged DMFT calculation (inverse temperature, chemical potential, fillings, interaction parameters, the 1-particle Green’s function/self-energy and the 2-particle Green’s function). W2dynInterface implements it for w2dynamics HDF5 output (handling multiple inequivalent atoms); TriqsInterface is a placeholder. The 2-particle Green’s function is expected in the w2dynamics frequency convention.

class dgamore.dmft_interface.DMFTInterface[source]#

Bases: ABC

Abstract interface for DMFT calculations. Reads the quantities needed for a DGA calculation from the output files.

get_beta() float[source]#

Returns the inverse temperature from the DMFT calculation.

Returns:

The inverse temperature \(\beta\) from the DMFT calculation.

Raises:

NotImplementedError – In the abstract base class.

Return type:

float

get_dc(ineq: int = 1) float[source]#

Returns the double-counting correction for the self-energy from the DMFT calculation.

Parameters:

ineq (int) – The index of the inequivalent atom (for multi-site DMFT).

Returns:

The double-counting correction for the self-energy.

Raises:

NotImplementedError – In the abstract base class.

Return type:

float

get_g2iw(channel: SpinChannel, ineq: int = 1) LocalFourPoint[source]#

Returns the two-particle Green’s function from DMFT. The input must follow the w2dynamics frequency convention: \(\nu_1 = \nu\), \(\nu_2 = \nu-\omega\), \(\nu_3 = \nu'-\omega\), \(\nu_4 = \nu'\).

Parameters:
  • channel (SpinChannel) – The spin channel of the two-particle quantity (density or magnetic).

  • ineq (int) – The index of the inequivalent atom (for multi-site DMFT).

Returns:

The two-particle Green’s function as a LocalFourPoint.

Raises:

NotImplementedError – In the abstract base class.

Return type:

LocalFourPoint

get_giw(ineq: int = 1) GreensFunction[source]#

Returns the one-particle Green’s function from DMFT. It must be returned with an array of shape [nbands, nbands, 2*niv_dmft].

Parameters:

ineq (int) – The index of the inequivalent atom (for multi-site DMFT).

Returns:

The local DMFT GreensFunction.

Raises:

NotImplementedError – In the abstract base class.

Return type:

GreensFunction

get_jdd(ineq: int = 1) float[source]#

Returns the Hund’s coupling \(J\) for the interacting d-orbitals (nonzero only for Kanamori interactions).

Parameters:

ineq (int) – The index of the inequivalent atom (for multi-site DMFT).

Returns:

The Hund’s coupling \(J_{dd}\).

Raises:

NotImplementedError – In the abstract base class.

Return type:

float

get_mu() float[source]#

Returns the chemical potential from the DMFT calculation.

Returns:

The chemical potential \(\mu\) from the DMFT calculation.

Raises:

NotImplementedError – In the abstract base class.

Return type:

float

get_nd(ineq: int = 1) int[source]#

Returns the number of interacting d-orbitals from the DMFT calculation.

Parameters:

ineq (int) – The index of the inequivalent atom (for multi-site DMFT).

Returns:

The number of interacting d-orbitals.

Raises:

NotImplementedError – In the abstract base class.

Return type:

int

get_occ(ineq: int = 1) ndarray[source]#

Returns the orbital-resolved occupation from the DMFT calculation.

Parameters:

ineq (int) – The index of the inequivalent atom (for multi-site DMFT).

Returns:

The orbital-resolved occupation.

Raises:

NotImplementedError – In the abstract base class.

Return type:

ndarray

get_siw(ineq: int = 1) SelfEnergy[source]#

Returns the one-particle self-energy from DMFT, already including the double-counting correction. It must be returned with an array of shape [1, 1, 1, nbands, nbands, 2*niv_dmft].

Parameters:

ineq (int) – The index of the inequivalent atom (for multi-site DMFT).

Returns:

The local DMFT SelfEnergy.

Raises:

NotImplementedError – In the abstract base class.

Return type:

SelfEnergy

get_totdens() float[source]#

Returns the total electron density from the DMFT calculation.

Returns:

The total electron density from the DMFT calculation.

Raises:

NotImplementedError – In the abstract base class.

Return type:

float

get_udd(ineq: int = 1) float[source]#

Returns the density-density interaction \(U\) for the interacting d-orbitals (used both for plain density-density and Kanamori interactions).

Parameters:

ineq (int) – The index of the inequivalent atom (for multi-site DMFT).

Returns:

The interaction \(U_{dd}\).

Raises:

NotImplementedError – In the abstract base class.

Return type:

float

get_vdd(ineq: int = 1) float[source]#

Returns the inter-orbital repulsion \(V\) (often \(U'\)) for the interacting d-orbitals (nonzero only for Kanamori interactions).

Parameters:

ineq (int) – The index of the inequivalent atom (for multi-site DMFT).

Returns:

The inter-orbital repulsion \(V_{dd}\).

Raises:

NotImplementedError – In the abstract base class.

Return type:

float

class dgamore.dmft_interface.TriqsInterface[source]#

Bases: DMFTInterface

Interface for TRIQS output files.

class dgamore.dmft_interface.W2dynInterface[source]#

Bases: DMFTInterface

Interface for w2dynamics output files.

get_beta() float[source]#

Reads the inverse temperature from the w2dynamics config.

Returns:

The inverse temperature \(\beta\) from the DMFT calculation.

Return type:

float

get_dc(ineq: int = 1, dmft_iter: str = 'dmft-last') float[source]#

Reads the double-counting correction from the w2dynamics output.

Parameters:
  • ineq (int) – The index of the inequivalent atom (for multi-site DMFT).

  • dmft_iter (str) – The DMFT iteration to read from.

Returns:

The double-counting correction for the self-energy.

Return type:

float

get_g2iw(channel: SpinChannel, ineq: int = 1) LocalFourPoint[source]#

Reads the two-particle Green’s function from the w2dynamics 2-particle file, assembling the orbital/frequency array from the per-bosonic-frequency, per-orbital-component groups.

Parameters:
  • channel (SpinChannel) – The spin channel of the two-particle quantity (density or magnetic).

  • ineq (int) – The index of the inequivalent atom (for multi-site DMFT).

Returns:

The two-particle Green’s function as a LocalFourPoint.

Raises:

ValueError – If channel is neither density nor magnetic.

Return type:

LocalFourPoint

get_giw(ineq: int = 1, dmft_iter: str = 'dmft-last') GreensFunction[source]#

Returns the spin-averaged one-particle Green’s function from DMFT, extended to a diagonal orbital matrix of shape [nbands, nbands, 2*niv_dmft].

Parameters:
  • ineq (int) – The index of the inequivalent atom (for multi-site DMFT).

  • dmft_iter (str) – The DMFT iteration to read from.

Returns:

The local DMFT GreensFunction.

Return type:

GreensFunction

get_jdd(ineq: int = 1) float[source]#

Reads the Hund’s coupling from the w2dynamics config.

Parameters:

ineq (int) – The index of the inequivalent atom (for multi-site DMFT).

Returns:

The Hund’s coupling \(J_{dd}\) (nonzero only for Kanamori interactions).

Return type:

float

get_mu(dmft_iter: str = 'dmft-last') float[source]#

Reads the chemical potential from the w2dynamics output.

Parameters:

dmft_iter (str) – The DMFT iteration to read from.

Returns:

The chemical potential \(\mu\).

Return type:

float

get_nd(ineq: int = 1) int[source]#

Reads the number of interacting d-orbitals from the w2dynamics config.

Parameters:

ineq (int) – The index of the inequivalent atom (for multi-site DMFT).

Returns:

The number of interacting d-orbitals.

Return type:

int

get_occ(ineq: int = 1, dmft_iter: str = 'dmft-last') ndarray[source]#

Reads and spin-sums the orbital-resolved occupation from the w2dynamics output.

Parameters:
  • ineq (int) – The index of the inequivalent atom (for multi-site DMFT).

  • dmft_iter (str) – The DMFT iteration to read from.

Returns:

The orbital-resolved occupation (spin-summed).

Return type:

ndarray

get_siw(ineq: int = 1, dmft_iter: str = 'dmft-last') SelfEnergy[source]#

Returns the spin-averaged one-particle self-energy from DMFT, with the double-counting correction added, as an array of shape [1, 1, 1, nbands, nbands, 2*niv_dmft].

Parameters:
  • ineq (int) – The index of the inequivalent atom (for multi-site DMFT).

  • dmft_iter (str) – The DMFT iteration to read from.

Returns:

The local DMFT SelfEnergy including the double-counting correction.

Return type:

SelfEnergy

get_totdens(dmft_iter: str = 'dmft-last') float[source]#

Reads the total electron density from the w2dynamics config.

Parameters:

dmft_iter (str) – The DMFT iteration to read from.

Returns:

The total electron density.

Return type:

float

get_udd(ineq: int = 1) float[source]#

Reads the density-density interaction from the w2dynamics config.

Parameters:

ineq (int) – The index of the inequivalent atom (for multi-site DMFT).

Returns:

The density-density interaction \(U_{dd}\) (used for plain and Kanamori interactions).

Return type:

float

get_vdd(ineq: int = 1) float[source]#

Reads the inter-orbital repulsion from the w2dynamics config.

Parameters:

ineq (int) – The index of the inequivalent atom (for multi-site DMFT).

Returns:

The inter-orbital repulsion \(V_{dd}\) (often \(U'\); nonzero only for Kanamori interactions).

Return type:

float