Professional Documents
Culture Documents
VASP Lecture Basics
VASP Lecture Basics
University of Vienna,
Faculty of Physics and Center for Computational Materials Science,
Vienna, Austria
Outline
● Density functional theory
● Translational invariance and periodic boundary conditions
● Plane wave basis set
● The Projector-Augmented-Wave method
● Electronic minimization
The Many-Body Schrödinger equation
Ĥ (r1 , ..., rN ) = E (r1 , ..., rN )
0 1
X X X
@ 1 i+ V (ri ) +
1 A (r1 , ..., rN ) = E (r1 , ..., rN )
2 i i
|ri rj |
i6=j
BUT:
Exc [⇢] =??? Vxc [⇢](r) =???
Exchange-Correlation
Exc [⇢] =??? Vxc [⇢](r) =???
N
(#grid points) N ⇥ (#grid points)
Nice for atoms and molecules, but in a realistic piece of solid state material N= O(1023)!
Translational invariance:
Periodic Boundary Conditions
Translational invariance implies:
ikR
nk (r + R) = nk (r)e
and
nk (r) = unk (r)eikr
All states are labeled by Bloch vector k and the band index n:
• The Bloch vector k is usually constrained to lie within the first Brillouin zone
of the reciprocal space lattice.
• The band index n is of the order if the number of electrons per unit cell.
Reciprocal space & the first Brillouin zone
z
L 4pi/L z z
b2 b1 b1
b2
a2
a1 y y
a3 x x
y
x
b3 b3
A B C
2⇡ 2⇡ 2⇡
b1 = a2 ⇥ a3 b2 = a3 ⇥ a1 b3 = a1 ⇥ a2
⌦ ⌦ ⌦
⌦ = a1 · a2 ⇥ a3 ai · bj = 2⇡ ij
Sampling the 1st BZ
The evaluation of many key quantities involves an integral over the 1st BZ.
For instance the charge density:
Z
1 X 2
⇢(r) = fnk | nk (r)| dk
⌦BZ n BZ
We exploit the fact that the orbitals at Bloch vectors k that are close together are
almost identical and approximate the integral over the 1st BZ by a weighted sum
over a discrete set of k-points:
X
2
⇢(r) = wk fnk | nk (r)| dk,
nk
Fazit: the intractable task of determining (r1 , ..., rN ) with N=1023, has been
reduced to calculating nk (r) at a discrete set of k-points in the 1st BZ, for a
number of bands that is of the order if the number of electrons in the unit cell.
Idea: equally spaced mesh in the 1st Brillouin zone
Common meshes: Two different choices for the center of the mesh.
• Centered on Γ
• Centered around Γ (can break the symmetry!)
before after shifted to
symmetrization
! !
• In certain cell geometries (e.g. hexagonal cells) even meshes break the symmetry.
E[⇢, {R, Z}] = Ts [{ nk [⇢]}] + EH [⇢, {R, Z}] + Exc [⇢] + U ({R, Z})
1
|G + k|2 < Ecuto↵
2
G
cut
τ
2
b2
0 1 2 3 N−1 0 5 −4 −3 −2 −1 0 1 2 3 4 5
τ b1
1 −N/2+1 N/2
x =n /N τ g = n 2π / τ
1 1 1 1 1 1
X FFT 1 X
iGr iGr
Crnk = CGnk e ! CGnk = Crnk e
NFFT r
G
FFT
real space reciprocal space
G
cut
τ
2
b2
0 1 2 3 N−1 0 5 −4 −3 −2 −1 0 1 2 3 4 5
τ b1
1 −N/2+1 N/2
x =n /N τ g = n 2π / τ
1 1 1 1 1 1
X FFT 1 X
iGr iGr
Crnk = CGnk e ! CGnk = Crnk e
NFFT r
G
X FFT 1 X
iGr iGr
Crnk = CGnk e ! CGnk = Crnk e
NFFT r
G
FFT
real space reciprocal space
G
cut
τ
2
b2
0 1 2 3 N−1 0 5 −4 −3 −2 −1 0 1 2 3 4 5
τ b1
1 −N/2+1 N/2
x =n /N τ g = n 2π / τ
1 1 1 1 1 1
X FFT 1 X
iGr iGr
Crnk = CGnk e ! CGnk = Crnk e
NFFT r
G
The charge density
Gcut
FFT
ψ ψ ψ
G 2G r r
cut
FFT
ρ ρ
G r
The action of the Hamiltonian
The action H| nk i
✓ ◆
1
+ V (r) nk (r)
2
Using the convention
1 i(G+k)r
hr|G + ki = 1/2
e ! hG + k| nk i = CGnk
⌦
• Kinetic energy:
1 1
hG + k| | nk i = |G + k|2 CGnk NNPLW
2 2
• Local potential: V = VH [⇢] + Vxc [⇢] + Vext
• Exchange-correlation: easily obtained in real space Vxc,r = Vxc [⇢r ]
• FFT to reciprocal space {Vxc,r } ! {Vxc,G }
4⇡
• Hartree potential: solve Poisson eq. in reciprocal space VH,G = ⇢G
|G|2
• Add all contributions VG = VH,G + Vxc,G + Vext,G
• FFT to real space {VG } ! {Vr }
The action
1 X
iGr
hG + k|V | nk i = Vr Crnk e NFFT log NFFT
NFFT r
The action of the local potential
2Gcut
4π e2 FFT
G2
ρ V V ψ
G G r r
G cut 3Gcut
add FFT
ψ R R (residual vector)
G G r
The Projector-Augmented-Wave method
The number of plane waves needed to describe
• tightly bound (spatially strongly localized) states,
• and rapid oscillations (nodal features) of the orbitals near the nucleus
exceeds any practical limit, except maybe for Li and H.
~
Ψ
Ψ rc
~
V
V
Pseudopotentials: cont.
2.5
2.0
wave-function
1.5 s : E= -0.576 R c=1.9
1.0
0.5 p : E= -0.205 R c=1.9
Al Al
0.0
0 1 2 3 4
R (a.u.)
X X
| en i | en i | ei ihe
pi | en i | en i | ei ihe
pi | ˜n i
i iX
+ | i ihepi | en i
i
PW PS-LCAO AE-LCAO
= - +
• The all-electron partial waves are solutions to the radial scalar relativistic
non-spinpolarized Schrödinger equation:
1
( + ve↵ )| i i = ✏i | i i
2
• A pseudization procedure yields:
| i i ! | ei i ve↵ ! vee↵ pi | ej i =
he ij
The PAW orbitals (cont.)
• The pseudo partial waves obey:
⇣ 1 X ⌘ ⇣ X ⌘
+ vee↵ + |e pj | | ek i = ✏k 1 +
pi iDij he |e pj | | ek i
pi iQij he
2 ij ij
Qij = h i | ji h ei | ej i
@ el (r, ✏) 1 @ l (r, ✏) 1
⇡
@r el (r, ✏) @r l (r, ✏) r=rc
r=rc
• 1st s-channel in Mn: ε1
4s “bound” state
X
vee↵ [e
⇢v ] = vH [e
⇢v ] + vH [e ⇢v + ⇢ec ]
⇢Zc ] + vxc [e ⇢ev (r) = ai | ei (r)|2
i
The PAW orbitals (cont.)
X X
| ni | en i | ˜lm✏ iclm✏ + | lm✏ iclm✏
PW PS-LCAO AE-LCAO
= - +
Ekin = Ẽ Ẽ 1 + E 1
X 1 ˜ XX 1 ˜ XX 1
fn h ˜n | | ni ⇢ij h ˜i | | ji + ⇢ij h i | | ji
n
2 2 2
site (i,j) site (i,j)
| {z } | {z } | {z }
Ẽ Ẽ 1 E1
Where X
⇢ij = fn h ˜n |p̃i ihp̃j | ˜n i
n
For instance the PS operator associated with the density operator ( |rihr|)
X ⇣ ⌘
|rihr| + |p̃i i h i |rihr| ji
˜ ˜
h i |rihr| j i hp̃j |
ij
= - +
• This way the Hartree energy (a non-local operator!) decomposes in the same
manner as a (semi)-local operator:
1 1
EH = ẼH ẼH + EH
The PAW total energy
The same three-way decomposition holds for the total energy
E = Ẽ Ẽ 1 + E 1
where
X 1 ˜
Ẽ = fn h ˜n | | n i + Exc [˜⇢ + ⇢ˆ + ⇢˜c ]+
n
2
Z
EH [˜⇢ + ⇢ˆ] + vH [˜ ⇢(r) + ⇢ˆ(r)) d3 r + U (R, Zion )
⇢Zc ] (˜
X⇢X 1 ˜
Ẽ 1 = ⇢ij h ˜i | | j i + Exc [˜⇢1 + ⇢ˆ + ⇢˜c ]+
2
sites (i,j)
Z
EH [˜⇢1 + ⇢ˆ] + vH [˜⇢Zc ] ⇢˜1 (r) + ⇢ˆ(r) d3 r
⌦r
X X ⇢
1 1
E = ⇢ij h i | | j i + Exc [⇢1 + ⇢c ]+
2
sites (i,j)
Z
EH [⇢1 ] + vH [⇢Zc ]⇢1 (r) d3 r
⌦r
The PAW total energy (cont.)
• Ẽ is evaluated on a regular grid:
The Kohn-Sham functional evaluated in a plane wave basis set
with additional compensation charge to account for the incorrect norm
of the PS-orbitals and to correctly describe long-range electrostatics
X
⇢e = fn en en⇤ PS charge density
n
⇢ˆ Compensation charges
where
1 1
Dij = h i | 1
+ ve↵ [⇢1v ]| ji h ei | 1
+ vee↵ ⇢1v ]| ej i
[e
2 2
Qij = h i | ji h ei | ej i
and
X X
⇢e1v (r) = ⇢ij h ei |rihr| ej i ⇢1v (r) = ⇢ij h i |rihr| ji
ij ij
with X
⇢ij = fn h en |e pj | en i
pi ihe
n
log 10 E-E 0
-4 direct Car−Parrinello
Car−Parrinello -4
-6 -6 n=1
n=1,2,4,8 n=1 n=8
L -8 -8
n=8
1 self.consistent 1 self.consistent
0 0
|
log 10 |F-F 0 |
0
-1 -1
log 10 |F-F
-2 -2
n=1
-3 -3
-4 -4
0 5 10 15 20 0 10 20 30 40
iteration forces iteration
Direct minimization and charge sloshing
The gradient of the total energy with respect to an orbital is given by:
⇣ X ⌘ X1
|gn i = fn 1 | m ih m | Ĥ| ni + Hnm (fn fm )| mi
m m
2
where
Hnm = h m |Ĥ| n i
E unoccupied charge
k)r k)r
n = ei(kF m = ei(kF + potential
This leads to a long-wavelength change in the density and a very strong change
in the electrostatic potential (charge sloshing):
i2 k·r 2 s 4⇡e2 i2 k·r
⇢(r) = 2 sRe e VH (r) = Re e
|2 k|2
Stable step size Δs (for a simulation box with largest dimension L):
| k| / 1/L VH / L 2 s / 1/L2
The Self-Consistency-Cycle (cont.)
Two sub-problems:
• Optimization of { n }
Iterative Diagonalization
e.g. RMM-DIIS or
Blocked Davidson
• Construction of ⇢in
Density Mixing
e.g. Broyden mixer
The self-Consistency-Cycle
A naïve algorithm: express the Hamilton matrix in a plane wave basis and
diagonalize it:
H = hG|Ĥ[⇢]|G0 i ! diagonalize H ! { i , ✏i } i = 1, .., NFFT
Self-consistency-cycle:
⇢0 ! H0 ! ⇢0 ! ⇢1 = f (⇢0 , ⇢0 ) ! H1 ! ...
Iterate until: ⇢ = ⇢0
BUT: we do not need NFFT eigenvectors of the Hamiltonian (at a cost of O(NFFT3)).
Actually we only the Nb lowest eigenstates of H, where Nb is of the order
of the number of electrons per unit cell (Nb << NFFT).
X
yields Nb eigenvectors | ¯k i = Bmk | m i with eigenvalues εapp.
m
• The Residual:
h n |Ĥ| n i
|R( n )i = (Ĥ ✏app Ŝ)| ni ✏app =
h n |Ŝ| n i
1 1 2 2
{ k /gk /gk = K(H ✏app S) k |k = 1, .., n1 }
• Rayleigh-Ritz optimization ) { 3
k |k = 1, .., n1 }
• Etc …
• The optimized set replaces the original subset:
m
{ k |k = 1, .., n1 } { n |n = 1, .., n1 }
1 q 2 AMIX
J ⇡ G1q = max( 2 , AMIN)
q + BMIX
Thank you!