0% found this document useful (0 votes)
34 views11 pages

Exercise 10 Instructions

The document provides instructions for using density functional theory (DFT) to predict the structure of solids. It describes setting up calculations to determine the cohesive energy of different phases of silicon (Si) by comparing their total energies. The phases include face-centered cubic (fcc), body-centered cubic (bcc), and diamond structures. Total energies are calculated for a range of lattice constants around approximate values using a 3x3x3 k-point grid, with the intention of converging the k-point sampling and basis set in subsequent steps.

Uploaded by

Mustafa Durmaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views11 pages

Exercise 10 Instructions

The document provides instructions for using density functional theory (DFT) to predict the structure of solids. It describes setting up calculations to determine the cohesive energy of different phases of silicon (Si) by comparing their total energies. The phases include face-centered cubic (fcc), body-centered cubic (bcc), and diamond structures. Total energies are calculated for a range of lattice constants around approximate values using a 3x3x3 k-point grid, with the intention of converging the k-point sampling and basis set in subsequent steps.

Uploaded by

Mustafa Durmaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Questions?

— Hudson Hall 235 or Hudson Hall 1111 —

Predicting the Structure of Solids by


DFT
Hands-On Instructions

Contents
1. Cohesive Energy for Bulk Phases of Si 1
1.1. Setting up the Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2. Structure-Dependent Total Energies for a Small k-Point Grid . . . . . . . . . . . 4
1.3. Plot the Resulting Total Energies . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4. Converging the k-Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.5. Converging the Basis Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2. Phase Stability and Cohesive Properties 7


2.1. Total Energies as a Function of Lattice Parameter . . . . . . . . . . . . . . . . . 7
2.2. Cohesive Energies as a Function of Volume per Atom . . . . . . . . . . . . . . . . 8
2.3. Birch-Murnaghan Equation of State . . . . . . . . . . . . . . . . . . . . . . . . . 9

A. Transitions Between Different Phases 10

B. Information on the BCC, FCC, and Diamond Lattices 11

1. Cohesive Energy for Bulk Phases of Si


In this exercise, we will work on different possible structural phases of bulk silicon. The correct
description of the phase stability of Si by Yin and Cohen is one of the early success stories of
computational materials science[1].
To do this, we require a mechanism to compute the total energy of an infinite, periodic solid
with certain lattice vectors {ai , i = 1, . . . , 3} and (possibly more than one) atomic positions {bi }
in the unit cell. In the present exercise, we will use the FHI-aims code and set (in the FHI-aims
input file control.in):

1
# Physical s e t t i n g s
xc pw−l d a
spin none
relativistic atomic zora scalar
# SCF s e t t i n g s
sc accuracy rho 1E −4
sc accuracy eev 1E −2
sc accuracy etot 1E −5
# k− g r i d s e t t i n g s ( t o be a d j u s t e d )
k grid nkx nky nkz

Please keep these basic settings as default for this exercise (unless specified otherwise).
You should have seen most of these keywords in the previous exercise for free atoms, but one
thing is new: the k grid specification.
As outlined in class, the different Kohn-Sham eigenfunctions of a periodic solid, ϕi (r) can be
classified a little further by refining the index i ≡ {k, n}. According to the Bloch theorem, the
different (inequivalent) eigenfunctions on the (periodic) lattice can be written as

ϕk,n (r) = exp(ikr) · uk,n (r) , (1)

Here, uk,n (r) is a so-called Bloch function, which has the same periodicity as the crystal itself. In
contrast, the phase factor exp(ikr) need not have any periodicity at all. All that the translational
symmetry of the crystal dictates is that the Bloch functions are only inequivalent for the set
of three-dimensional, real-valued vectors {k} that are located in a unit volume of the so-called
reciprocal space. This space is spanned by vectors {Gi , i = 1, . . . , 3} that are defined by

ai · Gj = 2πδij (2)

(where ai are the lattice vectors of the crystal).


In short, in order to get a good sampling of quantities such as the electron density
X XX
n(r) = |ϕi (r)|2 ≡ |ϕk,n (r)|2 , (3)
i k n

