Tutorial2_2013
Tutorial2_2013
and beyond:
Computational materials science
for real materials
Trieste, August 06 – 15, 2013
2
Part I: Basic properties of solids and convergence tests
In the first part of this tutorial, we will work on different structural phases of bulk
silicon. The correct description of their pressure dependence by Yin and Cohen [1] is
one of the early success stories of computational materials science. In this part, we
show how to calculate basic properties of solids like lattice constants, cohesive energies,
band structures, and density of states.
Please use the basic settings given in Fig. 1 as default for part I of this tutorial
(unless specified otherwise).
# Physical settings
xc pw - lda
spin none
relativistic atomic_zora scalar
# SCF settings
sc_accuracy_rho 1E -4
sc_accuracy_eev 1E -2
sc_accuracy_etot 1E -5
sc_iter_limit 40
Figure 1: Default physical and computational settings for control.in for part I. This file
can be found in skel/problem_1/control_part1.in.
3
Problem I: Generation and visualization of bulk structures
Our first step towards studying periodic systems with FHI-aims is to construct periodic
geometries in the FHI-aims geometry input format (geometry.in) and visualize them.
As a next step, we learn how to set basic parameters in control.in for periodic
calculations. Finally, we compare total energies of different Si bulk geometries.
• Construct geometry.in files for the Si fcc, bcc, and diamond struc-
tures. Use the approximate lattice constants a of 3.8 Å for fcc, 3.1 Å
for bcc, and 5.4 Å for the diamond structure.
To set up a periodic structure in FHI-aims, all three lattice vectors as well as the atomic
positions in the unit cell must be specified. The lattice vectors are specified by the
keyword lattice_vector. There are two ways to specify the atomic positions. As in
the cluster case, you can specify absolute Cartesian positions with the keyword atom.
Alternatively, you can specify the atomic positions in the basis of the lattice vectors,
the so called fractional coordinates, with the keyword atom_frac. The fractional
coordinates si are dimensionless and the coefficients for the linear combination of the
lattice vectors ai . Written out as a formula, this linear combination reads as follows
R = s1 · a1 + s2 · a2 + s3 · a3 , (1)
4
Figure 2: Single unit cell (left) and periodic images (right) of diamond Si in Jmol.
The control.in for periodic calculations looks much the same as for the cluster case
(the underlying numerics are the same). There is one important difference, though, as
a k-grid for the Brillouin zone integrations must be specified. For example, to specify
a 3×3×3 k-grid, the following line must be added to control.in:
k_grid 3 3 3
Note that the k-grid points refer to the reciprocal lattice vectors corresponding to the
real-space lattice vectors in geometry.in. If there are inequivalent lattice vectors,
their order in geometry.in determines the ordering of reciprocal lattice vectors in the
code. You will see that for a small unit cell this k-point density is never enough. But
we can try to find out what happens. In the next problem, the k-point settings will
be discussed in detail.
In general, you can run FHI-aims just like in the cluster case by
mpiexec -n 4 aims.x | tee aims.out
5
which starts a calculation with 4 processors. It is good practice to use a separate
directory for every single run of FHI-aims in order to preserve the exact input files
along with the output files.1 In this tutorial, however, most of the calculations can
be started using a prepared script which takes care of these things and needs to be
adjusted only slightly.
In this exercise, we compare energies of different lattice structures as a function of
lattice constant. Each calculation can be prepared and started by hand, in principle,
but we strongly suggest to use the shell script run.sh provided in skel/problem_1/
02_3x3x3/fcc/ and shown in Fig. 3. This example script calculates the total energy
of fcc Si with different lattice constants. Please copy this script to dedicated folders
for bcc and diamond Si (we suggest problem_1/02_3x3x3/bcc/ and problem_1/02_
3x3x3/diamond/), and adjust the copies according to the lattice constants given in
this subtask and the lattice structures given in Appendix I.
# !/ bin / bash -l
set -e # Stop on error
for A in 3.5 3.6 3.7 3.8 3.9 4.0 4.1; do
echo " Processing lattice constant $A AA . "
mkdir $A
# Use this construct for simple calculations . As values
# are replaced verbatim , always put them into "(" , ")".
A2 = $ ( python -c " print ( $A )/2. " )
# Write geometry . in
cat << EOF > $A / geometry . in
# fcc structure with lattice constant $A AA .
lattice_vector 0.0 $A2 $A2
lattice_vector $A2 0.0 $A2
lattice_vector $A2 $A2 0.0
atom_frac 0.0 0.0 0.0 Si
EOF
# Write control . in
cp control . in $A /
# Now run fhi - aims with 4 processors in directory $A
cd $A
mpiexec -n 4 aims . x > aims . out
cd ..
done
Figure 3: Example input shell script for running calculations for several lattice constants.
This file can be found in skel/problem_1/02_3x3x2/fcc/run.sh.
To retrieve the total energies, you should then use the postprocess.sh script, which
is provided within the same folder and printed in Fig. 4. This script extracts the total
1 Using a separate directory for each FHI-aims run interactively is slightly simplified by using the
run_aims.sh script. See $utilities/run_aims.sh --help for help.
6
# !/ bin / bash -l
set -e # Stop on error
echo " # lattice constants in AA , energies in eV " > energies . dat
for A in 3.5 3.6 3.7 3.8 3.9 4.0 4.1; do
# Check for convergence of calculation .
if (! grep -- quiet " Self - consistency cycle converged . " \
< $A / aims . out ) || \
(! grep -- quiet " Have a nice day . " \
< $A / aims . out ); then
echo " ‘pwd ‘/ $A / aims . out did not converge ! "
fi
# Get 6 th column from the line with " Total energy corr ".
E = $ ( gawk ’/ Total energy corr / { print $6 } ’ $A / aims . out )
# Write results to data file .
echo " $A $E " >> energies . dat
done
Figure 4: Example shell script to retrieve th total energy from the FHI-aims output file.
This file can be found in skel/problem_1/02_3x3x2/fcc/postprocess.sh.
energies and writes them to the file energies.dat, along with the lattice constants.
You will need to adapt this script to the other phases of silicon. In particular, adjust
the lattice constants. For the next subtask, it is advantageous to write out the total
energy per atom, not per unit cell, which makes a difference for the diamond structure.
You can use the expression Eatom=$(python -c "print ($E)/2."), which calculates
the energy per atom for the diamond structure and puts it into the bash variable
$Eatom. You can then write this variable instead of $E to the data file.
• Plot the total energy per atom of each structure as a function of the
lattice constant (e. g. with xmgrace).
• What is the most stable bulk phase of Si according to your results?
After running the code, plot your data (given in fcc/energies.dat, bcc/energies.
dat, and diamond/energies.dat) using for example xmgrace by typing:
xmgrace -legend load \
fcc/energies.dat bcc/energies.dat diamond/energies.dat &
You should see that, with the current computational settings, the diamond Si phase
is unfavorable compared to the other two phases by about 0.1 eV. However, the exper-
imentally most stable phase is the diamond structure. We will show in the next two
problems that the too coarse 3×3×3 k-grid is the reason for this disagreement.
7
Problem II: Energy convergence tests
The results of the last problem were not quite physical. As will be shown later, this
is because the convergence was not properly checked. Here, we will explicitly check
total energy convergence with respect to the k-grid and to the basis set. In principle,
each phase needs to be checked separately. Within this tutorial, however, we split the
effort and everyone should only check one phase of their own choice.
• Calculate the total energies for only one of the Si phases of Problem I
as a function of the lattice constant for k-grids of 8×8×8, 12×12×12,
and 16×16×16. Otherwise, use the same computational settings and
the same lattice constants as in Problem I.
• Prepare a plot with all total energies drawn against lattice constant.
Add the 3×3×3 results from Problem I, too.
• Which k-grid should be used to achieve convergence within 10 meV?
You should dedicate one directory for every series of these calculations. You will find
empty folders in skel/problem_2/. These calculations should be done exactly as in
the last problem but with the appropriate changes to control.in. In particular, use
the scripts provided for the Problem I (Fig. 3 and Fig. 4).
In the metallic fcc and bcc phases, the total energy of the 3×3×3 calculation is
about 0.3 eV lower than the most accurate (16×16×16) calculation. The larger part
of this error is already fixed by the 8×8×8 k-grid, which is still off by about 30 meV.
The 12×12×12 grid, on the other hand, is converged within about 5 meV. For the
semiconducting diamond Si phase, the total energy of the 3×3×3 calculation is about
0.3 eV too high, but the convergence is already very good for an 8×8×8 k-grid. In
general, metals (like Si fcc & bcc) or small cells require a denser k-grid compared to
semiconductors (Si diamond) or large cells.
Increasing the number of k-points does not affect the computation times significantly
up to comparably dense k-grids. A total energy calculation with a 12×12×12 grid is
not so much more expensive than a 3×3×3 calculation. Only with even denser k-grids,
computational times increase noteworthy.
In conclusion, we can use a 12×12×12 k-grid for fcc and bcc Si as a good compromise
of high accuracy and reasonable computational time. For simplicity, we use the same
grid also for diamond Si although 8×8×8 would be enough in that case.
8
Convergence with basis set size
In order to change the basis size settings, you should have a look into the species-
dependent settings within control.in. There, you will find a line starting with
“# "First tier" - ...”. Each line after this defines a basis function which is added
to the minimal basis. Right now, there is one additional function for each valence
function (s and p) as well as a d function to allow the atoms to polarize. This is what
we call minimal+spd in the context of this tutorial. In quantum chemistry and in
particular the Gaussian community, this type of basis set is often called “double zeta
(ζ) plus polarization” (DZP).
To run FHI-aims with a minimal basis, simply comment out these three lines by
prepending a “#” character. To run FHI-aims with a full tier1 basis set, uncomment
all four lines following “# "First tier" - ...” by removing the initial “#” character.
You can see that the minimal basis gives completely unphysical results; the energetic
minimum is strongly shifted towards larger lattice constants. The minimal basis lacks
the flexibility to give reasonable geometries. On the other hand, the binding curve does
not change drastically from minimal+spd to the full tier1 basis set whereas the com-
putational effort increases significantly by adding the f functions from minimal+spd
to full tier1. You could also check tier2. In that case, though, it would be worth
using better integration grids (tighter) etc. as well.
While the total energy difference of about 60 meV between minimal+spd and tier1
is still larger than what we were aiming for in the case of the k-grid, we can make use
of the fact that the total energy is variational so that a large part of the basis set error
actually cancels nicely in energy differences between bounded structures.
9
Bonus: Effect of Gaussian broadening of the Kohn-Sham occupation numbers
• Calculate the total energies for fcc Si as a function of the lattice con-
stant for a Gaussian broadening of σ = 0.1 eV. Use the same lattice
constants and computational settings as before with a 12×12×12 k-
grid and the minimal+spd basis.
• Prepare a plot with the corrected, uncorrected total energies, and the
electronic “free energies” for a broadening of σ = 0.1 eV and the de-
fault value of σ = 0.01 eV from the previous calculations.
[Estimated total CPU time: 1 min]
10
Problem III: Phase stability and cohesive properties
After finding converged computational settings, we now revisit the phase stability of
bulk silicon in Problem I. Of course in practice one should always check convergence
first to avoid false conclusions as in Problem I. We will learn how to compute the basic
cohesive properties and study the pressure dependence of phase stability.
These tasks can be performed completely along the lines of Problem I. The resulting
binding curves clearly show that the experimentally observed diamond structure of
silicon is most stable in LDA among the crystal structures studied in this tutorial. In
the rest of this exercise, we will analyze the results obtained so far.
• Figure out how to calculate the cohesive energies and the atomic vol-
umes for all FHI-aims runs in the first subtask.
• Plot all cohesive energies of all three phases into one plot with the
atomic volume on the x axis.
For the single atom energy, special care has to be taken. First, the free atom is of
course spin polarized, and you should use “spin collinear” instead of “spin none”
as well as properly initialize the magnetization. For the free atom, this can be done
by specifying “default_initial_moment hund”.
Second, we use a more converged basis. In particular, uncomment all basis functions
up to and including “tier 3”, increase the confining potential to “cut_pot 8. 3.
1.”, and turn off basis dependent confining potentials with “basis_dep_cutoff 0.”
11
in the species section of control.in.2
Additionaly, use the “Total energy uncorrected” instead of the “Total energy
corrected” because the entropy correction is not physical for finite systems and in
particular for atoms.
The cohesive energy (Ecoh ) of a crystal is the energy per atom needed to separate
it into its constituent neutral atoms. Ecoh is defined as
Ebulk − N Eatom Ebulk
Ecoh = − =− − Eatom , (2)
N N
where Ebulk is the bulk total energy per unit cell and N the number of atoms in the
unit cell. Eatom is the energy of the isolated atom calculated above.
In order to compare the pressure dependence of phase stabilities, we need to express
the lattice constant behavior of all phases on equal footing. One possibility to do so is
to express the lattice constant in terms of the volume per atom. This atomic volume
can be calculated quite easily from the lattice constant a. The simple cubic (super-)cell
has the volume Vsc = a3 . This number has to be divided by the number of atoms Nsc
in this cell Vatom = a3 /Nsc . Please verify that there are two, four, and eight atoms
in the simple cubic supercell in the case of the bcc, fcc, and the diamond structure,
respectively.
In summary, a file energies.dat containing the lattice constants and total energies
per atom can be converted to a file cohesive.dat containing atomic volumes Vatom
and (negative) cohesive energies −Ecoh by the script convert-coh.awk given in skel/
problem_3/. You can use the script by typing:
convert-coh.awk Nsc=.. Eatom=.. <energies.dat >cohesive.dat
where the “..” need to be replaced by the corresponding values of Nsc and Eatom ,
respectively. Please do not forget to specify the correct path to the script.
After plotting with xmgrace -legend load */cohesive.dat, you see that the di-
amond structure is indeed the energetically most stable phase. But it is considerably
more space consuming. This results from the very open structure of the diamond phase
compared to the much closer packing of the bcc and fcc phases. It is plausible that
upon high pressure, phases with more compact atomic volumes might be favorable.
2 In most other finite-basis approaches, it is common to ensure equivalent basis sets for energy differ-
ences. The numerical atomic orbitals of FHI-aims, however, treat the free atom in principle exact
already with a minimal basis, and no such cancellation of errors is needed. We make use of this
fact by using one and the same atomic reference for all basis sizes used for the compounds. This
way, basis set convergence can be checked more easily as cohesive energies strictly increase with
increasing basis size.
12
Equation of states and pressure dependence
• Fit the cohesive energy data for the three phases to the Birch-
Murnaghan equation of states using the program murn.py.
• Determine the lattice constant a, the bulk modulus B0 , and the cohe-
sive energy per atom Ecoh at equilibrium.
• Compare the above quantities for the diamond phase with the experi-
mental values of a = 5.430 Å, B0 = 98.8 GPa, and Ecoh = 4.63 eV [2].
• Plot the cohesive energies E(V ) with respect to the atomic volume for
all three phases.
• Bonus: Given this data, can you estimate at what pressure a phase
transition would occur? Recall the Maxwell construction (see below).
The fitting parameters V0 and E0 are the equilibrium atomic volume and atomic energy,
respectively, B0 the bulk modulus and B00 its derivative with respect to pressure.
Equation (3) can be derived by assuming a constant pressure derivative B00 .
The fitting program murn.py is part of the FHI-aims distribution. You can get usage
information by typing $utilities/murn.py --help. If you have prepared the files
cohesive.dat using the provided gawk script, you can simply use the script with
$utilities/murn.py cohesive.dat -o fit.dat
The program then outputs the parameters V0 , E0 , B0 , and B00 for the given data set
as output. As a quick plausibility check of the fit, you can use the option -p to see
a plot. The script performs no unit conversions, so the bulk modulus B0 is given in
units of eV/Å3 because the cohesive energies and atomic volumes were provided in eV
and Å3 , respectively. You can use “GNU units” to convert to SI units. For example,
use
units -v "0.5 eV/angstrom^3" "GPa"
to convert 0.5 eV/Å3 to about 80 GPa. The optimal
√ lattice constant can be calculated
from the equilibrium atomic volume V0 by a0 = 3 Nsc V0 with Nsc the number of atoms
in the cubic unit cell.
Compare the calculated results with experimental reference values given above.
Note: Exact agreement between DFT and experimental data is not our goal right
13
here – DFT-LDA is an approximation, and we here see how well (or not) it works. It
is well known that LDA in general gives only slightly overbound lattice constants and
cohesive energies.
After performing the Birch-Murnaghan fit for all three phases, please plot the result-
ing fitted curves saved in fit.dat into one figure. You should get something similar
to Fig. 1 in the paper by Yin and Cohen [1].
By exposing the crystal to the right pressure, one can enforce many different atomic
volumes smaller than the equilibrium ones. In principle, the most stable phase for a
given atomic volume V can simply be deduced from the curve with the lowest E(V ).
The corresponding pressure can be calculated from the slope of the curve by the simple
thermodynamic relation p = −∂E/∂V .
However, in the regime of about 13 Å3 < Vatom < 18 Å3 coexistence of a diamond
phase at ∼ 18 Å3 and a bcc phase at ∼ 13 Å3 is favorable. The fraction of atoms in the
two phases then determines the average atomic volume. The resulting average atomic
energy is a straight line between the corresponding points which is below both the
lines of diamond and bcc Si. This is called the Maxwell construction. From the slope
of this line (a common tangent), we can deduce a transition pressure of about 14 GPa
at which diamond and bcc Si could coexist according to our calculations. This is more
than 105 times the ambient pressure of about 100 kPa. Note that there are additional
phases for silicon which have not been calculated here. In fact, the Si β-tin phase is
more stable than the bcc phase at high pressures. For a more thorough discussion,
please refer to [1].
14
Problem IV: Unit cell relaxation
You have learned in “Tutorial 1: Basics of Electronic-Structure Theory” how to opti-
mize the positions of atoms in cluster systems. To obtain optimized periodic structures,
not only the atomic positions must be optimized but also the lattice vectors itself. We
will discuss in the following how this can be done.
• Fully (atoms & lattice vectors) relax a distorted bcc Si structure (see
below) with the computational settings you have used before for the Si
crystals.
The basic idea is to perform a structure relaxation from bcc to diamond Si. Since we
perform a local structure optimization, we cannot go uphill in the energy landscape
or cross energy barriers. Thus, there must be a path from the starting structure to
the desired local minimum with no barriers in between. Otherwise, the optimization
will get stuck in a different local minimum. In order to cross energy barriers, one can
do for example variable cell-shape molecular dynamics, but this is out of the scope of
this tutorial.
It is crucial that the number of atoms in the starting unit cell is compatible with the
desired structures. Since we want to end up in a diamond structure, we have to start
with at least 2 atoms. Hence, our starting unit cell is a cubic bcc structure consisting
of 2 atoms. Of course, we cannot start with the ideal cubic bcc structure because we
will be stuck in the local minimum of this high symmetry structure. Even if we distort
the starting geometry significantly (atomic positions & lattice vectors), we can easily
end up in an unwanted local minimum. Therefore, we will provide a suitable starting
geometry, but feel free to try other ones when you are finished with the given one.
You can find this geometry in the directory skel/problem_4/:
lattice_vector 3.1 0.4 0.4
lattice_vector 0.45 3.1 0.4
lattice_vector 0.45 0.45 3.1
atom_frac 0.0 0.0 0.0 Si
atom_frac 0.3 0.3 0.3 Si
To perform a full optimization of the crystal structure, you have to add two lines to
your control.in. The line
relax_geometry trm 1E-2
requests a structure relaxation for atoms to forces smaller than 10−2 eV/Å and with
the line
15
relax_unit_cell full
the optimization of the lattice vectors is enabled. The convergence criterion will be
the same as the one specified for the atoms. Additionally, it is sufficient to calculate
the forces with an accuracy of 10−3 eV/Å given the desired relaxation accuracy above.
Therefore, add the following line, too:
sc_accuracy_forces 1E-3
The structure optimization with the provided starting geometry should take 14
iterations. If you take a closer look into the FHI-aims output, you will see that not
only the atomic forces are calculated but also a quantity called stress tensor. In essence,
the stress tensor is measure of the forces acting on the unit cell itself.
You can have a look at geometries along the relaxation path if you run the script
$utilities/create_geometry_zip.pl and specify your output file as an argument of
this script. Unzip the resulting file geometries.zip if you want to see the individual
geometries or use Jmol by typing jmol -s geometries.spt.
The resulting geometry is a primitive diamond structure. The angles between the
lattice vectors are about 60◦ and the length of the lattice vectors matches approxi-
mately the result from the Birch-Murnaghan fit in the previous problem. The vector
connecting the two atoms is (0.25, 0.25, 0.25) in fractional coordinates as it should be
for a diamond structure. The convergence criterion for the relaxation is quite loose,
a higher accuracy (e.g. 10−3 eV/Å) would lead to better results. Increasing the basis
set size improves the resulting geometry, too, but you would need to do the same for
the Birch-Murnaghan calculation. Ideally, you start a relaxation with “light” settings.
Then, you use the resulting geometry (e.g. from the file geometry.in.next_step) as
an input for a calculation with “tighter” settings.
16
Problem V: Electronic band structure & density of states
The electronic band structure describes the dispersion relation of electrons inside a
solid. The band structure gives information about ranges of energy that electrons are
allowed to have or not. Permitted ranges are called bands, forbidden ones band gap.
Many properties of a solid can be deduced from its band structure, e.g., if it is a metal,
semiconductor, or insulator.
In order to calculate the band structure, we have to specify the high symmetry points in
the reciprocal space to FHI-aims. An example excerpt from control.in corresponding
to the first part of the suggested path with 50 points per path reads like this:
# diamond band structure:
output band 0.5 0.5 0.5 0.0 0.0 0.0 50 L Gamma
output band 0.0 0.0 0.0 0.0 0.5 0.5 50 Gamma X
output band ...
In each line, the first three numbers are the coordinates of the starting point in units
of the reciprocal lattice vectors. The next three numbers specify the end point. The
band structure is then calculated along the path connecting these two points.
The last two entries are not mandatory for the calculation inside FHI-aims, but they
provide the label of the specified k-points for the plotting script which you are going
to use after the calculation.
Please refer to Appendix II for the location of the other high symmetry points in
the Brillouin zone.
17
where g() is the density of states (DOS). In a free atom or an isolated molecule, the
DOS consists of a series of discrete energy levels (δ peaks) and can be written as
X
g() = δ(i − ). (5)
i
In a periodic system, the single particle energies become k dependent and the DOS
continuous. The number of states per energy is averaged over k
1 X
Z
g() = d3 k δ(i,k − ). (6)
VBZ i BZ
In order to calculate the density of states numerically, we have to replace the integral
over the Brillouin zone (BZ) in Eq. (6) by a sum over k-points. In the case of infinite
k-points, this replacement is exact. However, to compensate the deficiency of a finite
grid, we broaden the δ(k,i −) distribution by a Gaussian function with an broadening
factor σ, " 2 #
1 1 XX 1 − k,i
g() = √ exp − . (7)
2πσ nk i 2 σ
k
18
Visualization of band structure and DOS
In order to visualize the band structure, some postprocessing is needed after the FHI-
aims run. Fortunately, the script aimsplot.py is smart enough to do so as long as
the output, geometry.in, and control.in files are in the same directory. Simply run
$utilities/aimsplot.py without any arguments in this directory.
You see a band structure with an indirect band gap of about 0.5 eV. Please note that
in contrast to convention, the energy zero is at the Fermi energy and not at the valence
band maximum. The resulting LDA band gap is much smaller than the experimental
band gap of silicon (1.17 eV [2]). This disagreement is commonly called the “band gap
problem” of (semi-)local functions.
19
You can now chose how you want to proceed. You can either
do part II which deals with surfaces or part III (page 27) which
covers magnetism. If you have time left after you finished either
part II or III, please proceed with the other part. You are also
encouraged to work on unfinished exercises during the extra
computer time in the evening.
Figure 5: The hydrogen saturated ideal 2×1 Si(001) surface. The cyan (light) atoms cor-
respond to the bulk Si atoms, the blue (dark) atoms are the top Si atoms. The
white atoms on the bottom layer are hydrogen atoms.
In the second part of this tutorial, we come to standard techniques needed to describe
surfaces. As a physical system, we use the clean Si(001) surface, one of the tech-
nological most relevant surfaces. The surface reconstruction (due to dangling silicon
20
bonds at the surface) at low temperatures were unclear for many years. There was a
long discussion and different models were used to understand the differences between
various experimental (LEED, STM) and theoretical approaches. Finally, it has been
shown by direct evidence in STM by Wolkow [5] that the main surface feature at low
temperatures is the asymmetric dimer in a 2×1 reconstructed surface unit cell.
Please use the settings given in Fig. 6 for part II of this tutorial together with the
“light” species defaults for silicon. These settings are the same as for part I, thus, if you
want, you can take your control.in from there and only adjust the k-grid settings. For
saturating the bottom layer of the slab, we additionally need the “light” species defaults
for hydrogen which you can find in $species_defaults/light/01_H_default. As
you can see in Fig. 5, each silicon atom has to be saturated by two hydrogen atoms.
# Physical settings
xc pw - lda
spin none
relativistic atomic_zora scalar
# SCF settings
sc_accuracy_rho 1E -4
sc_accuracy_eev 1E -2
sc_accuracy_etot 1E -5
sc_iter_limit 40
# k - grid settings
k_grid 12 24 1
Figure 6: Physical and computational settings for control.in for part II. This file can be
found in skel/problem_6/control_part2.in.
21
Problem VI: Electronic structure of crystal surfaces
Creation and visualization of geometry.in
22
2×1 Si(001) surface (4 layers)
light settings, relativistic, LDA
-2
10
|Etot − Etot(k=32)| in eV 10
-3
-4
10
4 6 8 10 12 14 16 18
k grid
Figure 7: Convergence test for the k-grid of a 4 layer 2×1 Si(001) surface.
is cheap, you can easily use a vacuum of Lvac = 30 Å or more without noticeable
performance impact. This value is already given in the script by the variable L_vac
in line 15.
There are two important issues to note for the optimal k-grid for this system. First,
there should be no interaction between different periodic images of the slab in z direc-
tion. Therefore, only one k-point is needed on that axis. Second, the lattice vector in
x direction is twice as large as the lattice vector in y direction. As this gives a shorter
periodicity in ky direction, the number of k-points in the first direction can be half of
that in the second direction. We use a well converged k-grid of 12 × 24 × 1 (see Fig. 7).
Similar to part I, for calculating the band structure and DOS, add the following
lines in the control.in file:
# Si 2x1 surface band structure:
output band 0.0 0.0 0.0 0.5 0.0 0.0 50 Gamma J
output band 0.5 0.0 0.0 0.5 0.5 0.0 50 J K
and for the DOS
output dos -18. 0. 200 0.1
dos_kgrid_factors 5 5 1
23
To visualize the band structure, use the script $utilities/aimsplot.py just like
before. Simply run the script in the directory that contains the input and output files
of FHI-aims.
When plotting the band structures as before, note the differences between the four-
and the eight-layer slabs. While the bands within the fundamental band gap, which
stem from the surface, hardly change with the number of layers, the bands get about
twice as dense in the valence and the conduction bands. These bands are bulk-like;
the more layers you add, the more of these bands occur.
24
Problem VII: Relaxing surface structures
• Create a geometry.in with the two top Si atoms of the four-layer ge-
ometry in Problem VI perturbed.
• Set up a calculation to perform a structure relaxation of the top three
layers of the resulting geometry.
• Compare this band structure to the ones obtained in the last Problem.
The DOS and the band structure can be calculated by specifying the same lines in the
control.in as in the task before.
In order to perform structure relaxations to forces smaller than 10−2 eV/Å, add the
following line to control.in:
relax_geometry trm 1E-2
Do not try to relax the unit cell, though. Additionally, it is sufficient to calculate
the forces with an accuracy of 10−3 eV/Å given the desired relaxation accuracy above.
Therefore, add the following line, too:
sc_accuracy_forces 1E-3
During a structure optimization, we like only parts of the structure to relax and the
rest kept at a fixed position. This is done by the keyword constrain_relaxation,
which fixes the position of the last specified atom in geometry.in. In the FHI-aims
manual, you find different options, but for constraining all coordinates of an atom,
we use the flag .true.. In the geometry.in file, please write the following line right
under the atom which you want keep fixed:3
constrain_relaxation .true.
An example excerpt from geometry.in reads like this:
atom -1.2063524529754976 0.0000000000000000 -0.8530200000000001 H
constrain_relaxation .true.
atom 1.2063524529754976 0.0000000000000000 -0.8530200000000001 H
constrain_relaxation .true.
atom ...
3 You can achieve the same result by replacing in write-geom.py the expression output_atom(...)
by output_constrained_atom(...).
25
As a next step, the two top Si atoms must be perturbed in the xy-plane. The
perturbation is best chosen in the order of 0.5 Å. This ensures that the initial geometry
is sufficiently far away from the symmetry induced saddle point of the ideal geometry.
Also, make sure to clearly break the mirror symmetry among these two silicon atoms,
e.g., by moving down one of the two atoms by several tenths of an Å. A possible choice
for the top silicon atoms is:
atom 2.4148451634531707 0.0000000000000000 3.262 Si
atom 5.2445354903595121 0.0000000000000000 4.062 Si
Here, the two top Si atoms have been moved in the x-direction by ±0.5 Å, and one Si
atom has been pushed down by 0.8 Å.
The structure optimization with this starting geometry will take about 10 itera-
tions. Feel free to try out your own guess, depending on the starting guess, the
structure optimization will take between 10 and 30 iterations and therefore 7 to 21
minutes. As in the previous part, you can have a look at geometries along the relaxation
path with the script $utilities/create_geometry_zip.pl. Unzip the resulting file
geometries.zip if you want to see the individual geometries or, as before, use Jmol
by typing jmol -s geometries.spt.
You will see that one dangling bond per top silicon atom is saturated by forming
a dimer among them. Additionally, this dimer gets asymmetric as experimentally
evidenced by Wolkow [5].
If you compare the band structure of the reconstructed and clean Si(001) surface
around the Fermi level you find that by means of the asymmetric dimer the surface
gets semiconducting and there is a small but clear gap between the valence and the
conduction band.
26
Part III: Magnetism and collinear spin calculations
For a few years, there have been sketches of electronic devices (for instance, transistors)
based on the electrons’ spin instead of just their charge. The associated field is known
as “spintronics” and producing workable devices along these lines would be really
beneficial.
Now, nature seems to dictate that for semiconductor devices, semiconductor ma-
terials are a plus, and for spin-polarized electrons, ferromagnetic materials are not a
bad idea either. It would be good if we had a material that is semiconducting and
ferromagnetic at the same time, at room temperature, and that can be grown by
conventional semiconductor technology. Then we could realize “spintronics”.
One of the most popular candidate materials is Ga1−x Mnx As, with x ≈ 2% − 10%
in most experiments. This material can be understood as a solid solution. The basic
lattice is GaAs (zincblende) but with a fraction of the Ga atoms replaced by Mn.
In this part of the tutorial, you will learn the basic concepts of collinear spin calcu-
lations on the basis of GaMnAs. Please use the settings given in Fig. 8 for part III of
this tutorial.
# Physical settings
xc pw - lda
spin collinear
relativistic atomic_zora scalar
# SCF settings
sc_accuracy_rho 1E -4
sc_accuracy_eev 1E -2
sc_accuracy_etot 1E -5
sc_iter_limit 40
Figure 8: Default physical and computational settings for control.in for part III. This file
can be found in skel/problem_8/control_part3.in.
27
Problem VIII: Magnetic Ga3 Mn1 As4
Creation and visualization of geometry.in
• Create a geometry.in for Ga3 Mn1 As4 in the zincblende structure and
give Mn an initial magnetic moment of 4.
• Visualize the structure.
Figure 9: The cubic Ga3 Mn1 As4 cell with 8 atoms. One Ga atom (blue) is replaced by a Mn
atom (purple). The As atoms are drawn in yellow. The left figure shows only the
8 atoms that are unique to the cubic cell. The right figure adds the other atoms
on the corners and faces only for illustration.
In real life, we would now predict equilibrium geometries (lattice parameters, local
atomic positions, etc.) directly from first principles. Since we have limited time, we
will instead take lattice parameters from experiment and keep all atoms fixed at their
ideal lattice positions.
In a key paper on GaMnAs from Ohno et al. [6], the lattice parameter for GaAs is
given as aGaAs = 5.66 Å (x = 0) and that for hypothetical zincblende MnAs aMnAs =
5.98 Å (x = 1). The change of the lattice parameter with the solute concentration x
is often approximated by Vegard’s law. In our case, it relates the lattice parameter of
Ga1−x Mnx As to the atomic concentration of Mn x in the following way
28
Often, Vegard’s law is not a great approximation, but in this case and for small
concentrations, experiments seem to indicate that it holds, see Fig. 10.
Figure 10: Vegard’s law for Ga1−x Mnx As: The lattice constant a is plotted versus Mn
composition x in Ga1−x Mnx As at room temperature. Plot taken from [6].
Use Vegard’s law (Eq. (8)) to estimate the lattice constant of Ga3 Mn1 As4 . (This
compound does not have a small manganese concentration, but for sake of simplicity,
we use Vegard’s law nevertheless.) Build then the appropriate geometry.in for the
zincblende structure in a cubic unit cell (see Appendix I for the structure information).
Remember that you can use the atom_frac keyword to specify atomic positions in units
of the lattice vectors.
To give the Mn atom an initial magnetic moment, add the following line
initial_moment 4
immediately after the specification of the Mn atom position.
Please use the settings given in Fig. 8 and be sure to use “spin collinear” in your
control.in. Use a rather sparse k-grid of 6×6×6 (see Fig. 11) for your calculation
and the “light” species defaults for Ga, Mn, As which are located in the directory
$species_defaults/light/.
29
Ferromagnetic Ga3Mn1As4 (1×1×1 cubic cell)
light settings, relativistic, LDA
-1
10
|Etot − Etot(k=32)| in eV
-2
10
-3
10
-4
10
-5
10 4 8 12 16
k grid
Figure 11: Convergence test for the k-grid of ferromagnetic Ga3 Mn1 As4 .
Similar to previous problems, the DOS as well as the projected DOS can be calcu-
lated by adding the following lines to your control.in:
output dos -20. 0. 200 0.1
output species_proj_dos -20. 0. 200 0.1
dos_kgrid_factors 5 5 5
The “projected density of state” is the fraction of the DOS that is attributable to the
atomic orbitals of any given atom. The “projected density of states” onto a given atom
is not a uniquely defined thing. We here require a concept called “atoms in molecules”,
and if there is more than one atom, there is no unique way to decide whether a given
part of the electron density came from the angular momentum channels of one atom
or of another.
We here use a concept called a “Mulliken analysis”, which simply takes the Kohn-
Sham levels and distributes the electrons in each state (at single-particle energy ) into
the atoms and angular momentum channels where the associated basis functions came
from – a projection. Since basis functions overlap between different atoms, electrons
are “evenly assigned” between them. This way of classifying is anything but unique
and gives increasingly bad results as the basis set increases in size (because then,
electrons on one atom can easily be represented by the basis functions coming from
another atom).
With our settings and basis size, the concept still works well on a qualitative level,
but again, different schemes could be found.
In any event, based on the keywords above, the code produces files called:
• KS_DOS_total.dat
• Mn_l_proj_dos_spin_up.dat
• Mn_l_proj_dos_spin_down.dat
30
The total DOS contains information for both spin channels. For the Mn files, this
is the occupation of angular momentum channels on the atom for the up and down
channels, separately. You are interested in the d channels (l = 2), which is the fifth
column. Read the header of either file if you are unsure.
You can use the script aimsplot_Mn_d_orbitals.py provided in the directory
skel/problem_8/ to plot all these densities. This script is based on the aimsplot.py
script you used before. It has been modified to plot only the relevant DOS for this
exercise. But you can adjust this script if you are interested. Just take a look inside
it. The plot shows you which part of the Kohn-Sham density of states is derived from
which atomic levels, approximately.
We also note that the output species_proj_dos [...] keywords already sum up
all the contributions from every atom of a given element, so there is only one file for
Ga instead of 3, etc. This is ok as we do not need to see 3 Ga atoms separately here,
anyway. But you could if you wanted to.
• Compare your results to the ones in the periodic case calculated be-
fore.
Since we are only interested in a qualitative answer for the neutral Mn atom, you can
use the same control.in that you used in the last task. Just be sure to remove or
comment out all lines that are specific for a periodic calculation, namely the k-grid
and the DOS keywords:
#k_grid 6 6 6
#output dos -20. 0. 200 0.1
#output species_proj_dos -20. 0. 200 0.1
#dos_kgrid_factors 5 5 5
To request a Mulliken analysis, add the following line to your control.in:
output mulliken
Also, be sure to initialize the Mn atom with a magnetic moment in the geometry.in
as before. As a value, you can take the magnetic moment you expect according to
Hund’s rule.
31
You can find the results of the Mulliken analysis in your output file. Look for the
following section:
Performing Mulliken charge analysis on all atoms.
Full analysis will be written to separate file ’Mulliken.out’.
Summary of the per-atom charge analysis:
|
| atom electrons charge l=0 l=1 l=2 l=3
| 1 25.000000 0.000000 7.999856 12.000000 5.000144 0.000000
|
| Total 25.000000 0.000000
This gives you integrated values for the spin and angular momentum occupations of
the Mn atom. A detailed list for every single Kohn-Sham level and spin channel is
written to the file Mulliken.out. As you can see, we have 5 electrons in the d state
(l = 2), which agrees with the electronic configuration of Mn ([Ar]4s2 3d5 ). According
to Hund’s rule, each of these 5 d electrons is filled into one of the 5 d states in a spin
up state, which results in a magnetic moment of 5. We get the same result with our
Mulliken analysis. You can see that a Mulliken analysis can help us to get a qualitative
picture of the electronic configuration of an atom. However, you should not rely blindly
on the results of such an analysis since it is not a unique method as described above.
The summary of the Mulliken analysis for the previous Ga3 Mn1 As4 calculation (done
because of the projected DOS) yields a total magnetic moment of 4 for LDA4 which is
one less than for the free atom. In the crystal, some of the Mn d orbitals will hybridize
with the As sp orbitals to perform the bonding, the others will provide the magnetic
moment.
4 For HSE06 (a hybrid functional), the magnetic moment will increase to a value of about 4.7.
32
Problem XI: Ferromagnetic and anti-ferromagnetic Ga0.75 Mn0.25 As
Creation of anti-ferromagnetic (AFM) and ferromagnetic (FM) structure
Figure 12: The left figure shows the primitive unit cell of GaAs in the zincblende structure.
Doubling this cell in every direction gives the figure on the right – a 2×2×2
supercell that has 16 atoms in total.
As a next step, we need to substitute the Ga atom in the corner and the corre-
sponding Ga atom in the (100) direction with Mn atoms. The Ga atom in the (100)
direction has the coordinates (a, 0, 0) with a the lattice constant. Unfortunately, this
atom does not lie inside our 2×2×2 supercell. But since we have a periodic crystal,
we can find an equivalent atom in our supercell. By adding the lattice vector (0, a, a)
of our supercell to the above Ga atom position, we get the coordinates (a, a, a). This
equivalent position lies inside our supercell and corresponds to the fractional coordi-
nates (1/2, 1/2, 1/2). Therefore, replacing the Ga atom with this coordinates with a Mn
atom results in a magnetic interaction in (100) direction.
For the FM case, we give both Mn atoms “initial_moment 4”, for the AFM case,
one gets “initial_moment 4” and the other one “initial_moment -4”. This will
ensure that the final spin state (after self-consistency is reached) is either FM or
AFM.
33
Ferromagnetic Ga6Mn2As8 (2×2×2 primitive cell)
light settings, relativistic, LDA
-1
10
|Etot − Etot(k=32)| in eV
-2
10
-3
10
-4
10
-5
10 4 8 12 16
k grid
Figure 13: Convergence test for the k-grid of ferromagnetic Ga6 Mn2 As8 .
If you struggle to create the appropriate 2×2×2 supercell, the 16 atom supercell
of pure GaAs is provided in the file geometry_16_atoms_GaAs.in in the directory
skel/problem_9/01_structure_creation/. The lattice constant is already the right
one for Ga0.75 Mn0.25 As. You just have to replace the correct Ga atoms with Mn atoms
and assign them the right initial magnetic moment.
For a clearer visualization of the AFM structure, you can temporarily rename one
of the two Mn atoms in the geometry.in to get them drawn in different colors in a
visualization program.
This system is tricky because it has states at the Fermi level. Therefore, we need a
good k-grid. An acceptable compromise is a 6×6×6 k-grid (see Fig. 13). Now, you
can start the calculations for the AFM and FM structure.
• Derive a formula for the spin interaction parameter J from the total
energy difference between the AFM and FM state.
34
It is important to note that in spin-polarized density functional theory as we use it
here, there are really only two spin directions, up or down. We can thus calculate con-
figurations that are purely ferromagnetic (all spins point up), purely anti-ferromagnetic
(equally many up or down spins on the Mn atoms), or anything in between.
As a result, we can compute for a particular placement of Mn atoms on the lattice
different total energies EFM and EAFM as you are doing right now. Since there are only
up- and down-spins, the appropriate model to represent our energetics is an Ising-type
model. We can postulate:
X
E({Si }) = −J Si · Sj , (9)
hi,ji
Bonus: You can do this subtask if you are finished with the derivations from
above and your calculations are still running.
The precomputed data for the 64-atom cell for the LDA and HSE06 functional can be
found in the directory skel/problem_9/03_dilute_magnetic_GaMnAs/.
The 8-atom cell from the last problem is not really dilute. Therefore, we have
doubled the unit cell size in all directions and computed the properties of a more iso-
lated Mn atom in a 64 atom cell (Ga31/32 Mn1/32 As). Since the computation would
be too time-consuming, just look at the results and plot the various densities of
states as in the previous problem (total DOS and Mn d orbital DOS) with the script
aimsplot_Mn_d_orbitals.py.
LDA results are good for total energies, but as you might know, the energy levels are
sometimes not particularly good. This can be seen by going to a more sophisticated
functional that includes some screened exact exchange in its single-particle equations.
35
Especially the HSE06 functional is interesting. Since there is actually a reasonable
band gap in this functional, you can take the plot of the DOS and see where the top
of the total spin-up valence band is. You will see that it contains empty states – holes.
If you zoom in at the Fermi energy, you will discover that there are filled Mn d states.
In essence, the Mn atom fills up one more of its d orbitals than it has electrons for,
and it gets the missing electrons from the top of the valence band. Thus, holes are
created.
These holes are what mediates the ferromagnetic interaction between the (otherwise
isolated) Mn atoms. The holes are extended, in contrast to the d states of a Mn atom
which are localized.
Discussion of results
This quantity has a value of about 8.5, which would translate to a magnetic moment
of ±4.25 for the Mn atoms if only the Mn atoms had magnetic moments. A Mulliken
analysis would show that the Mn atoms have a moment of ±3.80, a Hirshfeld analysis
yields ±3.74.
We have 6 nearest-neighbors Mn atom pairs, therefore, we get according to Eq. (9)
since Si · Sj = −1 for the AFM case and +1 for the FM case. Altogether, we get the
following formula for the exchange parameter J
EAFM − EFM
J= . (12)
12
With the data of your total energy calculations (and taking the “Total energy un-
corrected”), you should get J ≈ 0.5 meV.
36
For a simple cubic lattice of magnetic moments and a classical nearest neighbor Ising
Hamiltonian (Eq. (9)), Monte Carlo results give for the Curie temperature TC [7]
kB TC = J/0.2217. (13)
With the above J, we get a TC of about 20 K for our ferromagnetic Ga0.75 Mn0.25 As
system, which is too low to be of practical importance.
In the previous exercises, you looked at a relatively large concentration of Mn atoms
where each atom has multiple nearest neighbors. Of course, it would be better to try
to determine J by looking at more dilute structures where we have only isolated Mn
atom pairs or at least only connected in one direction.
Moreover, we could have considered other arrangements of Mn atoms in the lattice.
Indeed, the FM coupling between Mn atoms is much stronger along the (110) or (220)
directions than along the here investigated (100) direction. Thus, we could possibly
generate a much higher TC if we took an arrangement of Mn atoms with (110) or
(220) oriented connection vectors. If our theory was exactly right, we could give that
structure to an experimentalist and see if it can be actually realized and used for
“spintronics”.
37
Appendix I: Structure Information
A a/2 a/2 0
zincblende with a 0 0
B 3a/4 3a/4 a/4
atom species A and B 0 a 0
A a/2 0 a/2
(cubic) 0 0 a
B 3a/4 a/4 3a/4
A 0 a/2 a/2
Table 1: Solids: Atomic coordinates and lattice vectors for different crystal structures.
diamond(001)
atomic coordinates lattice vectors
0 0 0 √
√ a/ 2 0 0
a/2 2 0 a/4 √
√
a/2 2
√
a/2 2 a/2
0 a/ 2 0
√ 0 0 L
0 a/2 2 3a/4
38
Appendix II: High symmetry k-points
fcc x1 x2 x3
fcc(001) x1 x2 x3
L 0.5 0.5 0.5
Γ 0 0 0 Γ̄ 0.0 0.0 0.0
X 0 0.5 0.5 J¯ 0.5 0.0 0.0
W 0.25 0.5 0.75 K̄ 0.5 0.5 0.0
K 0.375 0.375 0.75
Table 3: High symmetry points for fcc/diamond bulk and (001)surface structures given in
units of reciprocal lattice vectors (k = x1 b1 + x2 b2 + x3 b3 ).
Figure 14: Brillouin zone and high symmetry points for fcc/diamond structure.
39
Appendix III: Si(001) geometry generation python script
1 # !/ usr / bin / python
2
3 import sys
4 from math import sqrt
5
6 def o u t p u t _ l a t t i c e _ v e c t o r (x , y , z ):
7 print " la ttice_ve ctor %.16 f %.16 f %.16 f " % (x , y , z )
8 def output_atom (x , y , z , name ):
9 print " atom %.16 f %.16 f %.16 f % s " % (x , y , z , name )
10 def o u t p u t _ c o n s t r a i n e d _ a t o m (x , y , z , name ):
11 print " atom %.16 f %.16 f %.16 f % s " % (x , y , z , name )
12 print " c o n s t r a i n _ r e l a x a t i o n . true . "
13
14 A = 5.416 # Lattice constant
15 L_vac = 30. # Vacuum
16 A_1x1 = A / sqrt (2.) # 1 x1 surface periodicity
17 n_layer = 4 # Number of layers in z - direction
18 Z = A /4. # Layer separation in z - direction
19 C = 0.5 * A_1x1 # Row separation in x - and y - direction
20
21 # H - saturation is put at this fraction of where the next
22 # Si atom would have been .
23 frac_H = 0.63
24
25 # (2 x1 ) reconstructed lattice :
26 o u t p u t _ l a t t i c e _ v e c t o r (2* A_1x1 , 0. , 0.)
27 o u t p u t _ l a t t i c e _ v e c t o r (0. , A_1x1 , 0.)
28 o u t p u t _ l a t t i c e _ v e c t o r (0. , 0. , n_layer * Z + L_vac )
29 print
30
31 # Hydrogen saturation
32 # The next Si would have been at (+/ - C , 0. , -Z ).
33 output_atom ( - frac_H *C , 0. , - frac_H *Z , " H " )
34 output_atom ( + frac_H *C , 0. , - frac_H *Z , " H " )
35 # The next Si would have been at (2* C +/ -C , 0. , -Z ).
36 output_atom (2* C - frac_H *C , 0. , - frac_H *Z , " H " )
37 output_atom (2* C + frac_H *C , 0. , - frac_H *Z , " H " )
38 # Bottom Si layer
39 output_atom (0* C , 0. , 0* Z , " Si " )
40 output_atom (2* C , 0. , 0* Z , " Si " )
41 # Other Si layers
42 output_atom (0* C , C , 1* Z , " Si " )
43 output_atom (2* C , C , 1* Z , " Si " )
44 output_atom (1* C , C , 2* Z , " Si " )
45 output_atom (3* C , C , 2* Z , " Si " )
46 output_atom (1* C , 0. , 3* Z , " Si " )
47 output_atom (3* C , 0. , 3* Z , " Si " )
40
Acknowledgments
We would like to thank Lydia Nemec for helpful discussions and the testers of this
tutorial for their time and feedback.
References
[1] M. T. Yin and M. L. Cohen, Microscopic Theory of the Phase Transformation and
Lattice Dynamics of Si, Phys. Rev. Lett. 45, 1004 (1980).
[2] C. Kittel, Introduction to Solid State Physics (John Wiley & Sons Inc, 1986), 6th
edition.
41