risb.kweight.from_triqs_hartree module

risb.kweight.from_triqs_hartree.fermi(e, beta)[source]

Numerically stable version of the Fermi function.

Parameters:
  • e (float or ndarray) – Energy minus chemical potential

  • beta (float) – Inverse temperature

risb.kweight.from_triqs_hartree.update_mu(n_target, energies, beta, n_k, smear_function)[source]

Update the chemical potential using scipy.optimize.brentq() for smearing k-space integrations.

Parameters:
  • n_target (float) – Filling target

  • energies (numpy.ndarray) – Array of eigenenergies

  • beta (float) – Inverse temperature

  • n_k (int) – Number of unit cells on lattice

  • smear_function – The function that smears the energy at each k-point.