we must sample a sufficiently large number of points k in a practical calculation to get a well
converged result.
You will note that the number of possible points k is in principle infinite (the possible values of
k are continuous and therefore infinitely many even within the unit volume of reciprocal space).
Thus, the sum over k should formally rather be an integral – in practice, however, we can only
compute such an integral as a sum over specific points on a computer (and we have, somewhat
precariously, left out any integration weights in the expression above).
For a practical calculation, it thus remains to specify these k-points. This is what the k grid
setting does, by explicitly setting up a number of integer grid divisions nkx, nky, nkz along each
of the reciprocal lattice vectors Gi , as illustrated in Figure 1 for a two-dimensional example. In
three dimensions, the total number of k-grid points is thus nkx·nky·nkz.
The other players in the FHI-aims input sample above should all be well familiar. The Perdew-
Wang LDA (xc pw-lda) exchange-correlation functional[2] will be used for all calculations. Silicon
would turn out to be nonmagnetic, so no explicit spin treatment is needed. The relativistic
treatment triggered by the relativistic atomic zora scalar setting is not strictly necessary for
silicon. The nuclear charge of silicon (Z = 14) is still small enough to allow for a non-relativistic

2
Figure 1: Illustration of the k-grid for the 2D rectangular lattice. The reciprocal vectors G1 and
G2 define a rectangular reciprocal cell. A k-space grid of 3 × 3 (example) divides the
reciprocal cell into 9 sub-rectangles (green lines) and evaluates the total energy based
on the light green and the grey dots for the reciprocal cell integration.

treatment. Since the correction is computationally inexpensive, it does not hurt to use it, either.
Just be sure to never compare total energies from different relativistic settings.
Please use the default light species settings for Si in
/programs/FHI-aims/aimsfiles/species defaults/light/14 Si default.

1.1. Setting up the Structures


The first step towards studying periodic systems with FHI-aims is to construct periodic ge-
ometries in the FHI-aims geometry input format geometry.in and visualize them. As a next
step, we set basic parameters in control.in for periodic calculations. Finally, we compare total
energies of different Si bulk geometries. Thus:
Task:
• Set up geometry.in files for the Si fcc, bcc, and diamond structures (see Ap-
pendix B) Use the approximate lattice constants a of 3.8 Å for fcc, 3.1 Å for
bcc, and 5.4 Å for the diamond structure.
• Visualize the resulting structures (e.g., using jmol).
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.
– 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 co-
ordinates 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 (4)

3
where R is the Cartesian position of the specified atom.

To visualize the resulting files geometry.in files in jmol, please type

/opt/jmol-14.0.7/jmol.sh geometry.in

To get periodically repeated units of the lattice, open the console in Jmol and type

load ”geometry.in” {3 3 3}

The numbers give the repetition of the structure along the corresponding lattice vector.

1.2. Structure-Dependent Total Energies for a Small k-Point Grid


In this exercise, we compare total energies of different lattice structures for Si as a function of
lattice constant.

Task:
• Prepare a control.in file using 3 × 3 × 3 k-points and the settings given in the
introduction.
• Use a shell script (see below) to calculate total energies of the fcc, bcc, and
diamond phases of Si as a function of lattice constant a. Consider 7 different
values of a in steps of 0.1 Å, centered around the lattice parameters given above,
for each structure.

The basic settings in control.in were given near the beginning of this documents. To start
out, please use:

k grid 3 3 3

We will later find that, for a small unit cell, this k-point density is by no means enough – but
let us go ahead anyway, for now.
Once all input files are set up for a given structure, you can run the parallel version of FHI-aims
by

mpirun -n 4 aims.031214.scalapack.mpi.x | tee aims.out

This command starts a parallel calculation, using four processors simultaneously.


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. Here, however, most of the calculations can be
started using the shell script described below, which takes care of these things and which only
needs slight adjustments.
The example script below calculates the total energy of fcc Si with different lattice constants.

4
#! / b i n / b a s h − l
s e t −e # Stop on e r r o r
f o r A i n 3 . 5 3 . 6 3 . 7 3 . 8 3 . 9 4 . 0 4 . 1 ; do
echo ” P r o c e s s i n g l a t t i c e c o n s t a n t $A Angstrom . ”
mkdir $A

# Use t h i s c o n s t r u c t f o r s i m p l e c a l c u l a t i o n s . As v a l u e s
# a r e r e p l a c e d v e r b a t i m , a l w a y s p u t them i n t o ”(” , ” ) ” .
A2=$ ( python −c ” p r i n t ($A ) / 2 . 0 ” )

# Write geometry . i n
c a t >$A/ geometry . i n <<EOF
# f c c s t r u c t u r e w i t h l a t t i c e c o n s t a n t $A Angstrom .
l a t t i c e v e c t o r 0 . 0 $A2 $A2
l a t t i c e v e c t o r $A2 0 . 0 $A2
l a t t i c e v e c t o r $A2 $A2 0 . 0
atom frac 0.0 0.0 0.0 Si
EOF

