0% found this document useful (0 votes)
28 views6 pages

Project - 05a - Geometry Optimization Ground State

Uploaded by

Rahul R
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)
28 views6 pages

Project - 05a - Geometry Optimization Ground State

Uploaded by

Rahul R
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/ 6

geometry optimization : towards the ground state

This document explains how Quantum Espresso can be used to find the ground state geometry of a
given type of crystal (it will be explained what is meant by ‘ground state geometry’). This is a
powerful and largely automatized process. There will be another document with a somewhat longer
procedure, which will lead to the same result yet which will give additional information on top of the
ground state geometry (elastic information via the equation of state).

The few crystals we calculated so far in this course (silicon, halite,…), had very high symmetry.
Actually, one single number was sufficient to nail down the position of every atom in the infinite
perfect crystal. If we say ‘silicon in the diamond structure’, then we need to know the lattice
parameter only (=a single number) and we know exactly where every atom is. The same holds true
for ‘NaCl in the rocksalt structure’.

For the majority of crystals, more information is needed. Let us have a look at lead monoxide (PbO)
in its mineral form that is knows as litharge. The shape of the crystal unit cell is not cubic, it is
tetragonal. That means that two numbers must be specified to determine this unit cell: the a=b
lattice parameters and the c lattice parameter. In the most general case, 6 numbers need to be given
(three lattice parameters and three angles – for a tetragonal cell, all angles are 90).

Get the experimental crystal structure for litharge in the following way: go to COD, select ‘Search’,
enter Pb and O in the element boxes, and 2 and 2 in the boxes for the minimal and maximal number
of elements (i.e. you ask for exactly these two elements), then press ‘Send’. You will get a list of over
40 crystals made exclusively from Pb and O (several pages of twenty each). We’ll work with the one
that has a cell volume of 79.327 Å3, which is a room temperature measurement. Download the cif file
to your computer.

Alternatively, the direct download of this cif file is via this link.

If you inspect the cif file, you see that the a=b lattice parameter is 3.9744 Å, while the c lattice
parameter is 5.022 Å. Two numbers, indeed. You’ll see coordinate lines near the end of the file:

_atom_site_label
_atom_site_fract_x
_atom_site_fract_y
_atom_site_fract_z
_atom_site_U_iso_or_equiv
Pb 0.00000 0.50000 0.23510 0.01520
O 0.00000 0.00000 0.00000 0.01013

The oxygen atoms in the unit cell are at a set of coordinates that looks very simple: (0, 0, 0). The lead
atoms are at (0, 0.5, 0.23510). Those “0” and “0.5” are nice fractions, whereas the “0.23510” looks
like a random number. That is no coincidence. We’ll see in the crystallography lecture of this course
that the former two are determined by symmetry, while the latter one is a “free coordinate” : you
can assign any value to it, and the overall symmetry of the crystal will not change. Therefore, if we
say “PbO in the litharge structure with a=b=3.9744 Å and c=5.022 Å”, the crystal is not entirely
determined yet. We need to tell that the z-coordinate for the Pb-atom is 0.23510. That means we
need three numbers to fully specify this crystal.

Imagine we know all information about the symmetry of this crystal, but we do not know the values
for these 3 numbers from experiment (this situation often arises in practice). Can we get these
numbers from DFT? This document will tell you how. The result will be a prediction for the full
specification of a crystal in its ground state, i.e. in the absence of external perturbations as pressure
and temperature. DFT will predict how the crystal would be like at 0 K.

1. preparation
Use cif2cell to convert the structure to a *.in file for QE, and add the other required information as
done before. Regarding the pseudopotentials, take this one for Pb and this one for O.

We’ll focus on the geometry aspect in this exercise, so let’s assume you have done the convergence
testing already. These are good settings for basis set size and k-mesh:

ecutwfc=60,
ecutrho=240,

K_POINTS {automatic}
5 5 5 0 0 0

These settings guarantee a numerical precision of 2 kB on stress tensor components and 1 mRy/au
on forces (if you’re not familiar with these quantities: they will be shortly explained underneath, as
well as in the lecture on geometry optimization).

Run this calculation, which will take somewhat less than 2 minutes (depending on the speed of your
computer). For later reference, take note of the total energy:

! total energy = -1824.46682511 Ry

And these are the stress tensor felt by the crystal and the forces on all atoms:

Forces acting on atoms (Ry/au):

atom 1 type 2 force = 0.00000000 0.00000000 0.02154389


atom 2 type 2 force = 0.00000000 0.00000000 -0.02154389
atom 3 type 1 force = 0.00000000 0.00000000 -0.00000000
atom 4 type 1 force = 0.00000000 0.00000000 0.00000000

Total force = 0.030494 Total SCF correction = 0.000129

entering subroutine stress ...

total stress (Ry/bohr**3) (kbar) P= 52.50


0.00038269 0.00000000 0.00000000 56.40 0.00 0.00
0.00000000 0.00038269 0.00000000 0.00 56.40 0.00
0.00000000 0.00000000 0.00030323 0.00 0.00 44.70
2. positions of the atoms
If symmetry does not dictate it, how does nature choose the value for the z-coordinate of Pb? Why is
it 0.2351 and nothing else? The DFT answer is: because this is the value that minimizes the total
energy of the crystal. Indeed, you could make a few calculations with different values for this z-
coordinate, and search for the value that minimizes the energy1. More complex crystals will easily
have 5, 10 or more such degrees of freedom, which will make such an explicit calculation procedure
rapidly too expensive. QE has an automatic procedure to search efficiently the minimum of this high-
dimensional energy function. We’ll apply this to litharge :

Make the following changes/additions to your QE input file, starting from the file you used for the
previous static calculation (the new &IONS block should come after the &ELECTRONS block):

calculation='relax',

&IONS
ion_dynamics='bfgs',
/

Run this calculation (expect about 5 minutes), and inspect the output file:

Final energy = -1824.4681413711 Ry

Begin final coordinates

ATOMIC_POSITIONS (crystal)
Pb 0.000000000 0.500000000 0.241551287
Pb 0.500000000 0.000000000 0.758448713
O 0.000000000 0.000000000 0.000000000
O 0.500000000 0.500000000 -0.000000000
End final coordinates

Forces acting on atoms (Ry/au):

atom 1 type 2 force = 0.00000000 0.00000000 0.00003019


atom 2 type 2 force = 0.00000000 0.00000000 -0.00003019
atom 3 type 1 force = 0.00000000 0.00000000 0.00000000
atom 4 type 1 force = 0.00000000 0.00000000 0.00000000

You observe here that the total energy is indeed lower than in the previous calculation. The optimal
z-coordinate is 0.24155. The force on the Pb-atoms has reduced from 21.5 mRy/au to 0.03 mRy/au
(which is basically zero). This z-coordinate value is only slightly different from the experimental value

1
It is instructive to test this explicitly. Take a few values for z within the interval 0.21 – 0.26 (in steps of 0.1),
and compute and plot the total energy as a function of z. Compare this graph with the z-value and
corresponding energy you get later in Sec. 2 using the automatic procedure.
z=0.23510 that was in the initial cif file. If we wouldn’t have known the experimental value at all, this
would have been an excellent prediction. Actually, internal coordinates are not easily determined
experimentally, their error bars can be large. In many cases, a DFT prediction of internal coordinates
is the fastest way to get fairly accurate values.

3. shape of the unit cell


We are now ready to search for the optimal values of the a=b and c lattice parameters. One way to
do this, is to do DFT calculations for all possible values of a=b and c, and find out which value gives
the lowest total energy (ideally, for every single choice of a=b and c, the z-value has to be optimized
too) . An alternative (and faster) way is to use an automatic optimization procedure within QE that
searches for the set of lattice parameters, unit cell angles and internal positions that makes the stress
tensor zero (which corresponds automatically to a minimal total energy).

At the end of your previous calculation, you found the stress tensor (for the experimental lattice
parameters with the optimal z-coordinate):

entering subroutine stress ...

total stress (Ry/bohr**3) (kbar) P= 34.54


0.00027768 0.00000000 0.00000000 40.84 0.00 0.00
0.00000000 0.00027768 0.00000000 0.00 40.84 0.00
0.00000000 0.00000000 0.00014937 0.00 0.00 21.95

