dmft_tools.manipulate_chemical_potential

Contains all the functions related to setting the chemical potential in the next iteration.

dmft_tools.manipulate_chemical_potential.set_initial_mu(general_params, sum_k, iteration_offset, archive, broadening)[source]

Handles the different ways of setting the initial chemical potential mu: * Chemical potential set to fixed value: uses this value

  • New calculation: determines mu from dichotomy method
  • Resuming calculation and chemical potential not updated this iteration:
    loads calculation before previous iteration.
  • Resuming calculation and chemical potential is updated:
    checks if the system is gapped and potentially run MaxEnt to find gap middle. Otherwise, gets mu from dichotomy and applies mu mixing to result.
Parameters:
general_paramsdict

general parameters as dict.

sum_kSumkDFT object

contains system information necessary to determine the initial mu.

iteration_offsetint

the number of iterations executed in previous calculations.

archiveHDFArchive

needed to potentially load previous results and write MaxEnt results to.

Returns:
sum_kSumkDFT object

the altered SumkDFT object with the initial mu set correctly.

dmft_tools.manipulate_chemical_potential.update_mu(general_params, sum_k, it, archive, broadening)[source]

Handles the different ways of updating the chemical potential mu: * Chemical potential set to fixed value: uses this value

  • Chemical potential not updated this iteration: nothing happens.
  • Chemical potential is updated: checks if the system is gapped and
    potentially run MaxEnt to find gap middle. Otherwise, gets mu from dichotomy and applies mu mixing to result.
Parameters:
general_paramsdict

general parameters as dict.

sum_kSumkDFT object

contains system information necessary to update mu.

itint

the number of the current iteration.

archiveHDFArchive

needed to potentially write MaxEnt results to.

Returns:
sum_kSumkDFT object

the altered SumkDFT object with the updated mu.