# Write c o n t r o l . i n
cp c o n t r o l . i n $A/ c o n t r o l . i n

# Now run FHI−aims w i t h 4 p r o c e s s o r s i n d i r e c t o r y $A


cd $A
mpirun −n 4 aims . 0 3 1 2 1 4 . s c a l a p a c k . mpi . x > aims . out
cd . .
done

For the other two phases, bcc and diamond, you will have to create very similar shell scripts.
Please copy these scripts to dedicated folders for bcc and diamond Si.
To make your script executable, type

chmod 700 script.sh

if your script is named script.sh.


To retrieve the total energies, you could use the following script for post-processing:

#! / b i n / b a s h − l
s e t −e # Stop on e r r o r
echo ”# l a t t i c e c o n s t a n t s i n Angstrom , e n e r g i e s i n eV” > e n e r g i e s . d a t
f o r A i n 3 . 5 3 . 6 3 . 7 3 . 8 3 . 9 4 . 0 4 . 1 ; do
# Check f o r c o n v e r g e n c e o f c a l c u l a t i o n .
i f ( ! g r e p −−q u i e t ” S e l f −c o n s i s t e n c y c y c l e c o n v e r g e d . ” \
<$A/ aims . out ) | | \
( ! g r e p −−q u i e t ”Have a n i c e day . ” \
<$A/ aims . out ) ; then
echo ” ‘ pwd ‘ / $A/ aims . out d i d not c o n v e r g e ! ”
fi

# Get 6 t h column from t h e l i n e w i t h ” T o t a l e n e r g y o f t h e DFT ” .


E=$ ( gawk ’ / \ | T o t a l e n e r g y o f t h e DFT/ { p r i n t $12 } ’ $A/ aims . out )

# Write r e s u l t s t o d a t a f i l e .
echo ”$A $E” >> e n e r g i e s . dat
done

This script extracts the total energies and writes them to a file called 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.

5
Note that, in order to compare total energies for different phases of Si, it is advantageous to
write out the total energy per atom, not per unit cell. This makes a difference for the diamond
structure. For example, use the expression Eatom=$(python -c ”print ($E)/2.0”) 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.

1.3. Plot the Resulting Total Energies


Task:
• Plot the resulting total energies per atom(!) for fcc, bcc, and diamond silicon
as a function of the lattice constant (e.g., using xmgrace).
• What is the most stable bulk phase of Si according to your results?

Thus, plot your data (given in fcc/energies.dat, bcc/energies.dat, and diamond/energies.dat) by


typing:

xmgrace -legend load fcc/energies.dat bcc/energies.dat diamond/energies.dat

You might find that, with the current computational settings, the diamond Si phase is unfavor-
able compared to the other two phases. However, the experimentally most stable phase is the
diamond structure. We will next show that the too coarse 3 × 3 × 3 k-grid is the reason for this
disagreement.

1.4. Converging the k-Grid


Next, 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 our exercise, however,
we can split the effort. Everyone should only check one phase of their choice.

Task:
• Calculate the total energies for only one of the Si phases as a function of the
lattice constant for k-grids of size 8 × 8 × 8, 12 × 12 × 12, and 16 × 16 × 16.
Otherwise, use the same computational settings and the same lattice constants
as before.
• Prepare a plot with all total energies drawn against lattice constant. Add the
previously calculated 3 × 3 × 3 results, too.
• Which k-grid would you use to achieve convergence within 10 meV?

You should dedicate a separate directory to every series of these calculations. The calculations
should be done exactly as in the last problem but with the appropriate changes to control.in.
Discuss the resulting curves and decide which k-space grid would have been “good enough” for
your results.

6
1.5. Converging the Basis Set
In the following, just use a 12 × 12 × 12 k-grid for all three phases.

Task:
• Calculate the total energies for your chosen phase of Si as a function of the
lattice constant for the minimal basis and for the full tier1 basis sets. Use the
same lattice constants and computational settings as before together with the
12 × 12 × 12 k-grid.
• Again, prepare a plot with the total energies. Add the results for the mini-
mal+spd basis set (the default for the light species settings) from the k-point
convergence test above.

In order to change the basis size settings, look into the species dependent settings within con-
trol.in. There, you will find a line starting with

