Hybrid-Functional Calculations

by Ute Werner for exciting carbon

Purpose: In this tutorial, you will learn how to perform band-structure calculations using hybrid functionals. As an example, the band structure of diamond is calculated with the PBE0-functional.



1. PBE0 calculation

We start by creating the working directory for this tutorial and move inside of it.

$ mkdir hybrid-diamond
$ cd hybrid-diamond
i) Preparation of the input file

Inside the current directory, create the input file input.xml for the ground-state and band-structure calculation of diamond using PBE0. This file look like this

<input>
 
   <title>Diamond PBE0</title>
 
   <structure speciespath="$EXCITINGROOT/species" >
      <crystal scale="6.7425">
         <basevect> 0.0     0.5     0.5 </basevect>
         <basevect> 0.5     0.0     0.5 </basevect>
         <basevect> 0.5     0.5     0.0 </basevect>
      </crystal>
      <species speciesfile="C.xml">
         <atom coord="0.00 0.00 0.00" />
         <atom coord="0.25 0.25 0.25" />
      </species>
   </structure>
 
   <groundstate 
      ngridk="4 4 4"
      nempty="50"
      xctype="HYB_PBE0">
      <Hybrid 
         exchangetype="HF" 
         excoeff="0.25" />
   </groundstate>
 
   <properties>
      <bandstructure>
         <plot1d>
            <path steps="200">
              <point coord=" 0.750   0.500   0.250" label="W" />
              <point coord=" 0.500   0.500   0.500" label="L" />
              <point coord=" 0.000   0.000   0.000" label="GAMMA" />
              <point coord=" 0.500   0.500   0.000" label="X" />
              <point coord=" 0.750   0.500   0.250" label="W" />
              <point coord=" 0.750   0.375   0.375" label="K" />
            </path>
         </plot1d>
      </bandstructure>
   </properties>
 
</input>

Let's have a closer look to the parameters in this file.

Parameter Description
xctype = "HYB_PBE0" The calculation is performed using the hybrid functional PBE0
nempty = "50" The number of empty bands, crucial for the convergence
exchangetype = "HF" You can choose between HF and DFT-exact exchange
excoeff = "0.25" Value for the amount of exact exchange. For the example the standard value for the PBE0 functional is used

For the meaning of the different arguments and keywors of the properties section have a look to Electronic-structure calculations.
Since the PBE0 calculations are much more time consuming than corresponding LDA or GGA ones, computational parameters have been chosen in a way to speed up the calculation. For further details on the parameters see Input Reference.

ii) Execute the calculation

Be sure to set the correct path for the exciting root directory (indicated in this example by $EXCITINGROOT) to the one pointing to the place where the exciting directory is placed. In order to do this, use the command

$ SETUP-excitingroot.sh

Start the calculation by using the script EXECUTE-single.sh

$ EXECUTE-single.sh PBE0

The calculation will be executed inside the subdirectory xc-rundir which at the end of the run will be renamed PBE0.


2. PBE calculation

In order to investigate the effect of hybrid functionals on the band structure, we will also perform a GGA calculation. For this purpose, we will use the PBE functional.

i) Preparation of the input file

You should modify the input file input.xml from the previous calculation. In order to use PBE, we modify the functional defined by the keyword xctype:

...
   <groundstate 
      ngridk="4 4 4"
      nempty="50"
      xctype="GGA_PBE">
   </groundstate>
...

Do not forget to REMOVE the block that triggers a hybrid functional calculation

...
      <Hybrid 
         exchangetype="HF" 
         excoeff="0.25" />
...
ii) Execute the calculation

The calculation can be started similarly to above by typing on the shell line the following command.

$ EXECUTE-single.sh PBE

At the end of the calculation, all results will be stored in the subdirectory PBE.


3. Post processing

For a graphical comparison of the band structures calculated with the PBE0 and PBE functionals you can use the script PLOT-PBE0bands.py. Move to the parent directory (the one where you can find the PBE0 and PBE sub-directories) and execute the script. It will produce the following output on the screen.

$ PLOT-PBE0bands.py

################################################

    Enter the working directories 

################################################

name of PBE directory: PBE
name of PBE0 directory: PBE0

$
In this example, the first input entry is preceded by "name of PBE directory: ". This entry value must be typed on the screen and must be the name of the directory which contains your PBE results. The second entry should then be the PBE0 directory. The script PLOT-PBE0bands.py produces a PostScript (PBE0_PBE.eps) and a PNG (PBE0_PBE.png) output file, as well as an image on the screen. Using the examples above you will obtain the following plot.
PBE0_PBE.png
Note, that for PBE0 the band structure has to be interpolated. Thus, for a nice band structure plot you will need a larger k-grid. A PBE0 calculation for diamond with an 8$\times$8$\times$8 k-grid and 100 empty states will look like this:
PBE0_PBE_converged.png

4. Exercises

  • Try to modify some of the parameters such as nempty or ngridk in the input files and investigate the effect on the band structure and on the computational time.
  • Modify the keyword for the exact-exchange type in order to use the exact exchange from DFT: exchangetype = "OEP". Compare the results to the previous PBE0 calculations. HINT: If you use the OEP potential, you can also modify the EXX/OEP parameters as explained in Exact-exchange calculations.

Literature

  • J. P. Perdew, M. Ernzerhof, and K. Burke, J. Chem. Phys. 22, 9982 (1996)
  • C. Adamo and V. Barone, J. Chem. Phys. 110, 6158, (1999)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License