the quantum monte carlo technique: theory and …...2009/06/25  · hydrides formation kinetics...

26
The quantum Monte Carlo technique: theory and applications Department of Earth Sciences & Department of Physics and Astronomy, Thomas Young Centre@UCL & London Centre for Nanotechnology University College London Dario ALFÈ Outline Examples of density functional theory inaccuracies. Introduction to quantum Monte Carlo (QMC). The Variational Monte Carlo (VMC) method. The Diffusion Monte Carlo (DMC) method. Pseudopotentials in DMC, locality approximation and beyond. The fixed node approximation. Examples of QMC accuracy (un)-improvements over DFT. Cost of QMC and role of parallel computers.

Upload: others

Post on 08-Jul-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

The quantum Monte Carlo technique: theory and applications

Department of Earth Sciences & Department of Physics and Astronomy,

Thomas Young Centre@UCL & London Centre for Nanotechnology

University College London

Dario ALFÈ

Outline

• Examples of density functional theory inaccuracies.

• Introduction to quantum Monte Carlo (QMC).– The Variational Monte Carlo (VMC) method.

– The Diffusion Monte Carlo (DMC) method.• Pseudopotentials in DMC, locality approximation and beyond.

• The fixed node approximation.

• Examples of QMC accuracy (un)-improvements over DFT.

• Cost of QMC and role of parallel computers.

Moll et al, PRB 52, 2550, (1995)

Si diamond ß-Sn: Density Functional Theory results

Water-Benzene binding curve

QuickTime™ and a decompressor

are needed to see this picture.

Water-graphene binding curve

Hydrides

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

• Exp: Mg + H2 = MgH2 + 0.79(1) eV• DFT-PBE: 0.47• DFT-PW91: 0.57• DFT-LDA: 0.82 • DFT-RPBE: 0.29

Target: 0.15 - 0.45 eV(decomposition temperature20-100 C)

Hydrides formation kinetics

Quantum Monte Carlo methods

B. L. Hammond, W. Lester, Jr., P. J. Reynolds, “Monte Carlo Methods in Ab Initio Quantum Chemistry”, World Scientific Lecture Course Notes in Chemistry, Vol. 1 (1994).

W. M. C. Foulkes, L. Mitas, R. J. Needs and G. Rajagopal, “Quantum Monte Carlo Simulations of Solids”, Review of Modern Physics, 73, 33 (2001).

CASINO code: R. J. Needs, M. D. Towler, N. D. Drummond, P. Lopez-Rios, CASINO user manual, version 2.0, University of Cambridge, 2006

Satistical foundations, the central limit theorem

R = (r

1,r

2,K ,r

n); ℘(R) ≥ 0; dR℘(R)=1 ∫

{Rm;m = 1, M}

Zf=

f (R1) + f (R

2) +L + f (R

M)

M

μ

f= dR℘(R)f (R); ∫ σ

f2 = dR℘(R)[f (R) − μ

f]2 ∫

Z

f normally distributed with mean μ

f and standard deviation σ

fM

Evaluation of definite integrals

I = d ( ) g∫ R R

℘(R) ≥ 0; dR℘(R)=1 ∫I = d ( ) ( ); ( )= ( )/ ( ) f f g℘ ℘∫ R R R R R R

I = lim

M→∞

1

Mf (R

m)

m=1

M

∑⎧⎨⎩

⎫⎬⎭≈

1

Mf (R

m)

m=1

M

σ

I2 =

σf2

M ≈

1

M ( M −1)( f (R

m) − I)2

m=1

M

Generating a sequence Rmdistributed according to P: the Metropolis algorithm

1. Start the walker at random position R

2. Make a trial move to R’

3. Accept the move with probability

4. Goto 2 and repeat

A(R '← R) = Min 1,℘(R ')

℘(R)

⎛⎝⎜

⎞⎠⎟

Satisfies detailed balance (flux from R to R’ equal to flux from R’ to R)

Variational Monte Carlo

*

0*

ˆ( ) ( )

( ) ( )

T T

V

T T

H dE E

d

Ψ Ψ= ≥

Ψ Ψ∫∫

R R R

R R R

EV=

ΨT(R)

T(R)−1 öHΨ

T(R)⎡⎣ ⎤⎦∫ dR

ΨT(R)

2

∫ dR

℘(R) = Ψ

T(R)

T(R)

2dR∫

E

V≈

1

ME

L(R

m)

m=1

M