# ”First tier ”

Each line after this defines a group of basis functions (radial function type and angular momen-
tum) which is added to the minimal basis. In the “light” defaults for Si, there is one additional
radial function for each valence channel (s and p) as well as a d function.
To run FHI-aims with a minimal basis instead, simply comment out these three lines by prepend-
ing a ‘#’ character.
To run FHI-aims with a full tier1 basis set, uncomment all four lines following # “First tier” by
removing the initial ‘#’ character.
Can you make a statement about the accuracy of the total energy (how strongly does it change
and in which direction), as well as about the computational effort?
You may also want to look at the Si species defaults for “tight” settings, found in
/programs/FHI-aims/aimsfiles/species defaults/tight/14 Si default.
Here, you will see that a number of other parameters change (grids, Hartree potential, extent
of basis functions, and number of basis functions) in addition to “just” the basis set.

2. Phase Stability and Cohesive Properties


After finding converged computational settings, we can now revisit the phase stability of bulk
silicon.

2.1. Total Energies as a Function of Lattice Parameter


Task:
• Calculate the total energy of fcc, bcc, and diamond Si as a function of lattice
constant a. Use a k-grid of 12×12×12 points, the minimal+spd basis set (light
defaults) and the same lattice constants as before.
• Plot the curves E(a) as done before.

The resulting binding curves should show that the experimentally observed diamond structure
of silicon is most stable in LDA among the crystal structures studied here.

7
2.2. Cohesive Energies as a Function of Volume per Atom
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

Ecoh = Ebulk − Eatom , (5)


where Ebulk is the crystal’s total energy per atom(!). Eatom is the energy of an isolated atom.
We thus need to recompute the appropriate energy of the isolated Si atom.

Task:
• Perform a total energy calculation of the free silicon atom
• Calculate the cohesive energies and the volume of the crystal per atom for all
the structures treated in this section so far.
• Plot the cohesive energies of all three phases into one plot, using the atomic
volume as the x axis.

For the free atom calculation in the LDA, simply use the following settings: (this will lead to a
spherically symmetric atomic state, but we do not need to worry about this here)

# Physical s e t t i n g s
xc pw−l d a
spin collinear
d e f a u l t i n i t i a l m o m e n t hund
relativistic atomic zora scalar

In the species defaults, adjust the following keywords

...
cut pot 8 1.5 1.0
basis dep cutoff 0.0
...

and uncomment all basis functions.


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
3
has to be divided by the number of atoms Nsc in this cell Vatom = Nasc . 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.
After plotting E(V ) (where V is the volume per atom) using xmgrace, the diamond structure is
indeed the lowest-energy phase. Yet, it is considerably more space consuming than the two close-
packed phases. At high pressure, the lower-volume phases might become favorable according to
the Gibbs free energies of the different phases,

G = E − T S + pV . (6)

8
2.3. Birch-Murnaghan Equation of State
The lowest-energy lattice parameter a0 is an important quantity which we can calculate from
our data. In principle, this could be done with a quadratic fit for E(a) or E(V ). Here, we
will discuss and use a thermodynamically motivated and more accurate fitting function, the
Birch-Murnaghan Equation of State[3, 4]. The energy per atom (E = −Ecoh ) is expressed as a
function of the atomic volume (V = Vatom )
0
!
V (V0 /V )B B0 V 0
E(V ) = E0 + B0 0 · 0
+1 − 0 (7)
B B −1 B −1
V0 and E0 are the lowest-energy atomic volume and energy per atom, respectively. B0 is the
so-called bulk modulus and B00 its derivative with respect to pressure. Equation (7) can be
derived by assuming a constant pressure derivative B00 .

Task:
• Fit the cohesive energy data for the three phases to the Birch- Murnaghan
Equation of State using the program murn.py.
• Determine the lattice constant a0 , the bulk modulus B0 , and the cohesive energy
per atom Ecoh at minimum energy for each phase.
• Compare the above quantities for the diamond phase with the experimental
values of a = 5.430 Å, B0 = 98.8 GPa, and Ecoh = 4.63 eV[5].
• Plot the cohesive energies E(V) with respect to the atomic volume for all three
phases.

The fitting program murn.py is part of the FHI-aims distribution. You can get some documen-
tation by typing

murn . py − −h e l p

The script takes an input file with two columns, the first containing the volume and the second
total energies. Using the file name murn.in as an example, one can simply use the script with

murn . py murn . i n −o f i t . dat

