Using set_fermie_to_vbm()


I am trying to obtain a band structure plot for the system I am investigating. The band I obtain from Abinit is in good agreement with the literature, however the Fermi energy in not at the VBM. When I run with my GSR file, it gives a tip to use set_fermie_to_vbm() if my system in a non-magnetic semiconductor (that’s exactly what it is and what I would want). However I am having difficulties trying to use it with Abinit.
Would anyone have any pointers on how to use it? I have tried to go through Abinit documentation, however no luck there.
I would be very grateful for any help.

Thank you kindly!

However I am having difficulties trying to use it with Abinit.

set_fermie_to_vbm is an AbiPy function that recomputes the Fermi energy by finding the highest occupied state in the KS energies stored in the file.

In the case of NSCF calculations, indeed, the Fermi energy reported in the GSR file comes from the GS calculation that produced the input DEN file.
If the K-mesh used in the GS part does not contain the VBM, the fermi energy in the GSR will be smaller than the “true” VBM obtained from the band structure computed along the high-symmetry k-path.
Typical example: you have a semiconductor with the VBM at Gamma but the GS calculation is done with a shifted k-mesh.

In AbiPy v0.9, set_fermie_to_vbm is always invoked when you try to plot the bands with GSRFILE -e.

If you don’t want to install the new AbiPy version, you can always realign the Fermi energy by calling set_fermie_to_vbm explicitly inside the ipython shell.


Python 3.9.2 | packaged by conda-forge | (default, Feb 21 2021, 05:02:20)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.21.0 -- An enhanced Interactive Python. Type '?' for help.

The Abinit file object is associated to the `abifile` python variable.
Use `abifile.<TAB>` to list available methods.
Use e.g. `abifile.plot?` to access docstring and `abifile.plot??` to visualize source.
Use `print(abifile)` to print the object.

In [1]: abifile.ebands.set_fermie_to_vbm()
Out[1]: array(5.59831302) eV

In [2]: %matplotlib
Using matplotlib backend: MacOSX

In [3]: abifile.ebands.plot()