Page 1 of 1

Calculating the Fermi energy in a metal

Posted: Fri Apr 26, 2024 2:57 pm
by bprobinson102
VASP team,

I would like bit more clarification as to how VASP calculates the Fermi energy for a metal. I understand that it follows the following algorithm as described in the fermi_energy.F file.

Code: Select all

The basic algorithm to determine the Fermi energy works as follows:

* We consider a single k-point and evaluate the number of occupied states
per spin channel there. Here, we need to account for the fact that the
states may be split over multiple CPUs. We use a bisection algorithm with
step function smearing to do so.

* For metals or when the smearing lead to an incorrect number of electrons,
we determine the Fermi energy with a bisection method between the band
extrema. We compute the number of electrons for a Fermi energy in the
middle of the interval. When the result is smaller or larger than the
expected number of electrons, we replace the lower or upper interval
boundary, respectively.
If possible, would you be able to explain this method in a bit more detail?

Would the Fermi energy as a result of this algorithm get you the same Fermi energy found by integrating the DOS*occupations over energy constrained by the number of electrons?

Thanks for your time!

Brian

Re: Calculating the Fermi energy in a metal

Posted: Mon Apr 29, 2024 9:09 am
by fabien_tran1
Hi,

Actually, the algorithm to determine the Fermi energy is rather simple: this is the bisection method. The function "calculate_fermi_energy" (and the comments just above it) in fermi_energy.F should be self-explained.

Yes, for a metal the Fermi energies determined from the bisection method and the DOS should in principle be the same. There is no ambiguity in the definition of the Fermi energy in a metal, while in a system with a gap any value within the gap could be chosen as the Fermi energy.