by Benedikt Maurer and Andris Gulans for exciting neon
(Jupyter notebook by Mara Voiculescu & Martin Kuban)
Purpose: In this tutorial you will learn how to calculate the electronic ground state with spin-orbit coupling (SOC). The effect of SOC is demonstrated by looking at the band structure of GaAs. In the last section, we explain how to use a recently developed method to accurately and efficiently treat SOC.
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_soc_tutorial
Spin-orbit coupling (SOC) is a relativistic contribution to the kinetic energy that describes the interaction of an electron's spin with its orbit. The spin-orbit term in the electron Hamiltonian is given by (see SOC-67):
$$ H_{SOC} = \frac{\boldsymbol{\hbar}}{4m_0^2c^2}(\boldsymbol{\sigma} \times \nabla V_{KS}) \cdot \boldsymbol{p} $$where $m_0$, $\boldsymbol{\sigma} = (\sigma_x, \sigma_y, \sigma_z)^T, V_{KS}$, and $\boldsymbol{p}$ are the electron mass, a vector of the Pauli matrices, the Kohn-Sham potential, and the electron's momentum, respectively. The strength of the SOC increases with the magnitude of the nuclear charge, and it may be crucially important to consider the SOC for materials with heavy atoms.
To demonstrate the effect of SOC on the electronic structure of GaAs, we calculate the band structure with and without SOC with exciting
and compare them to each other.
At first, calculate the ground state and band structure of GaAs without SOC. To do so, create a new directory GaAs-noSOC:
%%bash
cd run_soc_tutorial
mkdir -p GaAs-noSOC
cd ..
Below is an example for the required input file (input.xml).
<input>
<title>GaAs noSOC</title>
<structure speciespath="$EXCITINGROOT/species">
<crystal scale="10.683" >
<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='Ga.xml' rmt='2.0'>
<atom coord="0.00 0.00 0.00"/>
</species>
<species speciesfile='As.xml' rmt='2.0'>
<atom coord="0.25 0.25 0.25"/>
</species>
</structure>
<groundstate
do="fromscratch"
xctype="GGA_PBE"
rgkmax="6"
gmaxvr="15"
ngridk="4 4 4"
swidth="1d-6"
epsengy="1d-6"
maxscl="40">
</groundstate>
<properties>
<bandstructure>
<plot1d>
<path steps="1000">
<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>
The next step is writing the complete input as a string and saving it in your working directory as input.xml.
Before starting the calculation, remember to set the correct path for the exciting
root directory ($EXCITINGROOT) to the one pointing to the place where the exciting
directory is placed, using the command
%%bash
cd run_soc_tutorial/GaAs-noSOC
python3 -m excitingscripts.setup.excitingroot
cd ../..
In order to run exciting
, you simply need to execute the exciting_smp binary in the subdirectory GaAs-noSOC. After a few seconds, the calculation should be finished. Here we used the time
command before exciting_smp in order to get, at the end of the run, the elapsed time explicitly written on the screen.
%%bash
cd run_soc_tutorial/GaAs-noSOC
time $EXCITINGROOT/bin/exciting_smp input.xml
cd ../..
You can monitor the progress of self-consistent cycle (SCF) by typing:
$ tail -f INFO.OUT
If the calculation was successful, the files BAND.OUT, BANDLINES.OUT, and bandstructure.xml exist.
You can visualize the band structure by by using the following commands:
%%bash
cd run_soc_tutorial
python3 -m excitingscripts.plot.band_structure -d GaAs-noSOC -e -5 3 -z vbM
cd ..
The ground state of GaAs without SOC can be used as starting point for the calculation with SOC. Create a new directory for the calculation with SOC and copy and paste all files from the old directory into the new one:
%%bash
cd run_soc_tutorial
mkdir -p GaAs-SOC
cp -a GaAs-noSOC/. GaAs-SOC
cd ..
To perform a ground-state calculation that includes SOC, the input file input.xml should be modified such that the title
is changed to GaAs SOC and the content of the groundstate
is adjusted as
...
<groundstate
do="fromfile"
xctype="GGA_PBE"
rgkmax="6"
gmaxvr="15"
ngridk="4 4 4"
swidth="1d-6"
epsengy="1d-6"
maxscl="40"
nempty="15">
<spin spinorb="true"/>
</groundstate>
...
Do not forget to set the correct path for the exciting
root directory:
%%bash
cd run_soc_tutorial/GaAs-SOC
python3 -m excitingscripts.setup.excitingroot
cd ../..
If you compare this to the previous groundstate
element, you will notice the following differences:
do
attribute is set to "fromfile"
. This enables exciting
to use the self-consistent potential from the scalar-relativistic calculation as the starting point. As for "skip"
, the files STATE.OUT and EFERMI.OUT from the calculation to skip have to be present in the directory.spin
is added to groundstate
with the attribute spinorb="true"
. This enables SOC for the ground state.nempty="15"
has been added to the groundstate
element. This attribute defines how many unoccupied (empty) states are considered for the solution of the electronic ground state with SOC. When SOC is taken into account, a proper choice of the parameter nempty is fundamental for converged results!Use the following commands to run the calculation:
%%bash
cd run_soc_tutorial/GaAs-SOC
time $EXCITINGROOT/bin/exciting_smp input.xml
cd ../..
Note, that the output file INFO.OUT contains a new section called Moments: inside the SCF information.
Moments :
interstitial : 0.00000000 0.00000000 0.00000000
moment in muffin-tin spheres :
atom 1 As : 0.00000000 0.00000000 -0.00000000
atom 2 Ga : -0.00000000 -0.00000000 -0.00000000
total moment in muffin-tins : -0.00000000 -0.00000000 -0.00000000
total moment : -0.00000000 -0.00000000 -0.00000000
This section shows the moments of the interstitial and the muffin-tin part of the solution. If this section is present, SOC is included into the solution of the ground state.
If you did not change anything else than the groundstate
element, the band structure is calculated already and you can compare it to the band structure of the calculation without SOC.
%%bash
cd run_soc_tutorial
python3 -m excitingscripts.plot.band_structure -d GaAs-noSOC GaAs-SOC -e -5 3 -z vbM
cd ..
Electronic band-structure data are now taken from both GaAs-noSOC and GaAs-SOC directories. The result is saved to PLOT.png and should look like the following image:
Comparing the band dispersion curves from the two calculations, we notice a few features introduced by the SOC.
%%bash
cd run_soc_tutorial
python3 -m excitingscripts.plot.band_structure -d GaAs-noSOC GaAs-SOC -e -1.5 1.5 -z vbM -k 0.70 0.775 -s 0.5
cd ..
The plot is useful for a qualitative analysis, but it is more convenient to look at the output files EIGVAL.OUT or BAND.OUT inside the directory GaAs-SOC for extracting the numbers. EIGVAL.OUT contains Kohn-Sham eigenvalues at each k-point considered in the self-consistent calculation. If you open this file in the directory with the SOC calculation, you will find the following data:
10 : nkpt
40 : nstsv
1 0.000000000 0.000000000 0.000000000 : k-point, vkl
(state, eigenvalue and occupancy below)
...
21 -0.2881291119 1.000000000
22 -0.2881291119 1.000000000
23 0.1721175534 1.000000000
24 0.1721175534 1.000000000
25 0.1840659516 1.000000000
26 0.1840659521 1.000000000
27 0.1840662097 1.000000000
28 0.1840662102 1.000000000
29 0.1979968334 0.000000000
30 0.1979968334 0.000000000
31 0.3106234272 0.000000000
32 0.3106234272 0.000000000
33 0.3173384018 0.000000000
34 0.3173384023 0.000000000
...
The indices of the bands are as follows:
Taking into account that the energies are given in the atomic units (Hartrees), the Kohn-Sham band gap is $E_g$ = 0.38 eV, which is much smaller than the experimental value $E_g^{exp}$ = 1.42 eV (see GaAs-gap). The obtained spin-orbit splitting is $\Delta_{SO}$ = 0.33 eV. Unlike the band gap, it is in a good agreement with experiment ($\Delta_{SO}^{exp}$ = 0.34 eV).
The second variation with local orbitals as explicit basis functions (SVLO) permits an accurate and efficient treatment of SOC. More information about the method can be found in Ref. SVLO.
To enable the SVLO method you need to include inside the element spin
, in addition to the attribute spinorb="true"
, the attribute svlo="true"
. The attribute nempty
(inside the element groundstate
), which defines the number of unoccupied (empty) states considered in the calculation of the SOC contribution, must be accurately chosen also when the SVLO method is employed in order to obtain converged results.
One significant advantage of the SVLO method is that it can be utilized in conjunction with Dirac-type local orbitals, as illustrated in Understanding the exciting Species Files. This is crucial since for many materials, these orbitals produce substantial effects that need to be accounted for in order to achieve accurate results.
Note that, the SVLO method is a recent implementation for which many exciting
features are not yet supported. In order to use it for groundstate calculation with SOC, the attribute useDensityMatrix
, inside the element groundstate
, must be set to false (useDensityMatrix="flase"
).
For more information about the input parameters see Input Reference.