The program then writes the parameters V0 , E0 , B0 , and B00 for the given data set to the output
file, here called ’fit.dat’.
As a quick plausibility check of the fit, you can use the option -p to get a visual impression. 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

u n i t s −v ” 0 . 5 eV/ angstrom ˆ3” ”GPa”

9
to convert 0.5 eVÅ3 to about 80 GPa. The optimal lattice constant can be calculated from the
equilibrium atomic volume V0 by
p
3
a0 = Nsc V0 (8)
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 for this exercise.
DFT-LDA is an approximation, and we here see how well (or not) it works.
After performing the Birch-Murnaghan fit for all three phases, please plot the resulting fitted
curves saved in fit.dat into one figure.

A. Transitions Between Different Phases


This here is a simple extra exercise (if one has a printer and a ruler) – not part of the “official”
exercise.
By exposing the crystal to different pressure, one can enforce different atomic volumes smaller
than the volume at the lowest energy. It is, in fact, the Gibbs free energy that is minimized at
constant pressure and temperature. Thermodynamically, the pressure can be written as
∂E
p=− . (9)
∂V
If there were only a single curve E(V ), the volume at equilibrium at a certain pressure is thus
given by exactly the above relation.
However, there is more than one possible phase for Si and each has a different relation E(V ).
∂E
For a given pressure p, we can thus draw a tangent with p = − ∂V at each of these curves.
Simply looking at the definition of the Gibbs free energy, each of these tangents (constant slope
p) corresponds to a constant Gibbs energy. The phase with the lowest tangent “wins” (is the
most stable phase at given pressure p).
What is particularly interesting are pressure values for which two phases have a “common
tangent”. In these cases, the Gibbs energy of these two phases is the same. At lower pressures,
the phase with higher volume becomes stable; at higher pressures, the phase with lower volume
becomes stable.
Thus, the slope of a common tangent between the E(V ) curves of two different phases marks a
transition pressure, i.e., the pressure at which a phase transition between the two would occur.
One can find such a transition pressure quite simply in our plot: Take a ruler and find the
common tangent between two phases, one with lower energy and higher volume, the other with
higher energy and lower volume. This is called the Maxwell construction.
From the slope of this line (a common tangent), deduce the transition pressure at which diamond
and bcc Si could coexist according to our calculations. Hint: The value should be somewhere
between 10 GPa and 20 GPa. This is somewhere around 100 times the ambient pressure of
about 100 kPa.
Note, however, that there are additional possible crystal structures for silicon which we have
not calculated here. In reality, the Si β-tin phase is a more stable high-pressure phase than the
bcc phase. See, for instance, Reference [1].

10
B. Information on the BCC, FCC, and Diamond Lattices
The fcc lattice for Si with a lattice constant a is defined by

lattice vector 0 . 0 a /2 a /2
lattice vector a /2 0 . 0 a /2
lattice vector a /2 a /2 0 . 0
atom frac 0.00 0.00 0.00 Si

The bcc lattice for Si with a lattice constant a is defined by

lattice vector a /2 a /2 −a /2
lattice vector a /2 −a /2 a /2
l a t t i c e v e c t o r −a /2 a /2 a /2
atom frac 0.00 0.00 0.00 Si

The diamond lattice for Si with a lattice constant a is defined by

lattice vector 0 . 0 a /2 a /2
lattice vector a /2 0 . 0 a /2
lattice vector a /2 a /2 0 . 0
atom frac 0.00 0.00 0.00 Si
atom frac 0.25 0.25 0.25 Si

References
[1] M. T. Yin and M. L. Cohen, “Microscopic theory of the phase transformation and lattice
dynamics of si,” Physical Review Letters, vol. 45, pp. 1004–1007, Sept. 1980.

[2] J. P. Perdew and Y. Wang, “Accurate and simple analytic representation of the electron-gas
correlation-energy,” Physical Review B, vol. 45, pp. 13244–13249, Jan. 1992.

[3] F. Birch, “Finite elastic strain of cubic crystals,” Physical Review, vol. 71, no. 11, pp. 809–
824, 1947.

[4] F. D. Murnaghan, “The compressibility of media under extreme pressures,” Proceedings of


the National Academy of Sciences of the United States of America, vol. 30, pp. 244–247,
July 1944.

[5] C. Kittel, Introduction to Solid State Physics. Hoboken, NJ: John Wiley & Sons, Inc, 8 ed.,
2005.

11

You might also like