Localized atomic orbitals in GPAW or as we like to call it: LCAO - - PowerPoint PPT Presentation

localized atomic orbitals in gpaw
SMART_READER_LITE
LIVE PREVIEW

Localized atomic orbitals in GPAW or as we like to call it: LCAO - - PowerPoint PPT Presentation

Localized atomic orbitals in GPAW or as we like to call it: LCAO mode Ask Hjorth Larsen Nano-bio Spectroscopy Group Departamento de F sica de Materiales Universidad del Pa s Vasco UPV/EHU May 21, 2013 Localized atomic


slide-1
SLIDE 1

Localized atomic orbitals in GPAW

  • r as we like to call it:

“LCAO mode”

Ask Hjorth Larsen

Nano-bio Spectroscopy Group Departamento de F´ ısica de Materiales Universidad del Pa´ ıs Vasco UPV/EHU

May 21, 2013

slide-2
SLIDE 2

Localized atomic orbitals in GPAW

Real-space mode, mode=’fd’

◮ Very accurate ◮ Excellent parallelization (k-points, domains, bands) ◮ Can be a bit expensive at times

LCAO mode, mode=’lcao’

◮ Very efficient, particularly for large systems ◮ Good parallelization (k-points, domains, bands/orbitals) ◮ Not all that accurate

Planewave mode, mode=’pw’

◮ Very accurate, planewaves are very neat ◮ But less parallel than ’fd’ (k-points, bands only)

slide-3
SLIDE 3

Localized atomic orbitals in GPAW

Localized basis sets

◮ Expand pseudowavefunctions in fixed orbitals:

| ˜ ψn =

  • µ

|Φµ cµn

◮ Now cµn are the variational variables, and |Φµ are fixed

localized functions

◮ Derive new Kohn–Sham equations and solve:

  • ν

Hµνcνn =

  • ν

Sµνcνnǫn Thanks to Marco Vanin for the collaboration back in the days

slide-4
SLIDE 4

Localized atomic orbitals in GPAW

Advantages

◮ More locality → better scaling of many operations ◮ Smaller dimension of Hamiltonian → we can use direct solver ◮ Direct solver → easier to converge (fewer steps) ◮ Small basis allows e.g. Green’s function based transport

calculations

Disadvantages

◮ Basis set is much less “complete” than real-space/planewaves ◮ Binding energies not so accurate ◮ (Alternatively: Spend ages choosing good basis functions) ◮ No simple way to crank up precision

slide-5
SLIDE 5

Localized atomic orbitals in GPAW

Using LCAO mode

