by Ute Werner for exciting neon
(Jupyter notebook by Mara Voiculescu & Martin Kuban)
Purpose: In this tutorial, you will learn how to perform band-structure calculations using the optimized effective potential - exact-exchange (EXX) method. As an example, the band structure of diamond is calculated.
Table of Contents
Read the following paragraphs before starting with the rest of this tutorial!
Before running any Jupyter tutorials, please refer to the 00_before_starting.md
document on how to correctly set up the environment. This only needs to be done once. After which, the venv can be (re)activated from exciting
's root directory:
source tools/excitingjupyter/venv/excitingvenv/bin/activate
As a first step, you may create a running directory for the notebook.
%%bash
mkdir -p run_tutorial_exact_exchange_calculations
A typical exact exchange (EXX) calculation consists of two parts. Initially a ground state self-consistent cycle, for example with LDA, is performed to create good Kohn-Sham orbitals as initial guess for the EXX calculation. Afterwards, starting from these data, a self consistent EXX calculation is executed.
We start by performing an LDA calculation for comparing with EXX. This initial LDA calculation is not related to the initial self-consistent cycle performed at the beginning of the EXX calculation, since the latter is done internally by exciting
.
As usual, the first thing to do is to create the subdirectory for the LDA calculation.
%%bash
cd run_tutorial_exact_exchange_calculations
mkdir -p LDA
cd ..
Create an input file input.xml for the ground-state and band-structure calculation of diamond using LDA which could look like this
<input>
<title>Diamond LDA</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="8 8 8"
xctype="LDA_PW">
</groundstate>
<properties>
<bandstructure>
<plot1d>
<path steps="200">
<point coord="1.0 0.0 0.0" label="Gamma"/>
<point coord="0.625 0.375 0.0" label="K"/>
<point coord="0.5 0.5 0.0" label="X"/>
<point coord="0.0 0.0 0.0" label="Gamma"/>
<point coord="0.5 0.0 0.0" label="L"/>
</path>
</plot1d>
</bandstructure>
</properties>
</input>
This can be done by writing the complete input as a string and saving it in your working directory as input.xml.
We assume you are already familiar with band-structure calculations. However, if you need information on the meaning of the different arguments and keywords inside the element properties
, you can have a look to the tutorial Electronic band-structure and density of states.
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 following command:
%%bash
cd run_tutorial_exact_exchange_calculations/LDA
python3 -m excitingscripts.setup.excitingroot
cd ../..
Perform the LDA calculation using the script excitingscripts.execute.single
.
%%bash
cd run_tutorial_exact_exchange_calculations
python3 -m excitingscripts.execute.single -r LDA
cd ..
Be sure that your calculation is completed before proceeding with the next steps!
In the next step, we will calculate the ground state and band structure using EXX. Therefore, replace the groundstate
section in the file input.xml with the following lines.
...
<groundstate
ngridk="3 3 3"
xctype="EXX"
vkloff="0.5 0.5 0.5"
nempty="29">
<OEP
maxitoep="100">
</OEP>
</groundstate>
...
%%bash
cd run_tutorial_exact_exchange_calculations
mkdir -p EXX
cd ..
%%bash
cd run_tutorial_exact_exchange_calculations/EXX
python3 -m excitingscripts.setup.excitingroot
cd ../..
Let's have a closer look at the parameters in this file.
Parameter | Description |
---|---|
xctype ="EXX" |
The calculation is performed using the exact-exchange functional. |
nempty ="29" |
The number of empty bands, crucial for the convergence. |
vkloff ="0.5 0.5 0.5" |
The origin of the k-point grid, crucial for the convergence. |
maxitoep ="100" |
The number of iterations for the evaluation of integrals in EXX. |
Since the EXX calculations are much more time consuming than corresponding LDA ones, computational parameters have been chosen in a way to speed up the calculation. However, the calculation will still last approximately 10-20 min. For further details on the parameters see Input Reference.
%%bash
cd run_tutorial_exact_exchange_calculations
python3 -m excitingscripts.execute.single -r EXX
cd ..
For a graphical comparison of the band structures calculated with the LDA and EXX functionals you can use the script excitingscripts.plot.band_structure
, which is fully described in The python script "plot.band_structure". Move to the parent directory (the one where you can find the LDA and EXX subdirectories) and execute the script as follows.
%%bash
cd run_tutorial_exact_exchange_calculations
python3 -m excitingscripts.plot.band_structure -d LDA EXX -e -25 25 -z vbM -l 'lower right'
cd ..
Try to modify some of the parameters in the groundstate
element of the EXX input file and investigate the effect on the band structure and on the computational time.