GW calculations for molecules and solids: Theory and implementation in CP2K

Jan Wilhelm

[email protected]

13 July 2017

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 1 / 41 Overview

1 Theory and practical G0W0 scheme

2 Physics of the GW approximation

3 Benchmarks and applications of G0W0

4 Canonical G0W0: Implementation in CP2K and input

5 Periodic G0W0 calculations: Correction scheme and input

6 Cubic-scaling G0W0: Formalism, implementation and input

7 Summary

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 2 / 41 1 Theory and practical G0W0 scheme

2 Physics of the GW approximation

3 Benchmarks and applications of G0W0

4 Canonical G0W0: Implementation in CP2K and input

5 Periodic G0W0 calculations: Correction scheme and input

6 Cubic-scaling G0W0: Formalism, implementation and input

7 Summary

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 3 / 41 Quasiparticle energies in GW : Theory Definition:

A quasiparticle energy εn is defined as energy which is needed to remove an electron from the system to the vacuum or Energy is gained if one places an electron from the vacuum to the system

In DFT and Hartree-Fock, there is no theoretical foundation that εvac =0 the eigenvalues εn from an SCF, εLUMO+1 2 ! ∇ + vel-core(r) + vH(r) + vxc(r) ψn(r) = εn ψn(r) − 2 εLUMO have anything to do with quasiparticle energies. Theorem: A self-energy Σ(r, r0,ε ) (non-local, energy-dependent) containing εHOMO exchange and correlation effects exists, such that the solution of 2 ! Z εHOMO-1 −∇ 0 0 0 + vel-core(r) + vH(r) ψn(r) + dr Σ(r, r , εn)ψn(r ) = εn ψn(r) 2 Single-electron (quasiparticle) levels of gives the correct quasiparticle energies εn of the interacting a closed shell molecule many-electron system. In the GW approximation, the self-energy reads ∞ Z GW 0 i 0 0 0 0 0 Σ (r, r , ε) = dε G(r, r , ε ε , εn , ψn ) W (r, r , ε , εn , ψn ) 2π − { } { } { } { } −∞

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 4 / 41 Quasiparticle energies in GW : G0W0 formalism in practice

DFT G0W0: Start from DFT MOs ψn (r) and compute first-order correction to DFT eigenvalues:

1 Converge DFT SCF (e.g. PBE functional for solids "G0W0@PBE", PBE0 for molecules) 2   DFT DFT DFT ∇ + vel-core(r) + vHartree(r) + vxc(r) ψ (r) = ε ψ (r) . − 2 n n n 2 Compute density response (most expensive step): occ virt εDFT εDFT 0 X X DFT 0 DFT 0 DFT DFT i a 4 χ(r, r , iω) = 2 ψa (r )ψi (r )ψi (r)ψa (r) − . ( (N )) ω2 + εDFT εDFT2 O i a i − a 3 Compute dielectric function with v(r, r0)=1/ r r0 |Z− | (r, r0, iω) = δ(r, r0) dr00v(r, r00)χ(r00, r0, iω) . ( (N3)) − O 4 Compute screened Coulomb interaction Z W (r, r0, iω) = dr00−1(r, r00, iω)v(r00, r0) . ( (N3)) 0 O 5 Compute the self-energy ∞ all Z dω0 X ψDFT(r0)ψDFT(r) Σ( , 0, ω) = ( , 0, ω ω0) ( , 0, ω0) , ( , 0, ω) = m m . ( 3) r r i G0 r r i i W0 r r i G0 r r i DFT ( N ) − 2π − iω + εF εm O −∞ m −

6 Compute G0W0 quasiparticle energies (replace wrong XC from DFT by better XC from GW ) εG0W0 = εDFT + ψDFT Re Σ(εG0W0 ) v xc ψDFT ( (N3)) n n h n | n − | n i O Jan Wilhelm GW calculations for molecules and solids 13 July 2017 5 / 41 Historical sketch of GW

1965: Proposition of the GW method Lars Hedin: New Method for Calculating the One-Particle Green’s Function with Application to the Electron-Gas Problem, Phys. Rev. 139, A796 (1965), ∼ 3700 citations

