Sei sulla pagina 1di 22

DFT with plane waves,

pseudopotentials
Tutoriel CPMD/CP2K
Paris, 6–9 avril 2010

François-Xavier Coudert
Basis sets
In quantum chemistry, the base objects are the wavefunctions:

... which we represent as linear combinations of basis functions:

This family has to be finite, limited in size


It maps a continuous problem to linear algebra:
✓ Wavefunctions are vectors
✓ Operators are matrices

The basis set should allow enough flexibility to represent


the “real” wavefunctions
Atomic basis sets
Also called “localized basis sets”:
centered on nuclei (or sometimes ghost atoms)
Slater-types or Gaussian functions
Matches the “linear combination of atomic orbitals” ansatz;
also include “polarization” and “diffuse” orbitals

Thus, choices are:


✓ Function type
✓ Number of orbitals per atom
✓ Including polarisation/diffuse orbitals (and how many)?
Atomic basis sets — Pros and cons
★ Correspond to chemical picture
★ Describe well the atoms, even with few orbitals
★ No so much harder to describe inner electrons

★ Easily tunable
★ No implicit periodicity

★ Non-orthogonal
★ Depend on atomic positions
★ Basis set superposition error
★ So many parameters... how do you optimize?
α

1 iG 1 iG
" α ·"
r
ition Plane-waves basis sets
ϕα ("r ) = √ e

" α ·"
r ϕα ("r ) = √ e
Ω (1)

of plane
Wewaves:
chooseThe
(Ωthewavefunctions
is the
basis volume are
of
functions as expanded
the box)
plane as
waves:
e wavefunctions are expanded as
1 iG " α ·"
r
1 !
" " r
iG·"
ϕα ("r ) = √ e √1 ! ("rr) = √
φiiG·"
" ci (G(1)
)e
φi ("r )Ω= "
ci (G )e Ω " (2)
Ω G
"
G

tions areG expanded


is a vector asan
Forof the reciprocal lattice.
orthorhombic box with lengths Lx , Ly and Lz , the wave
an orthorhombic box
" arewith lengths
For an orthorhombic
G unit Lx , Ly and Lz , the wavevectors
cell:
re 1 !
" " " r2π
iG·" 2π 2π
= √
φi ("r )2π c
2πi ( GG)e=i· · "x + j · · "y + k · (2)
· "z ; with i, j, k ∈ Z
" Ω L2π
x Ly Lz
G=i· · "x + jG
"· · "
y + k · · "
z ; with i, j, k ∈ Z
Lx Ly Lz
2
hombic box with lengths Lx , Ly2 and Lz , the wavevectors
Infinite sum would be the Fourier series of the wavefunction
2π 2π 2π
=i· · "x + j · · "y + k · · "z ; with i, j, k ∈ Z
Lx How many Ly basis functions
Lz do we have?
Ruled by one parameter, Gmax
2
Plane-waves sets — Pros and cons
★ Orthogonal
★ Independent of atomic positions (no Pulay forces)
★ Improving is easy: increase the cutoff
★ Easy to use on any atomic type (no basis set optimization)
★ Use of Fast Fourier Transform

★ Implicit periodicity
★ All-or-nothing description (no spot favored)

★ Large number of basis functions needed


★ How do you get back chemical information?
★ Inner wavefunctions vary too rapidly:
Pseudopotentials are needed
.$/&%*1/2%4
.$/&%*1/2%4
:'.1,-#.0$!$0))1.'5
1.2 Plane-waves basis
Size of the basis set sets
"#$%&'!#(!)*'!+,*'-'!.#/)01/1/2!0$$!345
!!-$ " !&- # ""&-" " # !" "
:'.1,-#.0$!$0))1.'5 ! "#$%&%! ' ()*
Number ofThe plane
sizewaves
of the used:
basis described
set is " by an energy
"#$%&'!#(!)*'!+,*'-'!.#/)01/1/2!0$$
determined cutoff of the kin
by a cut-off
"#$%&'!#(!#..%,1'6!78!9!+1/2$'!345
!!- " &- " &- " energy associated to ϕG ("
r ) = √ 1 iG·!
e
! r
! " "
1.2 $Size ! of # "
the basis " #
set kinetic !
energy
! +, !
## "$
associated
Ω "
with ! "#$%&%!
each plane wave ' ()*
1 2
%
1 " 2
"
The size of the basis set is determined by a − cut-off "#$%&'!#(!#..%,1'6!78!9!+1/2$'!34
∇ ϕof G! ("
rthe) =kinetic
#G# ϕG ! ("
r)
!
energy associated to ϕ ("r ) = √1 eiG·!r
2 2
!
"%&'(&)*+,-*(&*.$/&%01/2%*3/4(4
G !Ω "
1 " 2 ## "$
cut+, !
Ekin'= #G# < E!
#

/&%*1/2%4 1 2
− ∇ ϕG
2
! ("
1 " 2
r ) = #G# ϕG
2
r) !
!.("
/01233
#
2
()*
%
1 " 2
'.1,-#.0$!$0))1.'5 Ekin #G# < Ecut4 '% ." (#
= "#$%&'!#(!)*'!+,*'-'!.#/)01/1/2!0$$!345
3
2 ' (2π)
/01233 4 3 4 3 32
!-$ " !&- # ""&-" " # ! " Ω" NP W $ πGmax = 2 2 Ec
!2!"#$%&%! ' ()* 3 3
,5*367&%2/$ "
*****89(":6/;*<=>?=>?@ #
(2π)
3
4
L 4
"#$%&'!#(!#..%,1'6!78!9!+1/2$'!345
NP W $ πG3max = 2 2 Ecut
3 3
1 22
3
3 1'
()* 3

!
2

Ω 3 N3P"W $
## "$ 2π
ΩE .
2
2 3/01233cut

2π 2
ΩEc
2

2!
L ! !
3 #
NP W
1 2
$ 2
+,32
%1 3
ΩEcut ≈ 2 ΩEcut
2 2

2π 3 2π
" (#
4 ' '% . /01233
# 6
' ()*
Plane-waves basis sets
Example of convergence

silicon bulk

Courtesy F. Bruneval
GEOMETRY contains coordinates and velocities/forces in atomic units.

4.2 Choosing the Plane Wave Cutoff


Plane-waves basis sets
After getting familiar with the input and output of CPMD, we now have to run a test on the va-
lidity of the pseudopotential and its cutoff requirements for the subsequent calculations (geometry
optimization and molecular dynamics). For that purpose we make a copy of the input file from
the wavefunction optimization and add the keyword PRINT FORCES ON to the &CPMD
Example of convergence
section and then re-run the wavefunction optimization for a series of wavefunction cutoff values
ranging from 10ryd up to 200-500ryd (depending on the available memory. Take note of the values
of total energy, and force for each cutoff value. Since the convergence behavior can be different
for each pseudopotential (and each property), we exchange the pseudopotential file as well using
H BHS LDA.psp as replacement. When plotting the relative errors from those calculations, we get
a graph similar to the following: dihydrogen molecule
50
+ Force MT �
Force BHS +
� + Bond Energy MT
40 Bond Energy BHS

+
30

Error in %
20

+
10 �
+ + + +
� +
� � � � +
0 � +
� +
� +
� +
� +� +� +�
20 30 50 70 100 150 250 400
Cutoff in Ryd
Energy and forces have a the same convergence trend, but for the forces we have a not as regular
behavior in the relative error. Next we see that for both pseudopotentials, the relative error in the
force reaches some kind of plateau starting at 50ryd, with the Martins-Troullier (MT) potential
behaving a bit better than the BHS-type pseudopotential parameters. For problems requiring even
more accurate forces, a choice of 100-120ryd would be better. Please note, however, that these
errors only document the convergence behavior of the pseudopotential with respect to the basis Courtesy F. Bruneval
set size (= cutoff), they do not include systematic error contributions, e.g. the error from using
DFT altogether in or from the choice of pseudization cutoff radius (which can be chose to make
k-point sampling
minder: Block theorem for periodic systems
Bloch’s theorem:
eigenstates in a system under a periodic potential U(r) can be written as

i!
φi ("r; k) = e k·!r ui ("r; "k)
"

Operators such as the ; "k) = ui ("r +are


ui ("rHaminltonian " "k)
L;
block-diagonal by k-point

oint approximation: "k = "0 is the only point considered in the Brill
zone waves and correlation lengths longer than
Important to describe
he Γ point:
unit cell: solids (esp. conductors / semi-conductors)

" 1 !
" ! r
iG·!
φi ("r; Γ) =before:
What we described ui ("r; k)
only √ Γ point
= the ci (isGsampled
)e (k = 0)
Ω !
Use supercell to compensate for this G
of a supercell method to compensate Γ-point approximation
k-point sampling
Example for silicon bulk
Example: silicon
Si8 : Si64 :

Point Γ: ESi = 3.90 A.U. Point Γ: ESi = 3.943 A.U.


4 points k : ESi = 3.948 A.U. 4 points k : ESi = 3.947 A.U.
32 points k : ESi = 3.951 A.U.

5
Fourier!"#$%"%&'(&)*+,-*(&*.$/&%01/2%*3/4(4
transforms !

We use an auxiliary grid in .1*"/A%4*$(B%*%/4(%6*'C/&A4


real space for some calculations

Discrete Fourier Transform: ! !! "#$ %! !" ""# " ! !


"

%! !""# " ' $ ! "(# " ! ! ! !! "


&&
"
# $
% ! ! )&
"
(# " ! !
! !! # "
#
+"#$%&'&!,
#

.'!"#!&/*$'!*#!0(+1!*#!!!!2!!6
Moving from a grid in real space: x = {0, 1, ..., N} * L/N
to a grid in reciprocal space: G =34"#!-&*+#!'4*'
{–N/2+1, ..., N/2} * 2π/L
%! !""#&'(
Transform is inversible if both have the same * &'( * %! !""of++ points.
(" number

If N is a product of small prime34&!,*#'!5&%#"(+!(,!673!"#!'4&!,*-()#!,/4'*,-


numbers, use FFT (N log N)
8"'4!#$*0&#!*#!9:!!!0(1!!!;!"+#'&*<!(,!! > =

instead of DFT (N2)


34"#!&+,(%$&#!'4&!)#&!(,!%&1)0*%!1%"<!"+!%&*0!#?*$&>
Fourier transforms
!"#$%"%&'(&)*+,-*(&*.$/&%01/2%*3/4(4
!"#$%"%&'(&)*+,-*(&*.$/&%01/2%*3/4(4 !
!

!$$74'6/'(9&*9A*'B%*74%*,,-4
!$$74'6/'(9&*9A*'B%*74%*,,-4
Example of the use of Fourier transforms:
%!# & "
calculating "#!$##%!&'!()*(+*)&#!&,#!-).&.##!/'&#$&0)*1
the Hartree potential # $ !# "# $ % # & %!# & "
"#!$##%!&'!()*(+*)&#!&,#!-).&.##!/'&#$&0)*1
,,-
$
# $ !# "# % # & &# '# &&
&# '# &&
! ! " !"" '!" ! # "
,,-
! ! " !"" '!" ! # " % !# "#
!
)
( ! !"
&' ! " ! # "&"
,,-
%( !"" %% !# "
!# "#
!
) &' !" ! # "&"
(
! !"
%( !" " ,,-
%( !""
#($ !""## *
&"&
"
% !# "
,,-
#($ !""## *
%( !" " #($ ! "" #$!#"
&"&"
,,-
#($ ! "" #$!#"
,5*367&%2/$ *****89(":6/;*<=>?=>?@

,5*367&%2/$ *****89(":6/;*<=>?=>?@
! #"
! " !" # $%&'((
Avoiding PBC?
:&(++!*'-.*+!.$3!'+,6'9!
%(3-'9!-&5;
How to describe an isolated system
with a plane-waves basis set?

"
Replicate the box, leave lots of space
104 User’s Gui

Or truncate the Coulombic interaction


s potential is also periodic and corresponds to the
3 36
using a nearest-neighbor convention
est-neighbour convention ,5*367&%2/$ 8A
10 A
15 A
*****8

Energy [ kcal / mol ]


20 A
25 A

CPU time [ h ]
2 24
a positive charge at x = 0.3, periodically replicated (L = 2) in 1D:

1 12

0 0
-1 -0,5 0 0,5 1
Reaction Coordinate
0 (a) Rcut = 25 Ry, Symm. = 1
-4 -2 0 2 4

Figure 7: Potential energy profile along reaction


7(b) with different box size. The noise in vacuu
nearest-image convention can be used for describing an isolated
box with small cutoff. Functional: BLYP, pseud
Pseudopotentials
Length scales of the core and valence electron orbitals:

bonding region bonding region

Rapidly varying functions (core states) require high PW cutoff


Goal of cutoff is to “smooth things at the core”
Pseudopotentials
Core electrons do not participate in bonding, excitations, conductivity
Do not treat the coreAtom with nuclear
electrons explicitlycharge any more Z:
energies
Instead of the nuclei Coulombic of one-aprticle
potential, states
use a coreEigenvalues/energies
“nuclear + core of electrons”
the one-particle potential,
levels [ in a.u. ~ 27 eV ]

Valence electrons will “feel”E nthis


Deep core qualitatively: !"Z pseudopotential
2 2
#$2 n %, n is the principal q. number
Valence different, strongly modified by e-e interactions ~ a few eVs

One-particle
C (Z=6)eigenvalues for carbon C (Z=6) and
Cu copper
(Z=29)Cu (Z=29)
2p E_1s= - 0.5 Valence 4s E_4s = - 0.2
2s E_2s= - 0.7 3d E_3d = - 0.5
1s E_1s= - 11.0 3p E_3p = - 3.5
3s E_3s = - 5.0
Core 2p E_2p = -35.
2s E_2s = - 41.
1s E_1s = - 392.

Note: different energy scales


One-electron in core vs.
eigenstates valence(in a.u.)
energies
!"# $ %&'()* %+,- %"./0 "
Pseudopotentials
Pseudopotentials are nonlocal operators, i.e. they are not simple
functions Vps(r)
Because they represent core states,
Dictionary they have s, p, d... components
and notations
(we says “channels”: they represent how they act on each symmetry-
adapated projection of the valence electrons)
In condensed matter physics: pseudopotentials or PPs
In quantum chemistry : effective core potentials or ECPs
l max

V ps&ion '( v l !r " ( #lm$ %lm#'( )v l !r "&v loc * ( #lm$ %lm#+v loc !r "
l m l'0 m

v l !r " - radial pseudopotential function for a given l-symmetry channel


v loc !r " - outside the core will be just - Z_eff/r = - (Z-Z_core)/r

#lm$ %lm# projection operator onto a given |lm> state -> nonlocal!!!

l max - number of different occupied channels -> number of nonlocal


projection operators
Pseudopotentials
The valence states will thus be different around r = 0
Beyond a certain radius (rcore), valence states should be identical to all-
electron results Pseudopotentials

Schematically

Ersen Mete DFT in practice : Part II


Pseudopotentials
The valence states will thus be different around r = 0
Beyond a certain radius (rcore), valence states should be identical to all-
electron results
Example of PPs for C atom (Lester et al, JC
2003)
One-particle construction of PP:
norm-conservation
- beyond certain r_core the atom and each valence state should look
exactly like if the core electrons were present
- one-particle properties have to be conserved: charge outside
r_core has to be the same as pseudo-charge
2s state 2p (both similar)
(pseudo orbital is nodeless:
becomes the ground state)
R#$r 1 , r 2 ,..., r N %

- optimize any variational parameters !c klm " ,


eg, minimize the energy or local energy variance (Umrigar et al,'88)

r_core !"# $ %&'()* %+,- %"./0 " !"# $ %&'()* %+,- %"
Pseudopotentials — Pros and cons
★ Smaller energy, smaller cutoff
★ Smaller number of electrons/wavefunctions to calculate
(think lanthanides)
★ Can include scalar relativistic effects
(think lanthanides again)
★ Can be extended to include spin-orbit interactions (heavy nuclei)

★ For atomic basis sets: use basis set optimized together with PP

★ If your core is too fat, you describe your system badly


(polarization, core relaxation)
★ Choice of core radius
★ Core–valence overlap might become larger, e.g. at high pressure
★ Cost of Ylm projection operators (evaluated in real space)
Pseudopotentials — accuracy
Comparison efficiency/accuracy for Fe atom
Example: how do you choose a good core for an Fe atom?
Fe atom -> [Ne] 3s^23p^63d^64s^2= [Ar] 3d^64s^2

all-electron [Ne]-core [Ar]-core

E_HF [au] -1262.444 -123.114 -21.387

E_VMC[au] -1263.20(2) -123.708(2) -21.660(1)


2
! VMC [au] ~ 50 1.5 0.16
1
efficiency = 2
0.02 2.1 125
! T decorr
valence errors 0 < 0.1 eV ~ 0.5 eV !!!

Ne-core PPs represent the best compromise for QMC: high accuracy, Courtesy L. Mitas, NCSU
acceptable efficiency
!"# $ %&'()* %+,- %"./0 "

Another example: Na = [He] 2s2 2p6 3s1 ; and not Na = [Ne] 3s1
Pseudopotentials: summary
There are many families of pseudopotentials:
✓ norm-conserving (conservative choice)
✓ ultrasoft (lower energy cutoff)

Keep in mind:
✓ pseudopotentials are technical, difficult topics
✓ only an auxiliary concept

But...
✓ they save a lot of CPU time
✓ allow calculations otherwise impossible

They can mess up your calculation for good...


(but all might still look unsuspicious)

Potrebbero piacerti anche