triqs_dft_tools.sumk_dft_tools.SumkDFTTools.total_density

SumkDFTTools.total_density(mu=None, with_Sigma=True, with_dc=True, broadening=None, beta=None)

Calculates the total charge within the energy window for a given chemical potential. The chemical potential is either given by parameter mu or, if it is not specified, taken from self.chemical_potential.

The total charge is calculated from the trace of the GF in the Bloch basis. By default, a full interacting GF is used. To use the non-interacting GF, set parameter with_Sigma = False.

The number of bands within the energy windows generally depends on k. The trace is therefore calculated separately for each k-point.

Since in general n_orbitals depends on k, the calculation is done in the following order:

\[n_{tot} = \sum_{k} n(k),\]

with

\[n(k) = Tr G_{\nu\nu'}(k, i\omega_{n}).\]

The calculation is done in the global coordinate system, if distinction is made between local/global.

Parameters:
mufloat, optional

Input chemical potential. If not specified, self.chemical_potential is used instead.

with_Sigmaboolean, optional

If True the full interacing GF is evaluated, otherwise the self-energy is not included and the charge would correspond to a non-interacting system.

with_dcboolean, optional

Whether or not to subtract the double-counting term from the self-energy.

broadeningfloat, optional

Imaginary shift for the axis along which the real-axis GF is calculated. If not provided, broadening will be set to double of the distance between mesh points in ‘mesh’. Only relevant for real-frequency GF.

betafloat, optional, default = broadening

when using MeshReFreq this determines the temperature for the Fermi function smearing when integrating G(w). If not given broadening will be used (converted to beta)

Returns:
densfloat

Total charge \(n_{tot}\).