∑ ; EL(R

m) = Ψ

T(R

m)−1 öHΨ

T(R

m)

Green function

−∂ φ(τ )

∂τ= öH − E

T( )φ(τ )

Schrödinger equation in imaginary time:

Formal solution is:

φ(τ ) = e

− öH−ET( )τ φ(0)

Insert complete set and multiply by : R

φ(R,τ ) = R∫ e

− öH−ET( )τ R ' φ(R ',0)dR '

Green function (2)

φ(R,τ ) = G R,R ',τ( )∫ φ(R ',0)dR '

G R,R ',τ( )= R e− öH−ET( )τ R '

Convergence of φ for τ → ∞ ? Insert complete set of eigenstates of H:

G R,R ',τ( )= e

− Ei −ET( )τφi(R)φ

i(R ')

i=0

Expand φ in eingenstates of H:

φ(R ',0) = c

k(R ')

k=0

Green function (3)

φ(R,τ ) = G R,R ',τ( )∫ φ(R ',0)dR ' =

= φi(R)e

− Ei −ET( )τ ckφ

i(R ')φ

k(R ')dR '∫

k=0

∑i=0

∑ =

= ciφ

i(R)e

− Ei −ET( )τ

i=0

In the limit of long times the lowest energy state (not orthogonal to φ) dominates exponentially. But in general we do not know G ! (G satisfies the same Schrödinger equation as φ)

Diffusion Monte Carlo

∂φ(R,τ )

∂τ=

1

2∇2φ(R,τ ) + E

T−V (R)( )φ(R,τ )

∂φ(R,τ )

∂τ=

1

2∇2φ(R,τ ); G(R,R ',τ ) =

e− R−R '

2

(2πτ )3N /2

∂φ(R,τ )

∂τ= E

T−V (R)( )φ(R,τ ); G(R,R ',τ ) = e

−τ2

V (R )+V (R ')−2 ET( )

Diffusion equation:

Rate equation:

Diffusion equation

2

1

( , ) 1( , )

2

N

ii

φ τ φ ττ =

∂− = ∇

∂ ∑xx

( )2

3 / 2G( , , ) (2 ) exp ; G( , ,0)2

Nτ πτ δτ

−⎡ ⎤− −

= = −⎢ ⎥⎢ ⎥⎣ ⎦

x yx y x y x y

Brownian particles distribution function

( )Discrete( ,0) kk

φ δ⎯⎯⎯→ −∑x x x

( , ) G( , , ) ( ,0)

G( , , ) ( ) G( , , )k kk k

d

d

φ δτ δτ φ

δτ δ δτ

= =

− =

∫∑ ∑∫

x y x y y

y x y y y x y

Rate equation

∂φ(R,τ )

∂τ= E

T−V (R)( )φ(R,τ ); G(R,R ',τ ) = e

−τ2

V (R )+V (R ')−2 ET( )

Now consider the full Hamiltonian: H = T + V; Green function ?Trotter-Suzuki approximation:

( ) / 2 / 2 3( )A B B A Be e e e oδτ δτ δτ δτ δτ− + − − −= +; TA T B V E= = −

G(x,y,δτ ) = x e−(T +V −ET )δτ y ≈ e−δτ (V (x )−ET )/2 x e−δτT y e−δτ (V (y)−ET )/2 =

= (2πδτ )−3N /2 exp− x − y

2

2δτ

⎢⎢

⎥⎥

× exp −δτ V (x) +V (y) − 2ET( )/ 2⎡⎣ ⎤⎦

Diffusion

Branching

Exact in the limit of zero time step; time step error otherwise

• Distribute walkers according to an initial guessed wavefunctionTE

• Diffuse using the diffusive part of the Green function

( )Discrete( ,0) kk

φ δ⎯⎯⎯→ −∑x x x

• Guess

2

3 / 2( , ) (2 ) exp2

kN

k

φ δτ πδτδτ

−⎡ ⎤− −

= ⎢ ⎥⎢ ⎥⎣ ⎦

∑x x

x

• Branch using the brancing part of the Green function

( )exp ( ) ( ) 2 ) / 2TP V V Eδτ= − + −⎡ ⎤⎣ ⎦x y

new INT( )M P η= +

• Adjust , resample from and repeat( , )φ δτxTE

The diffusion Monte Carlo algorithm

22

1 1

2H

r= ∇ +

Example: the hydrogen atom

Importance sampling

∂φ(R,τ )

∂τ=

1

2∇2φ(R,τ ) + E

T−V (R)( )φ(R,τ )

Multiply by a trial wavefunction ψT, and rewrite in terms of f = φψT

∂f (R,τ )

∂τ=

1

2∇2 f (R,τ )−∇ ⋅ v(R) f (R,τ )( )+ ET − EL (R)( ) f (R,τ )

v(R) = ∇ lnψ T = ∇ψ T ψ T ≡Drift velocity

EL (R) = Hψ T (R) ψ T (R) ≡ Local energy

Importance sampling (2)

G(x,y,δτ ) = (2πδτ )−3N /2 exp− x − y −δτv(y)

2

2δτ

⎢⎢

⎥⎥

× exp −δτ EL(x) + E

L(y) − 2E

T( )/ 2⎡⎣ ⎤⎦limτ→∞

f (R,τ ) =ψ T (R)φ0(R)

E0= E

L f

Fermions

φ F (K ,r

i,K r

j,K ) = −φ F (K ,r

j,K r

i,K )

But ground state of Hamiltonian is symmetric, --> the fermionic solution corresponds to an excited state. One possibility: start from antisymmetric distribution, which can be written as difference of two symmetric ones:

φA = φ+ −φ−

φ A(R,τ ) = G R,R ',τ( )∫ φ A(R ',0)dR ' =

= G R,R ',τ( )∫ φ+ (R ',0)dR '− G R,R ',τ( )∫ φ− (R ',0)dR ' =

= φ+ (R,τ )−φ− (R,τ )

φA cannot be interpreted as a density, but φ+ and φ- can

φ+ and φ- tend to the Bosonic solution, and the Fermionic solution given byφ+ - φ- decreases by exp{τ(EF-EB)}compared to the Bosonic solution.Noise grows exponentially ! (Transient solution)

Fermions (2), the fixed node approximation

∂f (R,τ )

∂τ=

1

2∇2 f (R,τ )−∇ ⋅ v(R) f (R,τ )( )+ ET − EL (R)( ) f (R,τ )

f (R,τ ) =ψ T (R)φ(R,τ )

Force the nodes of φ to be the same as those of ψT, achieved by rejecting moves for which f changes sign.

limτ→∞

f (R,τ ) =ψ T (R)φ0FN (R)

E0FN = EL f

≥ E0

Nodal crossing rejection step adds to time step error

Fixed nodes errors δE : ψ T −φ2

Pseudopotentials

Cost grows with ~ Z6 (see e.g. D. M. Ceperly, J. Stat. Phys. 43 815 (1986))

• Shorter length scale near the nuclei, needs for shorter time steps• large energies, usually large variances

Non-local pseudopotentials

∂f

∂τ=

1

2∇2 f −∇ ⋅ vf( )+

ET − H( )ψ T

ψ T

f +Vnlψ T

ψ T

−Vnlφφ

⎧⎨⎩

⎫⎬⎭

f

Locality approximation; non variational (L. Mitas, E. L. Shirley, D. M. Ceperly, J. Chem. Phys. 95, 3467 (1991))

Variational scheme (M. Casula, Phys. Rev. B 74, 161102(R) (2006))

δE : ψ T −φ2

Trial wavefunctions

ψT(X;α ) = eJ (X;α ) D{φ

i(x

j)}

J (X;α ) = χ(xi;α ) −

1

2u(x

i,x

j;α ) +L

j=1j≠i

n

∑i=1

n

∑i=1

n

D is a Slater determinant of single particle orbitals φi (from DFT, HF, …); it sets the nodal surface.J is the Jastrow factor, imposes the cusp conditions (divergence in kinetic energy for electron-electron or electron nucleus coalescence, to cancel divergence in potential energy), depends on a set of parameters α to be optimised.

Wavefunction optimisation

EV

(α ) =ψ

T2 (α )E

L(α )dR∫

ψT2 (α )dR∫

σE2 (α ) =

ψT2 (α ) E

L(α ) − E

V(α )⎡⎣ ⎤⎦

2dR∫

ψT2 (α )dR∫

Minimise energy or variance. Variance is zero for eigenstates of the Hamiltonian, can be used also for excited states.

Wavefunction optimisation (2), correlated sampling

EV

(α ) =ψ

T2 (α

0)w(α )E

L(α )dR∫

ψT2 (α

0)w(α )dR∫

σE2 (α ) =

ψT2 (α

0)w(α ) E

L(α ) − E

V(α )⎡⎣ ⎤⎦

2dR∫

ψT2 (α

0)w(α )dR∫

w(α ) =ψ

T2 (α )

ψT2 (α

0)

Representation of single particle orbitals

• Plane waves. Unbiased, systematically improvable, but extended to the whole system.

• Gaussians. Biased, systematically improvable (?), localised.

• Blips. Unbiased, systematically improvable, localised.

Localised functions sitting at the points of a uniform grid

( )

32

3

3 3( ) 1 0 1

2 41

2 1 24

f x x x x

x x

= − + ≤ ≤

= − ≤ ≤

E. Hernàndez, M. J. Gillan and C. M. Goringe, Phys. Rev. B, 20 (1997)

D. Alfè and M. J. Gillan, Phys. Rev. B, Rapid Comm., 70, 161101, (2004)

Blips

Finite size errors (in periodic systems)

• Size of the periodic box to describe a non-periodic system (e.g. a defect) [common to both DFT and QMC]

• Brillouin zone integration [common to both DFT and QMC]

• Periodic Ewald interaction to model electron-electron interactions depend on size of cell [only QMC. In DFT the XC energy is obtained from QMC data extrapolated to infinite size]

Need to extrapolate to infinite size

Si diamond ß-Sn

D. Alfè, M. J. Gillan, M. D. Towler, R. J. Needs, PRB 70, 214102 (2004)

pt too large; nodal error ?

Water-Benzene binding curve

QuickTime™ and a decompressor

are needed to see this picture.

J. Ma, D. Alfè, A. Michaelides, E. Wang, JCP, 130, 154303 (2009)

Water-benzene binding energy: Nodal effects

ψT(X) = eJ (X )D{φ

i(x

j)}

Orbitals φi from:

LDAB3LYPPBEPBE0HF

Best is LDA

Water-graphene binding curve

Hydrides

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

• Exp: Mg + H2 = MgH2 + 0.79(1) eV• DFT-PBE: 0.47• DFT-PW91: 0.57• DFT-LDA: 0.82 • DFT-RPBE: 0.29

Target: 0.15 - 0.45 eV(decomposition temperature20-100 C)

Time step tests, Mg bulk and MgH2 bulk:

dt = 0.05 a.u, combined error ~ 5 meV

Mg atom and H2 molecule

E = -4.747(1) eVE(exp) = -4.75 eV

E = -22.329(1) eV

Mg bulk, size tests:

EN = EN + [ E∞(DFT)- EN(DFT)] E∞ = -23.867 (2) eV

Mg bulk (T = 298 K )

-1.30RPBE

-1.453323.50PW91

-1.51(1)32(3)23.61(4)DMC

-1.5137(3)23.24EXP

-1.743622.14LDA

-1.473423.47PBE

Ecoh(eV)B0(Gpa)V0(A3)

Thermal pressure at room temperature = 0.94 Gpa --> dV/V0 = dP/B0 = 2 %

MgH2 bulk, size tests:

EN = EN + [ E∞(DFT)- EN(DFT) ] E∞ = -56.789 (1) eV

MgH2 bulk (T = 260 K)

Thermal pressure at room temperature = 1.84 Gpa --> dV/V0 = dP/B0 = 3.5 %

-5.86RPBE

-6.274431.89PW91

-6.84(1)39(2)30.58(6)DMC

-6.78(1)30.49EXP

-7.165030.36LDA

-6.174332.03PBE

Ecoh(eV)B0(Gpa)V0(A3)

Enthalpy of formation of MgH2

• Exp: Mg + H2 = MgH2 + 0.79(1) eV• DFT-PBE: 0.47 • DFT-PW91: 0.57 • DFT-LDA: 0.82• DFT-RPBE: 0.29• DMC: 0.85(1)

M. Pozzo and D. Alfè, Phys. Rev. B, 77, 104103 (2008)

H2 dissociation barrier on Mg(0001):

DMC calculations on PBE geometries

H2 dissociation barrier on Mg(0001):

M. Pozzo and D. Alfè, PRB 78, 245313 (2008)

Conclusions

• QMC is generally more accurate than DFT, evidence of chemical accuracy in many cases however, still not perfect (fixed nodes, pseudopotentials).

• QMC is 103-104 times more expensive than DFT, but is easily parallelisable (different walkers on different processors)

CASINO scaling on JaguarPF (Cray XT5, 150,000 cores at ONRL)