In recent years the interest in hybrid functionals (that is the incorporation of parts of Hartree-Fock exchange in calculations based on common approximations of exchange-correlations such as LDA, GGA and so on) has steadily increased owing to its improvement over most common functionals, especially when it comes to band-gap calculation of extended solids – see for example this work for a comparison.
Quantum Espresso now offers a variety of hybrid functionals (for a complete list see the header of funct.f90) but currently the code can only use hybrid functionals for self-consistent calculations. The reason being that:
The problem is quite fundamental, because in order to get the Fock operator at a certain k-point you need the wavefunctions on a grid that is commensurate with it, this can only be done self-consistently. (L. Paulatto)
But there is a quite elegant solution via maximally localized Wannier functions. If you worked with wannier functions before you know they required the “full grid” (conveniently generated using the tool kmesh.pl) but a recently introduced tool allows to “unfold” the SCF calculation of the reduced grid to the full grid using the executable open_grid.x. An example is provided with recent versions of QE as well.
In the following I will use this approach to improve the band-gap of MgO. Using PBE pseudopotentials the band-gap is underestimated at about 4.3 eV but using the HSE hybrid the band-gap can be improved to about 7 eV, which is within acceptable range of the experimental value of ~7.7 eV.The workflow is fairly straightforward:
run a (converged) SCF calculation with input_dft=’HSE’ and a number of empty bands. You have to ensure convergence with respect to the usual parameters (k-points, cutoff, …) AND the mesh for the Fock operator (nqx)
unfold the reduced grid onto the full grid using open_grid.x
wannierize the obtained wave-functions using wannier90.x and plot the band-structure along a desired high symmetry path
The wannierization is by far the most tricky part in this particular example but by projecting on O:p and Mg:s one can accurately describe the valence band and an additional single conduction band. For the resulting band-structure see the figure below.
So this is actually quite straight-forward. please note that in above calculation the Fock operator was calculated on a very coarse 1x1x1 grid. The calculation on such a coarse grid actually seems to over-estimate the band-gap and a converged energy can be obtained on a 6x6x6 nqx grid with ~6.7 eV.
The entire calculation can be run using the attached script – I hope you find it helpful!
22 thoughts on “Band structure calculations in QE using hybrid functionals”
Thanks for sharing!! Very nicely described
I would like to try if phonon calculation can be performed for more accurate epsilon results.
I wish you know if you are able to do the phonon calculation. If yes I will be glad if you will share the codes with us
thanks for the tutorial and references; it was very insightful. I was wondering how to plot the results. We essentially have to harvest the orbital eigenvalues and match with the kpts file from open_grid.x right?
Dear zww4855, could you let me know what exactly you want to plot? The bands? The easiest way would be to let wannier90 do the work by using bands_plot = .true. in the win file and then plot the prefix_band.dat
In my example I get quite nice bands, at least close to the Gamma point; if you want to improve the bands you probably have to get better MLWFs!
Thanks for sharing your experience of hybrid functional band structure calculation!
I have a problem with the script of open_grid.x , everytime the script will show the segmentation fault when I tried to unfold the reduced grids obtained by paw pseudopotentials. However, it works fine with the results obtained by the NC pseudo, do you know why? Or can the open_grid.x grid only deal with the results from NC pseudo?
This seems to be an open (?) problem: https://gitlab.com/QEF/q-e/issues/109
I also have to admit that I rarely use PAW as I am quite satisfied with the PPs from the ONCV library which are “almost as soft” as PAW/US (well,.. “almost”)! Until this is resolved I think PAW cannot be used with open_grid.x
Where can I download open_grid.x. I am not able to find it.
Dear Hepsibah, open_grid.f90 is in the source directory of PP/src – could you check if it is still there. I can see it on my recent installation of QE 6.5!
Honestly, I don’t think it’s only an issue with PAW PP. I’m using norm-conserving ones (pbesol-nc), and I’m still getting a segmentation fault when running open_grid.x:
mpirun noticed that process rank 41 with PID 0 on node n006.cluster.com exited on signal 11 (Segmentation fault).
Do you know what may be the issue?
My input scf file looks like this:
calculation = ‘scf’,
prefix = ‘pa’,
verbosity = ‘high’,
pseudo_dir = ‘/home/ccevallos/pslibrary.1.0.0/pbesol/PSEUDOPOTENTIALS’,
outdir = ‘./tmp’,
ibrav = 0,
occupations = ‘fixed’,
C 12.011 C.pbesol-nc.UPF
H 1.00784 H.pbesol-n-nc.UPF
10.000000000000000 0.000000000000000 0.000000000000000
0.000000000000000 10.000000000000000 0.000000000000000
0.000000000000000 0.000000000000000 2.46
C -0.014436109 0.000000000 -0.008945780
C 0.633731142 0.000000000 1.185927865
H -1.102040351 0.000000000 -0.004392100
H 1.721345317 0.000000000 1.181410015
1 1 25 1 1 1
Dear Chris, thanks for the wonderful tutorial.
I just want to say, that it would have been much better if the .wim and the other wannier input file contained the detailed comments. So that we might have used them for our system easily!
Thank you so much for attaching the script for carrying out HSE calculations!! I have 2 errors. I don’t know how to proceed. I am new to QE. Can you kindly tell me what to do? Any help in this regard would be greatly appreciated!!!
After carrying out SCF calculation and proceeding for open_grid.x I get this error
Error in routine pw_readschemafile (1):
xml data file not found
The xml data file is available in the output directory generated by SCF calculation still I get this error!
Wannier too I get an error
No AgO.eig file found. Needed for disentanglement
Can you kindly help me…
I have received several messages about this and it seems that there is a bug in recent versions of PWSCF regarding this; I think I used 6.4 compiled with Intel for the initial test, I would recommend you try that version first!
Thank you so much Prof!! I’ve run the SCF, extracted k-points using kmesh.pl, executed wannier but I end up with an error in pw2wannier which states
Error in routine pw_readschemafile (1):
xml data file not found
Is the workflow right. Can k-points be extracted using kmesh rather than opengrid. Thank you so much for taking your time to reply!!
I also want to know how to get k-points by using kmesh.pl
Hi guys, I haven’t used this in a while, I will try to repeat the tutorial with the newest version of QE tomorrow and let you know 🙂 sorry for the slow response.
I GOT THIS ERROR IN EXECUTING pw2wannier90.x
Checking info from wannier.nnkp file
– Real lattice is ok
– Reciprocal lattice is ok
numk= 144 iknum= 74
Error in routine pw2wannier90 (144):
Wrong number of k-points
Please check that the prefix in the pw2wannier90.x input file is the pw prefix with “_open”.
Thank you for this tutorial, would yo please upload the description of the input files.
Hi Menna, do you mean a description of the contents of the input file? There is only one file to download which contains all the steps as a simple bash script.
scf.in is the input file of the self consistent calculation done using pw.x
opengrid.in is the input for open_grid.x which writes the KS orbitals for the complete k-point grid in real space. This also writes the file for the pw2wannier step bypassing the non-SCF calculation. The mgo.win file is the usually wannier90 input file.
Dear Chris. Thank you very much for the elaborations. I have question on how do I implement HSE06/HSE03 in quantum espresso? As I can see in you example provided (attached) you used HSE in general.
You can see all available functionals here: https://gitlab.com/QEF/q-e/blob/master/Modules/funct.f90
and you can change the parameters to your own liking in some cases!