1986: First G0W0@LDA calculation for diamond, Si, Ge, and LiCl M. S. Hybertsen and S. G. Louie: Electron correlation in semiconductors and insulators: Band gaps and quasiparticle energies, Phys. Rev. B 34, 5390 (1986), ∼ 2700 citations 2005 – now: GW for solids in publicly available plane-waves codes Abinit: X. Gonze et al., Z. Kristallogr. 220, 558 – 562 (2005) VASP: M. Shishkin and G. Kresse, Phys. Rev. B 74, 035101 (2006) Yambo: A. Marini, C. Hogan, M. Grüning, D. Varsano, Comput. Phys. Commun. 180, 1392 – 1403 (2009) BerkeleyGW: J. Deslippe et al., Comput. Phys. Commun. 183, 1269 – 1289 (2012) GPAW: F. Hüser, T. Olsen, and K. S. Thygesen, Phys. Rev. B 87, 235132 (2013) WEST: M. Govoni and G. Galli, J. Chem. Theory Comput. 11, 2680 –2696 (2015) 2011 – now: GW with localized basis in publicly available codes FHI-aims: X. Ren et al., New J. Phys. 14, 053020 (2012) Turbomole: M. van Setten, F. Weigend, and F. Evers, J. Chem. Theory Comput. 9, 232 – 246 (2012) molgw: F. Bruneval et al., Comput. Phys. Commun. 208, 149 – 161 (2016) CP2K: J. Wilhelm, M. Del Ben, and J. Hutter, J. Chem. Theory Comput. 12, 3623 – 3635 (2016) Recent trend: Numerically converged results and agreement between codes J. Klimeš, M. Kaltak, and G. Kresse: Predictive GW calculations using plane waves and pseudopotentials, Phys. Rev. B 90, 075125 (2014)

M. van Setten et al.: GW 100: Benchmarking G0W0 for Molecular Systems, JCTC 11, 5665 – 5687 (2015)

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 6 / 41 1 Theory and practical G0W0 scheme

2 Physics of the GW approximation

3 Benchmarks and applications of G0W0

4 Canonical G0W0: Implementation in CP2K and input

5 Periodic G0W0 calculations: Correction scheme and input

6 Cubic-scaling G0W0: Formalism, implementation and input

7 Summary

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 7 / 41 Hedin’s equations

Hedin’s equation: Complicated self-consistent equations which give the exact self-energy.

Notation: (1) = (r1, t1), G0: non-interacting Green’s function, e.g. from DFT Z Self-energy: Σ(1, 2) = i d(34)G(1, 3)Γ(3, 2, 4)W (4, 1+) Z Green’s function: G(1, 2) = G0(1, 2) + d(34)G0(1, 3)Σ(3, 4)G(4, 2) Z Screened interaction: W (1, 2) = V (1, 2) + d(34)V (1, 3)P(3, 4)W (4, 2)

Bare interaction: V (1, 2) = δ(t t )/ r r 1 − 2 | 1 − 2| Z Polarization: P(1, 2) = i d(34)G(1, 3)G(4, 1+)Γ(3, 4, 2) − Z ∂Σ(1, 2) Vertex function: Γ(1, 2, 3) = δ(1, 2)δ(1, 3) + d(4567) G(4, 6)G(7, 5)Γ(6, 7, 3) ∂G(4, 5) It can be shown that Σ(r , t , r , t )=Σ(r , r , t t ). After a Fourier transform of Σ from 1 1 2 2 1 2 2 − 1 time t t t to frequency (= energy), the self-energy Σ(r, r0, ω) can be used to compute ≡ 2 − 1 the quasiparticle levels εn using

2 ! Z 0 0 0 −∇ + vel-core(r) + vH(r) ψn(r) + dr Σ(r, r , εn)ψn(r ) = εn ψn(r) 2

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 8 / 41 Hedin’s equations: Hartree-Fock

Hartree-Fock is GV : Z Self-energy: Σ(1, 2) = i d(34)G(1, 3)Γ(3, 2, 4)W (4, 1+)= G(1, 2)V (2, 1) Z Green’s function: G(1, 2) = G0(1, 2) + d(34)G0(1, 3)Σ(3, 4)G(4, 2) Z Screened interaction: W (1, 2) = V (1, 2) + d(34)V (1, 3)P(X3,X4)X→0W (4, 2)= V (1, 2)