from ase.structure import molecule from gpaw import GPAW system = molecule(’H2O’) system.center(vacuum =5.0) calc = GPAW(mode=’lcao ’, # important basis=’dzp’, # also important h=0.18 , # (the usual stuff) xc=’PBE’) system.set_calculator (calc)

  • system. get_potential_energy ()
slide-6
SLIDE 6

Localized atomic orbitals in GPAW

Choosing basis functions — atomic orbitals

2 4 6 8 10 Radius [Bohr] Basis functions of Fe

4s 4s conf. 3d 3d conf.

◮ Solve spherical Kohn–Sham equations for isolated atom ◮ Use external potential to confine wavefunctions within some

cutoff

◮ Cutoff defined by requiring that each orbital increases in

energy a bit (e.g. 0.1 eV)

slide-7
SLIDE 7

Localized atomic orbitals in GPAW

Choosing basis functions

2 4 6 8 10 Radius [Bohr] Basis functions of Fe

4s 3d 4s-dz 3d-dz p polarization

◮ Obtain one atomic orbital from each valence state l, n by

solving radial atomic equation

◮ Add more functions with different radial parts ◮ Add more functions with different angular momentum

slide-8
SLIDE 8

Localized atomic orbitals in GPAW

Basis set quality

Basis set 15 14 13 12 11 H2 O total energy [eV] szp dz dzp tz qz tzp qzp dzdp tzdp qzdp tztp qztp fd

Reasonably optimized Not optimized at all!!

◮ Convergence of total energies with basis ◮ Basis sets are optimized only up to dzp! ◮ LCAO is better suited for structures ◮ (Note: Energy differences converge faster)

slide-9
SLIDE 9

Localized atomic orbitals in GPAW

Calculation procedure

Solve ∇2˜ vH(r) = −4π˜ ρ(r), ˜ ρ(r) = ˜ n(r) + atoms... O(N) Calculate Vµν =

  • Φ∗

µ(r)[˜

vH(r) + ˜ vxc(r) + ¯ v(r)]Φν(r) dr O(N) Calculate Hµν = Tµν + Vµν +

  • aij

P a∗

iµ ∆Ha ijP a jν

O(N) with: Tµν = Φµ| ˆ T|Φν , P a

iµ = ˜

pa

i |Φµ

O(N) Solve

  • ν

Hµνcνn =

  • ν

Sµνcνnǫn O(N3) Calculate ρνµ =

  • n

cνnfnc∗

µn

O(N3) Calculate ˜ n(r) =

  • µν

Φ∗

µ(r)Φν(r)ρνµ + ˜

ncore(r) O(N) (Repeat as necessary)

slide-10
SLIDE 10

Localized atomic orbitals in GPAW

Operation Parallelization Complexity Multigrid Poisson r O(N) Density ˜ n(r) r, σ O(N) XC ˜ vxc(r) r, σ O(N) Potential Vµν ν, r, σ, k O(N) Diagonalize Hµν µ, ν, σ, k O(N 3) Density matrix ρµν µ, ν, σ, k O(N 3)

1.0 1.2 1.4 1.6 1.8 2.0 2.2 2.4 2.6 log10(Number of atoms) −2.5 −2.0 −1.5 −1.0 −0.5 0.0 0.5 1.0 1.5 log10(time/scf step/seconds)

[1.26] Vµν, ˜ n(r) [0.71] xc [0.92] poisson [2.80] serial diag [2.56] parallel diag [2.75] ρµν

slide-11
SLIDE 11

Localized atomic orbitals in GPAW

Parallelization of O(N 3) operations

2 4 6 2 4 6 2 4 6 1 3 5 7 1 3 5 7 2 4 6 2 4 6 1 3 5 7 1 3 5 7 2 4 6 2 4 6 1 3 5 7 1 3 5 7

◮ Left: 2D block cyclic layout for diagonalization

Hµν, cµn, ρµν

◮ Right: 1D columnated layout

  • µν

Φ∗

µ(r)Φν(r)ρµν

→ ˜ n(r)

◮ Must transfer back and forth between two layouts

slide-12
SLIDE 12

Localized atomic orbitals in GPAW

Parallelization modes

◮ Parallelize over k-points/spins first (NK cores) ◮ Parallelize over domains next (ND = Nx × Ny × Nz) ◮ Parallelize over bands to use less memory (NB) ◮ Total number of CPUs should be NK × ND × NB ◮ CPUs for ScaLAPACK are taken within groups of ND × NB

Rules of thumb for LCAO calculations

◮ ScaLAPACK might help beyond 30–60 atoms ◮ ScaLAPACK operations require high bandwidth (run within

same node/infiniband)

◮ Parallelize a lot more over domains than bands ◮ Band parallelization helps reduce memory usage ◮ Band parallelization is useless without ScaLAPACK

slide-13
SLIDE 13

Localized atomic orbitals in GPAW

Parallelization

from ase.io import read from gpaw import GPAW system = read(’hundredsofatoms .traj ’) # Assume we have 32 cores calc = GPAW(mode=’lcao ’, basis=’dzp’, parallel=dict(domain =(2, 2, 4), band=2, sl_default =(4, 2, 64)), nbands = len(system) * 6, xc=’PBE’) system.set_calculator (calc)

  • system. get_potential_energy ()
slide-14
SLIDE 14

Localized atomic orbitals in GPAW

Example application

◮ Large numbers of similar calculations to investigate trends ◮ Study of reactivity of metal clusters of 20–200 atoms

slide-15
SLIDE 15

Localized atomic orbitals in GPAW

Application: Size effects in transition metal clusters

20 40 60 80 100 120 140 160 180 200 Number of atoms 6.0 5.5 5.0 4.5 4.0 3.5 3.0 2.5 O adsorption energy [eV]

Pd Rh Ru Au Ag

Figure: Adsorption energies of oxygen on different transition metal clusters

s1d7 s1d8 s1d9 s1d10 s2d10 Fe Co Ni Cu Zn Ru Rh Pd Ag Cd Os Ir Pt Au Hg

◮ Smooth variations

can be attributed to “geometric effects”

◮ Noble metals show

strong oscillations from electronic shell structure

slide-16
SLIDE 16

Localized atomic orbitals in GPAW

Conclusions

◮ LCAO calculations are quite fast ◮ Do mind the parallelization options ◮ We should work on improving basis sets ◮ Maybe some day we should implement sparse / iterative

eigensolver

◮ Thank you for listening!