It tell us that in order to adopt the given (experimental) lattice parameters, the crystal should –
according to DFT – be subject to an applied stress of about 41 kbar in the horizontal plane and 22
kbar in the vertical direction. The ground state lattice parameters at zero pressure should therefore
be a little bit larger then these experimental values (at least, according to the PBE XC-functional). The
required stress is not isotropic, implying that the c/a ratio of the PBE-optimized crystal is slightly
different from the ratio for the experimental unit cell.

Make the following changes/additions to your *.in file (note that we start from the optimized z-
coordinate), and let the calculation run. This will take a while, roughly 1.5 hours :

calculation='vc-relax',

&IONS
ion_dynamics='bfgs',
/

&CELL
cell_dynamics='bfgs',
press=0.d0,
press_conv_thr=0.5d0,
/

ATOMIC_POSITIONS {crystal}
Pb 0.0000000000d0 0.5000000000d0 0.2415512870d0
Pb 0.5000000000d0 0.0000000000d0 0.7584487130d0
O 0.0000000000d0 0.0000000000d0 0.0000000000d0
O 0.5000000000d0 0.5000000000d0 0.0000000000d0

The new &CELL block tells which optimization scheme will be used to change the unit cell shape and
volume (‘bfgs’), it states that the target for the applied pressure is zero (if the applied pressure is
zero, then the stress tensor will be zero), and it tells that we consider it to be zero as soon as it is
smaller than 0.5 kbar (for a computer, ‘zero’ is always ‘zero within a given treshold’).

Inspect the output file after the calculation has finished, to see what are the optimal lattice
parameters and their corresponding energy and stress tensor:

Begin final coordinates


new unit-cell volume = 615.80088 a.u.^3 ( 91.25227 Ang^3 )

CELL_PARAMETERS (alat= 7.51052751)


1.022364802 0.000000000 0.000000000
0.000000000 1.022364802 0.000000000
0.000000000 0.000000000 1.390647962

ATOMIC_POSITIONS (crystal)
Pb 0.000000000 0.500000000 0.215741137
Pb 0.500000000 0.000000000 0.784258863
O 0.000000000 0.000000000 0.000000000
O 0.500000000 0.500000000 -0.000000000
End final coordinates

The lattice parameters are expressed in terms of ‘alat’, which itself is given in bohr units (1 bohr unit
= 1 atomic unit = 0.529177 Å). After conversion, you conclude that the DFT(PBE) prediction for the
lattice parameters of litharge is a=b=4.0633 Å and c=5.5270 Å. For many, many crystals such a
DFT(PBE) prediction will be in very good agreement with experiment (we’ll talk more about the kind
of deviations you can expect later). Litharge is a somewhat exceptional case (there are good reasons
for that, see later), as the experimental values of a=b=3.9744 Å and in particular c=5.022 Å are quite
a bit off.

Note as well that the z-coordinate of Pb has changed too: it is not independent from the volume.

The total energy has lowered as well. When sticking to the PBE XC-functional, this is the lowest
possible energy you can achieve by varying lattice parameters and the Pb z-coordinate:

! total energy = -1824.47526831 Ry

The forces are obviously zero:

Forces acting on atoms (Ry/au):

atom 1 type 2 force = 0.00000000 0.00000000 0.00006979


atom 2 type 2 force = 0.00000000 0.00000000 -0.00006979
atom 3 type 1 force = 0.00000000 0.00000000 0.00000000
atom 4 type 1 force = 0.00000000 0.00000000 0.00000000

Total force = 0.000099 Total SCF correction = 0.000003


And the stress tensor is zero too (remember that our precision settings guaranteed a precision of 2
kB on stress tensor components – everything below 2 kB is therefore indistinguishable from zero):

total stress (Ry/bohr**3) (kbar) P= -0.30


-0.00000079 0.00000000 0.00000000 -0.12 0.00 0.00
0.00000000 -0.00000079 0.00000000 0.00 -0.12 0.00
0.00000000 0.00000000 -0.00000462 0.00 0.00 -0.68

Make sure you can reproduce the three calculations in this document. Also, make sure you
understand why the keywords in each section are added/modified. It might be helpful to search their
definition in the keyword list of QE.

You might also like