Bare interaction: V (1, 2) = δ(t t )/ r r 1 − 2 | 1 − 2| ((h hZ hh (( hh (((+ Polarization: P(1, 2) = i d(34)(G((1, h(3)Gh(4h, 1h)Γ(3, 4, 2)= 0 (− ((( hhhh h ((h Z hhh ((( ∂Σ(h1h, 2)(h((( Vertex function: Γ(1, 2, 3) = δ(1, 2)δ(1, 3) + d(4567)((( G(h4,h6)Gh(7h, 5)Γ(6, 7, 3) (((( ∂G(4, 5) hhhh

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 9 / 41 Hedin’s equations: GW

Z Self-energy: Σ(1, 2) = i d(34)G(1, 3)Γ(3, 2, 4)W (4, 1+)= iG(1, 2)W (2, 1+) Z Green’s function: G(1, 2) = G0(1, 2) + d(34)G0(1, 3)Σ(3, 4)G(4, 2) Z Screened interaction: W (1, 2) = V (1, 2) + d(34)V (1, 3)P(3, 4)W (4, 2)

Bare interaction: V (1, 2) = δ(t t )/ r r 1 − 2 | 1 − 2| Z X Polarization: P(1, 2) = i d(34)G(1, 3)G(4, 1+)Γ(3X, 4X, 2)= G(1, 2)G(2, 1+) −  X hh (((h Z hh∂Σ( , ) ((( h1h2 (h(h( Vertex function: Γ(1, 2, 3) = δ(1, 2)δ(1, 3) + d(4567)((( G(4,h6)Gh(7h, 5)Γ(6, 7, 3) (((( ∂G(4, 5) hhhh

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 10 / 41 Screening

In GW , the screened Coulomb interaction is appearing: Z W (r, r0, ω) = dr00−1(r, r00, ω)v(r00, r0)

where v(r, r0) = 1/ r r0 . | − | Compare to screened Coulomb potential with local and static [(r, r0, ω) =  δ(r r0)] r − dielectric function using the dielectric constant r (in SI units): 1 1 W (r, r0) = 4π  r r0 0 r | − |

screening

charge which has been added to the system

internal mobile charge carriers (e.g. electrons) which adapt due to the + charge

screening: adaption of electrons due to additional charge, key ingredient in GW (next slide)

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 11 / 41 V in Hartree-Fock versus W in GW

Gedankenexperiment: Ionization which leads to a hole (marked by "+")

Hartree-Fock: Σ=GVGW : Σ=GW Energy

εvac =0

εLUMO+1

εLUMO V ") screening ("W ")noscreening ("

εHOMO

εHOMO-1

HF does not account for relaxation of electrons after adding an electron to an unoccupied MO or removing an electron from an occupied MO (only V in HF, no W or ) occupied levels are too low, unoccupied levels are too high HOMO-LUMO gap too large ⇒ ⇒ In DFT, εn (besides εHOMO) do not have any physical meaning. Self-interaction error (SIE) in common GGA functionals HOMO far too high in DFT HOMO-LUMO gap too low in DFT ⇒ ⇒ Mixing HF and DFT (hybrids) can give accurate HOMO-LUMO gaps since two errors (SIE in DFT vs. absence of screening in HF) may compensate GW accounts for screening (since W is included) after adding an electron to an unoccupied MO or removing an electron from an occupied MO accurate εGW ⇒ n Jan Wilhelm GW calculations for molecules and solids 13 July 2017 12 / 41 Physics beyond GW

GW does not account for the exact adaption of other electrons εGW can be improved by higher level of theory ("adding more diagrams") ⇒ n

Analogy: Full CI contains all determinants (= diagrams), but is untractable for large systems. Way out: neglect unnecessary determinants leading to e.g. CCSD, CCSD(T), RPA, MP2

Exact expansion of the self-energy: Z Σ(1, 2) = iG(1, 2)W (2, 1+) d(34) G(1, 3)W (1, 4)G(4, 2)W (3, 2)G(3, 4) + ... −

GW approximation is good if W is small, otherwise higher order terms in W important ⇒

Screening is high in systems with small bandgap (since MOs in occupied orbitals can scatter into unoccupied orbitals with low loss of energy)  is large in systems with small bandgap ⇒ W is small in systems with small bandgap ⇒ The GW approximation is good for systems with small bandgaps ⇒

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 13 / 41 1 Theory and practical G0W0 scheme

2 Physics of the GW approximation

3 Benchmarks and applications of G0W0

4 Canonical G0W0: Implementation in CP2K and input

5 Periodic G0W0 calculations: Correction scheme and input

6 Cubic-scaling G0W0: Formalism, implementation and input

7 Summary

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 14 / 41 Accuracy of G0W0

Benchmark for molecules (FHI-aims) Benchmark for solids (VASP) MAE = Mean absolute error Bandgap = HOMO-LUMO gap IP = Ionization potential = ε | HOMO| Liu et al., PRB 94, 165109 (2016) EA = Electron affinity = εLUMO | | Knight et al., JCTC 12, 615 (2016)

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 15 / 41 Application of G0W0 to periodic graphene nanoribbons

L. Yang, C.-H. Park, Y.-W. Son, M. L. Cohen, and S. G. Louie, Phys. Rev. Lett. 99, 186801 (2007)

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 16 / 41 Application of G0W0 to novel graphene nanoribbons

S. Wang, L. Talirz, C. A. Pignedoli, X. Feng, K. Müllen, R. Fasel, P. Ruffieux, Nat. Commun. 7, 11507 (2016)

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 17 / 41 Application of G0W0 to novel perovskite solar cells

M. R. Filip, G. E. Eperon, H. J. Snaith, and F. Giustino, Nat. Commun. 5, 5757 (2014)

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 18 / 41 1 Theory and practical G0W0 scheme

2 Physics of the GW approximation

3 Benchmarks and applications of G0W0

4 Canonical G0W0: Implementation in CP2K and input

5 Periodic G0W0 calculations: Correction scheme and input

6 Cubic-scaling G0W0: Formalism, implementation and input

7 Summary

Literature: J. Wilhelm, M. Del Ben, and J. Hutter, J. Chem. Theory Comput. 12, 3623 – 3635 (2016)

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 19 / 41 Resolution of the identity (RI) [Chem. Phys. Lett. 213, 514-518 (1993)]

In post-DFT methods as GW , four-index Coulomb integrals are appearing: Z 3 3 0 1 0 0 (nm kl) = d r d r ψn(r)ψm(r) ψk (r )ψl (r ) | r r0 | − | RI with overlap metric RI with Coulomb metric

X X −1 1 Id = P S−1 Q Id = P V Q | i PQ h | | i PQ h | ˆr PQ PQ

X −1 −1 X −1 −1 (nm kl) = (nmP)S V S (Tkl) (nm kl) = (nm P)V VQR V (T kl) | PQ QR RT | | PQ RT | PQRT PQRT X Z = (nm P)V −1(Q kl) 3 | PQ | (nmP) = d r ψn(r)ψm(r)ϕP (r) PQ

X − / − / = (nm P)V 1 2 V 1 2(R kl) | PQ QR | Resolution of the identity basis ϕ with PQR | {z } | {z } P = Bnm kl { } Q = BQ Overlap matrix X nm kl R 3 = BQ BQ SPQ = d r ϕP (r)ϕQ (r) Q Coulomb matrix Z 3 3 0 1 0 R 3 3 0 0 0 (nm P) = d r d r ψn(r)ψm(r) ϕP (r ) VPQ = d r d r ϕP (r)ϕQ (r )/ r r | r r0 | − | | − | Jan Wilhelm GW calculations for molecules and solids 13 July 2017 20 / 41 G0W0 in real space versus GW with RI

G0W0 in real space G0W0 with RI

4 1 Compute density response [ (N )] 1 Compute ΠPQ matrix [Π equivalent to O v 1/2χv 1/2, (N4) operations] 0 X 0 0 2(εi − εa) O χ(r, r, iω)= ψa(r )ψi (r )ψi (r)ψa(r) ω2 + (ε − ε )2 ia i a X ia 2(εi εa) ia ΠPQ (iω) = B − B P ω2 + (ε ε )2 Q 2 Compute dielectric function ia i − a Z 0 0 00 00 00 0 (r, r , iω) = δ(r, r ) − dr v(r, r )χ(r , r , iω) 2 Compute symmetrized dielectric function

3 Compute screened Coulomb interaction PQ (iω) = δPQ ΠPQ (iω) − Z 0 00 −1 00 00 0 W0(r, r , iω) = dr  (r, r , iω)v(r , r ) 3 Compute SE Σ (iω) ψ Σ(iω) ψ n ≡ h n| | ni ∞ 4 all Compute self-energy (SE) Z dω0 X 1 Σ ( ω) = ∞ n i 0 Z dω0 − 2π i(ω ω ) + εF εm 0 0 0 0 0 −∞ m Σ(r, r , iω) = − G0(r, r , iω−iω )W0(r, r , iω ) − − 2π −∞ X nm−1( ω0) mn BP PQ i BQ 5 × Compute G0W0 quasiparticle energies PQ

G W G W ε 0 0 = ε + ψ Re Σ(ε 0 0 ) v xc ψ 4 Compute G W quasiparticle energies n n h n| n − | ni 0 0 εG0W0 = ε + ψ Re Σ(εG0W0 ) v xc ψ n n h n| n − | ni

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 21 / 41 Exchange and correlation self-energy

The self-energy Σn(iω) from the last slide,

∞ all Z dω0 X 1 X Σ ( ω) = nm−1( ω0) mn , n i 0 BP PQ i BQ − 2π i(ω ω ) + εF εm −∞ m − − PQ

x is split into an exchange part Σn [= (n, n)-diagonal element of the Fock matrix]

occ X X Σx = BnmBmn , n − P P m P and a correlation part

∞ all Z dω0 X 1 X Σc ( ω) = nm[−1( ω0) δ ] mn , n i 0 BP PQ i PQ BQ − 2π i(ω ω ) + εF εm − −∞ m − − PQ

x c such that Σn(iω) = Σn + Σn(iω). This procedure guarantees numerical stability.

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 22 / 41 Analytic continuation

c The self-energy Σn(iω) is computed for imaginary frequency and needed for real frequency (= energy) for solving the quasiparticle equation:

εG0W0 = ε + Re Σ (εG0W0 ) v xc n n n n − n xc R 3 where vn = d r ψn(r)vxc(r)ψn(r).

Σn(ω) for a real-valued ω is obtained from Σn(iω) by fitting an N-point Padé approximant

N−1 P j aj (iω) j=0 · P(iω) = N P k 1 + bk (iω) k=0 · to Σn(iω) to determine the complex numbers aj and bk . Then, Σn(ω) is obtained by evaluating P:

N−1 P j aj (ω εF) j=0 · − Σn(ω) = N P k 1 + bk (ω εF) k=0 · − where the Fermi level εF appears to obtain the correct offset.

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 23 / 41 Input for G0W0@PBE for the H2O molecule I

DFT calculation to get the molecular orbitals ψn from a PBE calculation:

&FORCE_EVAL &SUBSYS METHOD Quickstep &CELL &DFT ABC 10.0 10.0 10.0 BASIS_SET_FILE_NAME BASIS_def2_QZVP_RI_ALL PERIODIC NONE POTENTIAL_FILE_NAME POTENTIAL &END CELL &MGRID &COORD CUTOFF 400 O 0.0000 0.0000 0.0000 REL_CUTOFF 50 H 0.7571 0.0000 0.5861 &END MGRID H -0.7571 0.0000 0.5861 &QS &END COORD ! all electron calculation since GW100 &TOPOLOGY ! is all-electron test &CENTER_COORDINATES METHOD GAPW &END &END QS &END TOPOLOGY &POISSON &KIND H PERIODIC NONE ! def2-QZVP: basis of GW100 PSOLVER MT BASIS_SET def2-QZVP &END ! just very large RI basis to ensure good &SCF ! convergence in RI basis EPS_SCF 1.0E-6 RI_AUX_BASIS RI-5Z SCF_GUESS ATOMIC POTENTIAL ALL MAX_SCF 200 &END KIND &END SCF &KIND O &XC BASIS_SET def2-QZVP &XC_FUNCTIONAL PBE RI_AUX_BASIS RI-5Z &END XC_FUNCTIONAL POTENTIAL ALL ! GW is part of the WF_CORRELATION section &END KIND &WF_CORRELATION &END SUBSYS ... &END FORCE_EVAL &END &GLOBAL &END XC RUN_TYPE ENERGY &END DFT . PROJECT ALL_ELEC . PRINT_LEVEL MEDIUM . &END GLOBAL

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 24 / 41 Input for G0W0@PBE for the H2O molecule II

Parameters for the GW calculation:

&XC &RI_G0W0

&XC_FUNCTIONAL PBE ! compute the G0W0@PBE energy of HOMO-9, &END XC_FUNCTIONAL ! HOMO-8, ... , HOMO-1, HOMO CORR_OCC 10 ! GW is part of the WF_CORRELATION section &WF_CORRELATION ! compute the G0W0@PBE energy of LUMO, ! LUMO+1, ... , LUMO+20 ! RPA is used to compute the density response function CORR_VIRT 20 METHOD RI_RPA_GPW ! Pade approximant ! Use Obara-Saika integrals instead of GPW integrals ANALYTIC_CONTINUATION PADE ! since OS is much faster ERI_METHOD OS ! for solving the quasiparticle equation, ! the Newton method is used as in GW100 &RI_RPA CROSSING_SEARCH NEWTON

! use 100 quadrature points to perform the ! use RI for the exchange self-energy ! frequency integration in GW RI_SIGMA_X RPA_NUM_QUAD_POINTS 100 &END RI_G0W0 ! SIZE_FREQ_INTEG_GROUP is a group size for ! parallelization and should be increased for &END RI_RPA ! large calculations to prevent out of memory. ! maximum for SIZE_FREQ_INTEG_GROUP ! NUMBER_PROC is a group size for ! is the number of MPI tasks ! parallelization and should be increased SIZE_FREQ_INTEG_GROUP 1 ! for large calculations NUMBER_PROC 1 GW &END WF_CORRELATION . . &END XC

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 25 / 41 Basis set convergence for benzene: HOMO level

– 8.4

– 8.6 aug-DZVP

– 8.8 cc-DZVP cc-TZVP

– 9.0 aug-TZVP aug-QZVP cc-QZVP Basis set extrapolation @PBE0 HOMO (eV) cc-5ZVP aug-5ZVP 0 – 9.2 G0W0@PBE0 HOMO W

0 linear fit G – 9.4 1 1 1 1 1 ∞ 816 504 258 108

1/Nprimary basis functions

Slow basis set convergence for the HOMO level Basis set extrapolation necessary

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 26 / 41 Basis set convergence for benzene: HOMO-LUMO gap

11.2 Basis set convergence cc-DZVP G0W0@PBE0 gap 11.0

10.8

cc-TZVP @PBE0 gap (eV) 0 10.6 cc-QZVP cc-5ZVP W 0

G aug-DZVP aug-TZVP aug-QZVP aug-5ZVP 10.4 0 500 1000 1500

Nprimary basis functions

Slow basis set convergence for the HOMO-LUMO gap in a correlation-consistent (cc) basis Fast basis set convergence for the HOMO-LUMO gap in an augmented (aug) basis

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 27 / 41 Computational cost for water in a cc-TZVP basis

104 overall G 0W 0 calc. computing Π (iω) 3 PQ 10 fit (exponent: 3.93)

102

101 Execution time (core hours) 100 32 64 96 128 160 Number of water molecules

(N4) computational cost as expected O massively parallel implementation

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 28 / 41 1 Theory and practical G0W0 scheme

2 Physics of the GW approximation

3 Benchmarks and applications of G0W0

4 Canonical G0W0: Implementation in CP2K and input

5 Periodic G0W0 calculations: Correction scheme and input

6 Cubic-scaling G0W0: Formalism, implementation and input

7 Summary

Literature: J. Wilhelm and J. Hutter, Phys. Rev. B 95, 235123 (2017)

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 29 / 41 Motivation: Slow convergence of GW with the cell size

9.0 Solid LiH without correction 8.0 theoretical extrapolation extrapolated value LiH unit cell 7.0 (1×1×1) with correction

6.0 2×2×2 3×3×3 4×4×4 5.0 @PBE HOMO-LUMO gap (eV) 0 W 0

G 4.0 64 216 512 1000 3000 10000 30000 100000

Natoms per cell

Very slow convergence of the G0W0 HOMO-LUMO gap as function of the cell size / 1/3 The extrapolation (blue line) can be done with 1 Natoms per cell Comparison: Convergence of DFT gap with exp( N ) for non-metallic systems − atoms per cell

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 30 / 41 1/L convergence of the HOMO-LUMO gap

9.0 Solid LiH calculations 2×2×2 8.0 linear fit

3×3×3 7.0 4×4×4

6.0 @PBE HOMO-LUMO gap (eV)

0 5.0 W 0 G 4.0 1 √ 1 √1 √1 √1 ∞ 3 4096 3 512 3 216 3 64

1/N 1/3 ( 1/L) atoms per cell ∼

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 31 / 41 (a) 9.0

8.0

7.0

6.0

@PBE gap (eV) 4 4 4 3 3 3 2 2 2

0 × × × × × ×

W 5.0 0 G 4.0 1 1 1 1 1 16 8 6 4 Benchmark calculations for solids ∞ 1/N 1/3 ( 1/L) without correction linear fit extrapolated value with correction atoms per cell ∼ 9.0 10.0 Diamond, exp. gap: 5.48 eV 8.0 Solid LiH, exp. gap: 4.99 eV 9.0 7.0 8.0 6.0 7.0 4×4×4 3×3×3 2×2×2

@PBE gap (eV) 5.0 6.0 0

W 5.0

0 4.0 1 1 1 1 1 1 1 1 1 1 G ∞ 16 8 6 4 ∞ 16 8 6 4 1/N 1/3 ( 1/L) 1/N 1/3 ( 1/L) l atoms per cell ∼ atoms per cell ∼ 12.0 14.0 11.0 NH3 13.0 CO2 crystal 10.0 12.0 9.0 11.0

@PBE gap (eV) 8.0 10.0 0

W 9.0 0 7.0 1 1 1 1 1 1 1 1

G √ √ √ √ √ √ ∞ 3 432 3 128 3 16 ∞ 3 324 3 96 3 12

1/N 1/3 ( 1/L) 1/N 1/3 ( 1/L) l atoms per cell ∼ atoms per cell ∼ Jan Wilhelm GW calculations for molecules and solids 13 July 2017 32 / 41 Input for periodic G0W0@PBE for solid LiH

. . ! HF calculation for the exchange self-energy . ! Here, the truncation of the Coulomb operator works &XC &HF

&XC_FUNCTIONAL PBE &SCREENING &END XC_FUNCTIONAL EPS_SCHWARZ 1.0E-6 SCREEN_ON_INITIAL_P TRUE &WF_CORRELATION &END

METHOD RI_RPA_GPW &INTERACTION_POTENTIAL POTENTIAL_TYPE TRUNCATED &RI_RPA ! the truncation radius is half the cell size CUTOFF_RADIUS 2.00 RPA_NUM_QUAD_POINTS 100 T_C_G_DATA t_c_g.dat &END GW &MEMORY &RI_G0W0 MAX_MEMORY 0 &END CORR_OCC 5 CORR_VIRT 5 &END

! activate the periodic correction &END RI_RPA PERIODIC NUMBER_PROC 1 ANALYTIC_CONTINUATION PADE &END CROSSING_SEARCH NEWTON &END XC &END RI_G0W0 . . . .

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 33 / 41 1 Theory and practical G0W0 scheme

2 Physics of the GW approximation

3 Benchmarks and applications of G0W0

4 Canonical G0W0: Implementation in CP2K and input

5 Periodic G0W0 calculations: Correction scheme and input

6 Cubic-scaling G0W0: Formalism, implementation and input

7 Summary

Literature: J. Wilhelm, D. Golze, C. A. Pignedoli, and J. Hutter, in preparation

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 34 / 41 (N3) GW space-time method [Rojas et al., PRL 74, 1827 (1995)] O

Canonical (N4) G W (N3) G W space-time method O 0 0 O 0 0 1 Compute density response in O(N4) 1 Compute density response in O(N3) 0 X 0 0 −(ε −ε )τ 0 X 0 0 2(εi − εa) a i χ( , , ω)= ψ ( )ψ ( )ψ ( )ψ ( ) χ(r, r, iτ)= ψa(r )ψi (r )ψi (r)ψa(r)e r r i a r i r i r a r 2 2 + ( − ) ia ia ω εi εa occ 0 −|(ε −ε )τ| virt 0 −|(ε −ε )τ| =Xψ ( )ψ ( )e i F Xψ ( )ψ ( )e a F 2 Compute dielectric function i r i r a r a r i a Z 0 0 00 00 00 0 (r, r , iω) = δ(r, r ) − dr v(r, r )χ(r , r , iω) 2 Compute dielectric function Z 0 0 00 00 00 0 3 Compute screened Coulomb interaction (r, r , iτ) = δ(r, r ) − dr v(r, r )χ(r , r , iτ) Z 0 00 − 00 00 0 1 3 W0(r, r , iω) = dr  (r, r , iω)v(r , r ) Compute screened Coulomb interaction Z 0 00 −1 00 00 0 4 Compute self-energy W0(r, r , iω) = dr  (r, r , iω)v(r , r ) ∞ Z 0 0 dω 0 0 0 0 4 Compute self-energy Σ(r, r , iω) = − G0(r, r , iω−iω )W0(r, r , iω ) 2π 0 0 0 −∞ Σ(r, r , iτ) = − G0(r, r , iτ)W0(r, r , iτ)

5 5 Compute G0W0 quasiparticle energies Compute G0W0 quasiparticle energies

G W G W G0W0 G0W0 xc 0 0 0 0 xc ε = ε + ψ Re Σ(ε ) v ψ εn = εn + ψn Re Σ(εn ) v ψn n n h n| n − | ni h | − | i

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 35 / 41 Resolution of the identity (RI) II RI with overlap metric RI with Coulomb metric

X X − (µν λσ) = (µνP)S−1V S−1(T λσ) (µν λσ) = (µν P)V 1(Q λσ) | PQ QR RT | | PQ | PQRT PQ

Z Z 3 3 3 0 1 0 (µνP) = d r φµ(r)φν (r)ϕP (r) (µν P) = d r d r φµ(r)φν (r) ϕP (r ) | r r0 | − |

(νµP) = 0 if one of φµ, φν , ϕ far-off (νµ P) = 0 if φµ, φν far-off P | slightly larger RI basis as for RI-Coulomb No sparsity of (νµ P) if ϕ far-off | P

φµ(r) φν (r)

ϕQ(r)

Z Z l 3 3 3 0 1 0 (µνP) = d r φµ(r)φν (r)ϕP (r) 0 (µν P) = d r d r φµ(r)φν (r) ϕP (r ) 1 ≈ | r r0 ≈ | − | Jan Wilhelm GW calculations for molecules and solids 13 July 2017 36 / 41 Cubic-scaling GW in a basis with overlap-metric RI

( χ˜ ( τ) = P P(λσ ) ( τ) P −|(εi −εF)τ| , τ < PQ i P Gµλ i i Cµi Cνi e if 0 µσ λ Gµν (iτ) = P −|(ε −ε )τ| P(µν ) ( τ) CµaCνae a F , if τ > 0 Q Gνσ i − a × ν − (N2), JW, P. Seewald, M. Del Ben, O P J. Hutter, JCTC 12, 5851 – 5859 (2016) Σn(iτ) = Gµν (iτ)(nµP) −µνPQ W˜ (iτ)(Qνn) −1 −1 × PQ χ(iτ) = S χ˜(iτ)S (N2N ) O GW χ(iω)

Σn(iω) ε(iω) = 1 Vχ(iω) −

W(iω) = ε−1(iω)V Σn(ε)

W˜ (iω) = S−1W(iω)S−1

G0W0 G0W0 xc εn = εn + Re Σn(εn ) vn − W˜ (iτ)

(µν λσ) = P (µν ) −1 −1( λσ) RI with overlap metric: P SPQ VQR SRT T | PQRT

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 37 / 41 Computational scaling of cubic-scaling GW

105 (N4) G W total fit: (N 3.80) O 0 0 O 4 (N3) G W total fit: (N 2.13) 10 O 0 0 O (N 3) steps fit: (N 2.84) O O 103

102

101

Execution time (node hours) 100 114 222 438 870 1734 (7,12) (7,24) (7,48) (7,96) (7,192)

Number of atoms (Name of the GNR)

Cubic-scaling GW particularly efficient for systems with low dimensionality (best: one-dimensional chain, worst: spherical molecule, periodic system) local electronic structure (best: solution of small molecules, worst: extended π system)

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 38 / 41 Input for cubic-scaling G0W0

G0W0@PBE for the (7,192) GNR (1734 atoms, aug-DZVP basis) 400 Piz Daint MC nodes (4 OMP threads)

&WF_CORRELATION ! parameters for computing chi(it) &IM_TIME METHOD RI_RPA_GPW ! EPS_FILTER_IM_TIME should be tuned ! cubic-scaling GW only works with overlap metric RI EPS_FILTER_IM_TIME 1.0E-11 RI OVERLAP ! for large systems, increase GROUP_SIZE_3C ERI_METHOD OS ! to prevent out of memory (OOM) GROUP_SIZE_3C 9 &WFC_GPW ! for large systems, increase GROUP_SIZE_3C ! EPS_FILTER should be tuned, computational cost ! to prevent out of memory (OOM) ! strongly depends on EPS_FILTER GROUP_SIZE_P 1 EPS_FILTER 1.0E-9 ! for larger systems, MEMORY_CUT must be ! EPS_GRID may be tuned since memory is weakly ! increased to prevent out of memory (OOM) ! dependent on it MEMORY_CUT 12 EPS_GRID 1.0E-6 GW &END &END &RI_RPA &RI_G0W0 ! cubic-scaling GW only works with the minimax grid CORR_OCC 15 ! in imag. time and frequency CORR_VIRT 15 MINIMAX CROSSING_SEARCH NEWTON OMEGA_MAX_FIT 1.0 ! number of time and frequency points, at most 20 ANALYTIC_CONTINUATION PADE RPA_NUM_QUAD_POINTS 12 RI OVERLAP RI_SIGMA_X IM_TIME &END RI_G0W0 &END RI_RPA . &END . Jan Wilhelm GW calculations for molecules and solids 13 July 2017 39 / 41 1 Theory and practical G0W0 scheme

2 Physics of the GW approximation

3 Benchmarks and applications of G0W0

4 Canonical G0W0: Implementation in CP2K and input

5 Periodic G0W0 calculations: Correction scheme and input

6 Cubic-scaling G0W0: Formalism, implementation and input

7 Summary

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 40 / 41 Summary

GW : method to compute quasiparticle energies Energy from first principles

εvac =0 Accuracy of G0W0@PBE for solids, G0W0@PBE0 ε for molecules in the order of few hundreds of meV LUMO+1

ε High (N4) computational cost LUMO O Hundreds of atoms can be treated on εHOMO supercomputers by G0W0 in CP2K

εHOMO-1 Slow basis set convergence Quasiparticle energies of a closed shell molecule Correction scheme for periodic G0W0 calculations

(N3) G W method for big systems O 0 0

Jan Wilhelm GW calculations for molecules and solids 13 July 2017 41 / 41