This page is under maintenance
search for a tutorial
19 November 2020
20 August 2020
Band structure of Silicon crystal - Quantum Espresso tutorial
In this session, I have taken FCC-Silicon as an example. but you can try for your own crystal structure. To plot band structure we have to clear with 3 input files. they are followed as,
1. scf input file = To calculate groundstate properties, Fermi energy
2. bands input file = To generate bands energy values for preferred k-points
3. pp input file = To generate plottable data in Gnuplot/ origin/ etc
2. bands input file = To generate bands energy values for preferred k-points
3. pp input file = To generate plottable data in Gnuplot/ origin/ etc
As we know from the previous session how to generate an input file for scf calculation. Since I have shown my input file for my silicon structure as below,
=========================================================================
&control
calculation='scf',
title='si',
prefix='si',
pseudo_dir='.',
outdir='./tmp/'
/
&system
ibrav=2,
celldm(1)=10.2625,
nat=2,
ntyp=1,
nbnd =8,
ecutwfc=60.0,
ecutrho=720.0,
/
&electrons
conv_thr = 1d-8
/
ATOMIC_SPECIES
Si 28.08525 Si.pbe-rrkj.UPF
ATOMIC_POSITIONS crystal
Si -0.125 -0.125 -0.125
Si 0.125 0.125 0.125
K_POINTS automatic
4 4 4 1 1 1
========================================================================
In my pseudopotential file the silicon atom has 4 valance electrons as per two silicon atoms this will be counted as 8. so I choose nbnd as 8.
&control
title='si',
prefix='si',
pseudo_dir='.',
outdir='./tmp/',
calculation='bands',
/
&system
ibrav=2,
celldm(1)=10.2625,
nat=2,
ntyp=1,
ecutwfc=60.0,
ecutrho=720.0,
nbnd=8,
/
&electrons
conv_thr = 1d-8
/
ATOMIC_SPECIES
Si 28.0855 Si.pbe-rrkj.UPF
ATOMIC_POSITIONS crystal
Si -0.125 -0.125 -0.125
Si 0.125 0.125 0.125
K_POINTS
36
0.5 0.5 0.5 1
0.4 0.4 0.4 2
0.3 0.3 0.3 3
0.2 0.2 0.2 4
0.1 0.1 0.1 5
0.0 0.0 0.0 6
0.0 0.0 0.1 7
0.0 0.0 0.2 8
0.0 0.0 0.3 9
0.0 0.0 0.4 10
0.0 0.0 0.5 11
0.0 0.0 0.6 12
0.0 0.0 0.7 13
0.0 0.0 0.8 14
0.0 0.0 0.9 15
0.0 0.0 1.0 16
0.0 0.1 1.0 17
0.0 0.2 1.0 18
0.0 0.3 1.0 19
0.0 0.4 1.0 20
0.0 0.5 1.0 21
0.0 0.6 1.0 22
0.0 0.7 1.0 23
0.0 0.8 1.0 24
0.0 0.9 1.0 25
0.0 1.0 1.0 26
0.0 0.9 0.9 27
0.0 0.8 0.8 28
0.0 0.7 0.7 29
0.0 0.6 0.6 30
0.0 0.5 0.5 31
0.0 0.4 0.4 32
0.0 0.3 0.3 33
0.0 0.2 0.2 34
0.0 0.1 0.1 35
0.0 0.0 0.0 36
=======================================================================
calculation='scf',
title='si',
prefix='si',
pseudo_dir='.',
outdir='./tmp/'
/
&system
ibrav=2,
celldm(1)=10.2625,
nat=2,
ntyp=1,
nbnd =8,
ecutwfc=60.0,
ecutrho=720.0,
/
&electrons
conv_thr = 1d-8
/
ATOMIC_SPECIES
Si 28.08525 Si.pbe-rrkj.UPF
ATOMIC_POSITIONS crystal
Si -0.125 -0.125 -0.125
Si 0.125 0.125 0.125
K_POINTS automatic
4 4 4 1 1 1
========================================================================
In my pseudopotential file the silicon atom has 4 valance electrons as per two silicon atoms this will be counted as 8. so I choose nbnd as 8.
Bands input file followed as
=========================================================================&control
title='si',
prefix='si',
pseudo_dir='.',
outdir='./tmp/',
calculation='bands',
/
&system
ibrav=2,
celldm(1)=10.2625,
nat=2,
ntyp=1,
ecutwfc=60.0,
ecutrho=720.0,
nbnd=8,
/
&electrons
conv_thr = 1d-8
/
ATOMIC_SPECIES
Si 28.0855 Si.pbe-rrkj.UPF
ATOMIC_POSITIONS crystal
Si -0.125 -0.125 -0.125
Si 0.125 0.125 0.125
K_POINTS
36
0.5 0.5 0.5 1
0.4 0.4 0.4 2
0.3 0.3 0.3 3
0.2 0.2 0.2 4
0.1 0.1 0.1 5
0.0 0.0 0.0 6
0.0 0.0 0.1 7
0.0 0.0 0.2 8
0.0 0.0 0.3 9
0.0 0.0 0.4 10
0.0 0.0 0.5 11
0.0 0.0 0.6 12
0.0 0.0 0.7 13
0.0 0.0 0.8 14
0.0 0.0 0.9 15
0.0 0.0 1.0 16
0.0 0.1 1.0 17
0.0 0.2 1.0 18
0.0 0.3 1.0 19
0.0 0.4 1.0 20
0.0 0.5 1.0 21
0.0 0.6 1.0 22
0.0 0.7 1.0 23
0.0 0.8 1.0 24
0.0 0.9 1.0 25
0.0 1.0 1.0 26
0.0 0.9 0.9 27
0.0 0.8 0.8 28
0.0 0.7 0.7 29
0.0 0.6 0.6 30
0.0 0.5 0.5 31
0.0 0.4 0.4 32
0.0 0.3 0.3 33
0.0 0.2 0.2 34
0.0 0.1 0.1 35
0.0 0.0 0.0 36
=======================================================================
since it is a fcc structure the high symettry points as L, Γ, M, X = 4 k_points. but Silicon has 8 bands which results 36 kpoints. These k points were generated fro the Quantum espresso tools by following link [Q-E.materials cloud kpoint generator]. You can choose kpoints as your wish. But I have used tpa/2 kpoints here.
pp input file as followed as,
===========================================================
&BANDS
outdir='./tmp/',
prefix = 'si',
filband = 'si_bands.dat',
/
===========================================================
Run commands as followed as,
pw.exe < Si.scf.in > Si.scf.out # for scf calculation
pw.exe < Si.bands.in > Si.bands.out # for bands calculation
bands.exe <Si.bands.pp.in > si.bands.pp.out # for plot files generation
To download input files click here.
after running the pp file you may get the potable file as in .gnu format the can be plotted from Gnuplot and origin. plot format is followed here.
fermi level can be found from the scf output file. if you want to plot E_F as zero, you have to subtract the y data by fermi energy. To calculate Fermi level you must to run nscf calculation.Download example nscf input
Thank you for reading please subscribe and comments for more updates.
23 June 2020
Unitcell relaxiation non MD- Quantum espresso series
Dear friends,
In this blog, I will have posted about unitcell optimization. Let us go to the input file, as usual, we used to keep the calculation as ‘vc-relax’- which states that vary cell parameters. Previously we may found some files like “wfc” that. To avoid such interruption we are going to use the prefix and outdir controls. The outdir directory only meant for temporary file storage. Then etot_conv_thr and forc_conv_thr are the energy and force convergence threshold with respectively. Both are the accuracy controls for our calculation. The force convergence should be less than the energy convergence. Otherwise, our computation cost will drain.
In the system controls we are going to provide the cell dimension using celldm or a . Here we are using the simple cubic Si crystal structure. So I give a = 7 (unoptimized lattice parameter.) but the reference is we known as a = 5.4683 Å.
If you want to allow the atoms to move inside the unitcell you can use the &ions input. Mainly this used in the molecular dynamic case such as BFGS. Here we do not want such confusions. So let it be empty life make easy…!!
In the &cell input we have to implement the freedom of unitcell parameter. I used the unitcell can optimize according to the ibrav. So the degree of freedom is restricted no more many body problems. { cell_dofree = ‘ ibrav’ }
We have to implement the same thing in the movement of the atoms. So better we convert the atomic positions into ( alat ) atomic lattice from angstrom. The restriction for the movement of the atoms along the axis can be controlled by the last three digits of 0 0 0 in the atomic position.
Note: we are not treating and care of K_points but if you are using 8 8 8 0 0 0 points for scf calculation you must use as 4 4 4 0 0 0 points.
Now we can run the program following commands.
$ mpiexec –np 2 pw.exe < relax.in > relax.out
Here, the input file saved as in the name of relax.in. We can wait for the program has to run.
Suppose if you have WSL (windows system linux) you can see the output file by following command in WSL $ tail –f relax.out . Now our cell dimension can be seen in the output file as celldm(1) = 10.34723695.
If you are feel not well the use WSL cmd as $ grep “celldem(1) =” relax.out . I have used the command for searching the pressure variation $ grep “ P=” relax.out. if the pressure is in negative scale then our unitcell volume is large similarly for small volume of unitcell pressure will be high.
Now let us interpret our results to check the following figure. The calculated values obtained from the relax.out file.
I hope this blog may help you. Thank you for supporting my blog.....!!🥰
20 June 2020
Molecular Dynamics( MD - Optimization ) Parallel Execution in QUANTUM ESPRESSO
Dear
Friends,
In this
session, we are going to see the unitcell optimization using the "Verlet
ion dynamics Parrinello-Rahman
algorithm of lagrangian". Before executing groundstate studies we have to
optimize the structure first. In this session, I used the same Silicon
structure by changing some parameters in the input file. In the
calculation, I have defined as "vc_relax" which stands for
structure relaxation. nstep has the control of iteration. we
must have to fix the parameter of convergent accuracy in the iteration. and we
have chosen MD optimization so we also have to define the mixing_beta this
will have the control of volume or XYZ variation.
we force the silicon ions
to move along MD trajectory by applying the pressure. so our unitcell also a
variable parameter. These workflows can be controlled by the following input
parameters.
&IONS
ion_dynamics = 'damp'
/
&CELL
cell_dynamics = 'damp-pr'
#damp-pr
denotes Parrinello-Rahman algorithm of
lagrangian
press_conv_thr = 0.05
/
🔺 Note: we can also
trace the ions on various the temperature by following notations in the input
file.
&ions
ion_temperature='nose'
tempw=4000
fnosep=3.0
Now, we can proceed to the parallel
calculation. Open your command prompt by using Windows key + R →type CMD press
Enter. Then go to your mpi source code directory by the cd command. Then
execute the mpiexec.exe run command. now it will show you the cores, threads
usage command for your PC. I have 4 core processors so its showing mpiexec -n 4.
Then go to your program directory by cd commands.
Now we can execute the mpi parallel
execution run command as mpiexec -n 4 pw.exe < Si.in > Si.out
Wait for a while the program as to run
completely. Then Open your Si.out file using notepad, scroll down and
find the " End final coordinates" this is your optimized atomic
lattice parameter and optimized structure.
We have to copy this ed final coordinates
and paste them in the input file. Now, this input file can be visualize the
crystal structure using the Xcrysden package. Thank you for supporting my
blog.....!!🥰
19 June 2020
Quantum Espresso input file preparation
Dear Beginners,
In this session, I am gonna explain to you the steps to create a simple input file. QE input file must contain six parameters they are ...
- &CONTROL
- &SYSTEM
- &ELECTRONS
- K_POINTS
- ATOMIC_SPECIES
- ATOMIC_POSITIONS
Here the &CONTROL first, we have to
define the calculation such as ' scf ' or ' relax '. Next, we
have to define the pseudopotential file directory by pesudo_dir. In
the example file, we have denoted the pesudo_dir = ' . ' which means that
pseudopotentials are on the same directory of the input file.
input
file
|
In the &SYSTEM, we
have to specify the crystal system. Here I downloaded the crystal information
file from COD http://www.crystallography.net/cod/search.html.
Our CIF file belongs to the cubic system. We have the lattice parameter as
A=B=C= 5.46873Å. So we were given a = 5.46873. Then we have to specify The ecutwfc (Kinetic Energy cutoff for wave function). I have given
define as 25 Ry. ibrav denotes our
bravais lattice index, our crystal system belong to P1(simple cubic). So I
choose 1 here; if it is FCC ibrav=2 similarly for other cases, https://www.quantum-espresso.org/Doc/INPUT_PW.html#idm199 (referred
from).
nat is
the total number of atoms in the unitcell.
ntyp denotes
total types of atoms in the unitcell.
K_POINTS chooses to be
automatic. We have a full symmetric system. It will not work for symmetry broken
structures. ATOMIC_SPECIES must have the atomic mass and
pseudopotential file. ATOMIC_POSITIONS copied from the
CIF file, each position should be named by the atomic label. This is the
simple input file format for quantum espresso. The file has to be saved in the
specified directory as .in format [E-g: Si.in]. Moreover, it should contain the
Pseudopotential file (you can download it from Quantum espresso official site).
let's do the
calculation by the following command
$ pw < Si.in
> Si.out # and press enter
key
▲This will take time to
finish, don't close the command prompt until the process to complete.
Run command
|
File directory ad CMD after the run command
|
Check the Si.out file, it can be accessed
by the help of Notepad.
link for pseudopotentials https://www.quantum-espresso.org/pseudopotentials
link for pseudopotentials https://www.quantum-espresso.org/pseudopotentials
=------------------------------------------------------------------------------=
JOB DONE.
=------------------------------------------------------------------------------=
Subscribe to:
Comments (Atom)





