Closed EndsonLana closed 10 months ago
Hi @EndsonLana, I am not sure I understand 100% what you mean. Currently, you would always write a little function that computes the density on the lattice Gf, i.e.:
F_optimize(mu):
mpi.report("Trying out mu = {}".format(str(mu)))
calc_dens = calc_lattice_density(your function) - target_density
mpi.report(f"Target density = {target_density}; Delta to target = {calc_dens}")
return calc_dens
and then use either the triqs interal dichotomy method (might take long): https://triqs.github.io/triqs/unstable/documentation/python_api/triqs.utility.dichotomy.dichotomy.html and pass the function F_optimize
as first argument, or you can use one of the scipty optimizers. For example in triqs/dft_tools we are using Newton
as optimizer:
from scipy.optimize import minimize, newton, brenth
chemical_potential = newton(func=F_optimize,
x0=mu_guess,
tol=precision, maxiter=max_loops,
)
This would be done in each DMFT loop. We do not provide a function in the solver to perform the chemical potential finding. You can take a look on how this is implemented in triqs/dft_tools here: https://github.com/TRIQS/dft_tools/blob/b87ca75c89e1b0f0189807747f0b02f71d366141/python/triqs_dft_tools/sumk_dft.py#L1944
Let me know if you have further questions.
Best, Alex
Dear Dr.Hampel, This is exactly what I am looking for. My question is that in a model Hamiltonian, the density computation is hard to achieve when I am using imaginary frequency in triqs. Therefore the chemical potential is hard to get. Sincerely, E.L.
@EndsonLana Has the point been clarified for you? If so please close the issue.
Summary
An auto process for the chemical potential to adjust dynamically to the fixed particle number.
Motivation
The chemical potential adjustment methods I found seems to require a lot of extra loops, but the problems like OSMP(Orbital Selective Mott Phase) requires a dynamically adjusting chemical potential to keep the particle numbers. For example, for a Jahn-Teller effect system, the total number of electrons N of 3 t2g orbitals is set to 4.
Implementation
I wonder if there is some quick way like a snippet of python scripts to do this? Or perhaps a particle number parameter in Solver.solve()?
Formatting
Please use markdown in your issue message. A useful summary of commands can be found here.