Simple Calcs Qe Mastani
Simple Calcs Qe Mastani
Simple Calcs Qe Mastani
With
Quantum ESPRESSO
Shobhana Narasimhan
Theoretical Sciences Unit
JNCASR, Bangalore
shobhana@jncasr.ac.in
I. About The Quantum
ESPRESSO
Distribution
2
Shobhana Narasimhan, JNCASR
Quantum ESPRESSO
• www.quantum-espresso.org
3
Shobhana Narasimhan, JNCASR
The Quantum ESPRESSO Software Distribution
P. Giannozzi
4
Shobhana Narasimhan, JNCASR
Why “Quantum ESPRESSO”?!
5
Shobhana Narasimhan, JNCASR
Licence for Quantum ESPRESSO
P. Giannozzi
6
Shobhana Narasimhan, JNCASR
Quantum ESPRESSO: Organization
P. Giannozzi
7
Shobhana Narasimhan, JNCASR
Quantum ESPRESSO as a distribution
P. Giannozzi
8
Shobhana Narasimhan, JNCASR
Quantum ESPRESSO as a distribution
OTHER PACKAGES
WANNIER90: Maximally localized Wannier functions
Pwcond: Ballistic conductance
WanT: Coherent Transport from Maximally Localized
Wannier Functions
Xspectra: Calculation of x-ray near edge absorption
spectra
QE-GIPAW: EPR and NMR Chemical Shifts
GWL: GW Band Structure
TD-DFT: Time-Dependent Density Functional Pert. Theory
9
Shobhana Narasimhan, JNCASR
What Can Quantum ESPRESSO Do?
10
Shobhana Narasimhan, JNCASR
II. Doing a
“Total Energy”
Calculation
with the
PWscf Package of QE:
The SCF Loop
11
Shobhana Narasimhan, JNCASR
The Kohn-Sham problem
1 2
−
2 ∇ + Vnuc (r ) + VH [ n (r )] + V XC [ n (r )]ψ i (r ) = ε iψ i (r )
H
Note that self-consistent solution necessary, as H
depends on solution:
{ψ i } → n(r ) → H
Convention:
e = h = me = 1
12
Shobhana Narasimhan, JNCASR
Self-consistent Iterative Solution
Vnuc known/constructed
How to solve the
Initial guess n(r) Kohn-Sham eqns.
for a set of fixed
Generate Calculate VH[n] & VXC[n]
new nuclear (ionic)
n(r) Veff(r)= Vnuc(r) + VH (r) + VXC (r) positions.
No
Self-consistent?
Yes
Problem solved! Can now calculate energy, forces, etc.
13
Shobhana Narasimhan, JNCASR
Kohn-Sham Equations in a Basis
Size of basis 14
Shobhana Narasimhan, JNCASR
Some possible basis sets
15
Shobhana Narasimhan, JNCASR
Advantages of a Plane Wave Basis
19
Shobhana Narasimhan, JNCASR
Truncating the Plane Wave Expansion
20
Shobhana Narasimhan, JNCASR
Checking Convergence wrt ecutwfc
21
Shobhana Narasimhan, JNCASR
Step 0:
Defining the (periodic) system
Namelist ‘SYSTEM’
+ =
23
Shobhana Narasimhan, JNCASR
How to Specify the Bravais Lattice / Unit Cell
Card: ATOMIC_POSITIONS
- Initial positions of atoms (may vary when “relax” done).
-Can choose to give in units of lattice vectors (“crystal”)
or in Cartesian units (“alat” or “bohr” or “angstrom”)
25
Shobhana Narasimhan, JNCASR
What if the system is not periodic?
Bulk atom
z
x
26
Shobhana Narasimhan, JNCASR
What if the system is not periodic?
28
Shobhana Narasimhan, JNCASR
What if the system is not periodic?
z
29
Shobhana Narasimhan, JNCASR y
What if the system is not periodic?
30
Shobhana Narasimhan, JNCASR
What if the system is not periodic?
31
Shobhana Narasimhan, JNCASR
What if the system is not periodic?
32
Shobhana Narasimhan, JNCASR
What if the system is not periodic?
33
Shobhana Narasimhan, JNCASR
Artificially Periodic Systems ⇒ Large Unit Cells
34
Shobhana Narasimhan, JNCASR
Step 1: Obtaining Vnuc
Vnuc known/constructed
No
Self-consistent?
Yes
Problem solved! Can now calculate energy, forces, etc.
35
Shobhana Narasimhan, JNCASR
Nuclear Potential
Z
Vnuc =−
r
• But this leads to computational problems!
36
Shobhana Narasimhan, JNCASR
Problem for Plane-Wave Basis
37
Shobhana Narasimhan, JNCASR
Solutions for Plane-Wave Basis
39
Shobhana Narasimhan, JNCASR
Pseudopotentials for Quantum Espresso - 1
40
Shobhana Narasimhan, JNCASR
Pseudopotentials for Quantum Espresso - 2
41
Shobhana Narasimhan, JNCASR
Pseudopotentials for Quantum-ESPRESSO
Pseudopotential’s name
gives information about :
• type of exchange-
correlation functional
• type of pseudopotential
• e.g.:
42
Shobhana Narasimhan, JNCASR
Element & Vion for Quantum-ESPRESSO
e.g, for calculation on BaTiO3:
ATOMIC_SPECIES
Ba 137.327 Ba.pbe-nsp-van.UPF
Ti 47.867 Ti.pbe-sp-van_ak.UPF
O 15.999 O.pbe-van_ak.UPF
oops!
input
output
44
Shobhana Narasimhan, JNCASR
Step 2: Initial Guess for n(r)
Vion known/constructed
No
Self-consistent?
Yes
Problem solved! Can now calculate energy, forces, etc.
45
Shobhana Narasimhan, JNCASR
Starting Wavefunctions
The closer your starting wavefunction is to the true
wavefunction (which, of course, is something you don’t
necessarily know to start with!), the fewer the scf iterations
needed.
startingwfc ‘atomic’ Superposn of atomic orbitals
‘atomic+random’
‘random’
‘file’
46
Shobhana Narasimhan, JNCASR
Steps 3 & 4: Effective Potential
Vion known/constructed
No
Self-consistent?
Yes
Problem solved! Can now calculate energy, forces, etc.
47
Shobhana Narasimhan, JNCASR
Exchange-Correlation Potential
Vion known/constructed
No
Self-consistent?
Yes
Problem solved! Can now calculate energy, forces, etc.
49
Shobhana Narasimhan, JNCASR
Diagonalization
• Need to diagonalize a matrix of size NPW × NPW
• NPW >> Nb = number of bands required = Ne/2 or a
little more (for metals).
• OK to obtain lowest few eigenvalues.
• Exact diagonalization is expensive!
• Use iterative diagonalizers that recast
diagonalization as a minimization problem.
Input parameter diagonalization
-which algorithm used for iterative diagonalization
Input parameter nbnd
Vion known/constructed
No
Self-consistent?
Yes
Problem solved! Can now calculate energy, forces, etc.
51
Shobhana Narasimhan, JNCASR
Brillouin Zone Sums
0
ε εF 1
P =
Nk
∑ P(k)w
k∈BZ
k
b1 shift
nk1=nk2=4
53
Shobhana Narasimhan, JNCASR
Convergence wrt BZ sampling
Madhura Marathe
Vion known/constructed
No
Self-consistent?
Yes
Problem solved! Can now calculate energy, forces, etc.
55
Shobhana Narasimhan, JNCASR
Testing for scf convergence
• Compare nth and (n-1)th approximations for
density, and see if they are close enough that self-
consistency has been achieved.
56
Shobhana Narasimhan, JNCASR
Step 8: Mixing
Can take a long
Vion known/constructed
time to reach
self-consistency! Initial guess n(r) or ψi(r)
Generate Calculate VH[n] & VXC[n]
new
n(r) Veff(r)= Vnuc(r) + VH (r) + VXC (r)
No
Self-consistent?
Yes
Problem solved! Can now calculate energy, forces, etc.
57
Shobhana Narasimhan, JNCASR
Mixing
59
Shobhana Narasimhan, JNCASR
Output Quantities: Total Energy
61
Shobhana Narasimhan, JNCASR
PWscf input file
62
Shobhana Narasimhan, JNCASR
PWscf NAMELISTs in Input File
63
Shobhana Narasimhan, JNCASR
PWscf CARDs in Input File
64
Shobhana Narasimhan, JNCASR
Other Features / Types of Calculations
0
65
Shobhana Narasimhan, JNCASR
The End!
Have fun with Quantum-ESPRESSO!
66