Project - 02 - Basic Calculation Quantum Espresso No Gui
Project - 02 - Basic Calculation Quantum Espresso No Gui
Project - 02 - Basic Calculation Quantum Espresso No Gui
Disclaimer: this document tells you ‘how to’, not ‘why’. It is meant only to make you familiar with the
practical procedure. Explanations about what every step really means, will follow gradually
throughout the course.
2. open a new terminal window (double-click the terminal icon in the left vertical bar)
3. if not yet done before: create a folder where you will perform all your Quantum Espresso
calculations (call it workQE), and descend into that folder:
mkdir workQE
cd workQE
4. make a subfolder (called basic here, yet any name will do) where you will perform this particular
calculation, and descend into it:
mkdir basic
cd basic
5. (this step requires internet access) download from a crystallographic database a file that contains a
full specification of the crystal structure of silicon at room temperature. This file has the so-called cif-
format, a common crystal structure definition format that is human-readable as well as machine-
readable.
wget http://www.crystallography.net/cod/9008566.cif
6. Quantum Espresso reads crystal structure information in its own way. Translate the cif file to
Quantum Espresso format, and store this into a file with the name ‘basic.in’ (same name header as
the folder – this is not strictly required, yet it creates some natural order into your files):
nano basic.in
8. after the 8 lines that start with ‘#’, enter the following block of information:
&CONTROL
calculation='scf',
outdir='.',
prefix='basic',
pseudo_dir='.',
verbosity='low',
tprnfor=.true.,
tstress=.true.,
/
The value for ‘prefix’ can be chosen freely – as you are going to do a basic calculation, it’s reasonable
to call it ‘basic’. However, any name will do.
9. scroll down until you meet the &SYSTEM block. It will have a few lines (ibrav, A, nat, ntyp). In the
latter three, you will recognize the lattice parameter of silicon in Ångstrom, the number of atoms in
the unit cell, and the number of inequivalent atoms in the unit cell. Add the lines coloured in red,
until the &SYSTEM block looks like this:
&SYSTEM
ibrav = 0
A = 5.43070
nat = 2
ntyp = 1
ecutwfc=50,
ecutrho=200,
input_dft='pbe',
occupations='smearing',
smearing='mv',
degauss=0.005d0,
/
10. After the &SYSTEM block, add the following &ELECTRONS block:
&ELECTRONS
conv_thr=1d-08,
mixing_beta=0.7d0,
/
11. (this step requires internet access) Don’t touch CELL_PARAMETERS and
ATOMIC_POSITIONS. In the line ATOMIC_SPECIES, there is some work to do. For every
element in the unit cell (in this case: only Si), do the following:
• go to http://www.quantum-espresso.org/pseudopotentials
• click on the element you need
• copy the url of the first item in the table (in this case: http://www.quantum-
espresso.org/upf_files/Si.pbe-n-kjpaw_psl.1.0.0.UPF) (for later use: always check whether
the chosen pseudopotential has the XC-functional you want – more on this in the next
weeks)
• go to the folder in which your current calculation is being created, and type there
• wget http://www.quantum-espresso.org/upf_files/Si.pbe-n-
kjpaw_psl.1.0.0.UPF
• copy the name of the UPF file that has been put in your folder (here: Si.pbe-n-
kjpaw_psl.1.0.0.UPF)
• in basic.in, replace Si_pseudo by that name, such that the result is
ATOMIC_SPECIES
Si 28.08500 Si.pbe-n-kjpaw_psl.1.0.0.UPF
12. After the atomic positions, add these lines (we will call this the k-mesh later on):
K_POINTS {automatic}
7 7 7 0 0 0
13. close the file by ‘ctrl-x’ (=hold the ctrl key and type x), and then press ‘y’ to confirm that you want
to save all changes to this file.
14. Now launch Quantum Espresso, and tell it to read its input from the basic.in file. Tell it it should
write its output to basic.out :
15. verify whether your calculation finished correctly by opening the output file:
nano basic.out
=------------------------------------------------------------
JOB DONE.
=------------------------------------------------------------
16. For now, we will extract only one of the many outputs in this file, namely the ‘total energy’ (we’ll
see later what it means). You find it near the end of the output file, in a line preceded by an
exclamation mark:
These steps will have to be performed many times during the course. It will become a routine.
Perhaps you’ll develop a strategy to make this faster and easier for yourself – feel free to do so.
As a summary, this is the entire basic.in file as it should look like after all modifications:
#*************************************************************************
#* Generated by cif2cell 1.2.10 2018-09-17 14:27
#* T. Bjorkman, Comp. Phys. Commun. 182, 1183-1186 (2011). Please cite
generously. *
#*
#* Data obtained from COD. Reference number : 9008566
#* ()
#* Wyckoff, R. W. G., Crystal Structures 1, 7-83 (1963)
#**************************************************************************
&CONTROL
calculation='scf',
outdir='.',
prefix='basic',
pseudo_dir='.',
verbosity='low',
tprnfor=.true.,
tstress=.true.,
/
&SYSTEM
ibrav = 0
A = 5.43070
nat = 2
ntyp = 1
ecutwfc=50,
ecutrho=200,
input_dft='pbe',
occupations='smearing',
smearing='mv',
degauss=0.005d0,
/
&ELECTRONS
conv_thr=1d-08,
mixing_beta=0.7d0,
/
CELL_PARAMETERS {alat}
0.500000000000000 0.500000000000000 0.000000000000000
0.500000000000000 0.000000000000000 0.500000000000000
0.000000000000000 0.500000000000000 0.500000000000000
ATOMIC_SPECIES
Si 28.08500 Si.pbe-n-kjpaw_psl.1.0.0.UPF
ATOMIC_POSITIONS {crystal}
Si 0.000000000000000 0.000000000000000 0.000000000000000
Si 0.250000000000000 0.250000000000000 0.250000000000000
K_POINTS {automatic}
7 7 7 0 0 0