Parallel Numerical Algorithms Chapter 7 Differential Equations - - PowerPoint PPT Presentation

parallel numerical algorithms
SMART_READER_LITE
LIVE PREVIEW

Parallel Numerical Algorithms Chapter 7 Differential Equations - - PowerPoint PPT Presentation

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods Parallel Numerical Algorithms Chapter 7 Differential Equations Section 7.4 Electronic Structure Calculations Edgar Solomonik


slide-1
SLIDE 1

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods

Parallel Numerical Algorithms

Chapter 7 – Differential Equations Section 7.4 – Electronic Structure Calculations Edgar Solomonik

Department of Computer Science University of Illinois at Urbana-Champaign

CS 554 / CSE 512

Edgar Solomonik Parallel Numerical Algorithms 1 / 27

slide-2
SLIDE 2

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods

Outline

1

Electronic Structure Calculations

2

Density Functional Theory Kohn–Sham Equations Solving the Kohn–Sham Equations

3

Hartree-Fock Method Self Consistent Field (SCF) Iteration Cost of Integral Computation

4

Post-Hartree-Fock Methods Configuration Interaction Møller-Plesset Perturbation Methods Coupled-Cluster Methods

Edgar Solomonik Parallel Numerical Algorithms 2 / 27

slide-3
SLIDE 3

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods

Electronic Structure Calculations

Models of chemical systems and processes calculate energies

  • f molecular configurations

Lowest-energy configurations describe electron distribution

Electrons occupy orbitals around each atom Their occupancy of a given orbital is probabilistic

The Born-Oppenheimer approximation is the separation of treatment of atomic and electronic distribution

This approximation is based on the radical difference in size and momentum of nuclei and electrons

Thus, electronic structure calculations typically focus on computing the free energy of electrons for a fixed configuration of atoms

Edgar Solomonik Parallel Numerical Algorithms 3 / 27

slide-4
SLIDE 4

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods

Electronic Hamiltonian

The interactions of a system of n electrons are encoded in a Hamiltonian operator H The wavefunction Ψ(x) and its energy E is the eigenfunction of the Hamiltonian with the smallest eigenvalue HΨ(x) = EΨ(x) x1, . . . , xn are the respective coordinates of the n electrons Ψ(x) is a probability density function describing the state

  • f the system of electrons

Ψ∗(x)Ψ(x) gives the probability of observing the electrons at locations x1, . . . , xn

Edgar Solomonik Parallel Numerical Algorithms 4 / 27

slide-5
SLIDE 5

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods

Time-Independent Schrödinger Equation

The Schrödinger equation describes electronic interactions Most often, a time-independent, nonrelativistic form is used In this case the n-particle Hamiltonian has the form H = − 1 2m

n

  • i=1

∇2

i + n

  • i=1

V (xi) +

n

  • i=1
  • j<i

U(xi, xj) The one-particle component V (xi) encodes interactions between electrons and atoms The two-particle component U(xi, xj) encodes electron–electron interactions Ψ is generally a function of all electrons, to obtain an approximate solution a simpler ansatz is often used

Edgar Solomonik Parallel Numerical Algorithms 5 / 27

slide-6
SLIDE 6

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods Kohn–Sham Equations Solving the Kohn–Sham Equations

Density Function Theory (DFT)

Density Functional Theory (DFT) Approximate wavefunction ansatz is a Hartree product of n single-particle wavefunctions Ψ(x1, . . . , xn) ≈ Ψ1(x1) · · · Ψn(xn) The electron (probability) density given this ansatz is

η(x) =

n

  • i=1
  • · · ·
  • (Ψ∗Ψ)(x)dx1 . . . dxi−1dxi+1 . . . dxn

n

  • i=1

Ψ∗

i (x)Ψi(x)

Hohenberg–Kohn theorem: one-to-one relationship between the energy density η and Ψ, ∃F so E = F(η(x)).

Edgar Solomonik Parallel Numerical Algorithms 6 / 27

slide-7
SLIDE 7

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods Kohn–Sham Equations Solving the Kohn–Sham Equations

Kohn–Sham Equations

The Kohn–Sham equations describe the action of the many-body Hamiltonian on the single-electron wavefunctions

  • − 1

2m∇2 + V (x) + VH(x) + VXC(x)

  • Ψi(x) = EiΨi(x)

Electron–electron replaced by electron–density potentials VH(x) is the Hartree potential holding Coulomb repulsion VXC(x) is an approximation to the exchange-correlation potential (including model for Pauli exclusion) The exchange-correlation potential VXC(x) has no known simple form Various approximations for VXC mix theory and heuristics

Edgar Solomonik Parallel Numerical Algorithms 7 / 27

slide-8
SLIDE 8

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods Kohn–Sham Equations Solving the Kohn–Sham Equations

Solving the Kohn–Sham equations

The Kohn–Sham equations give Ψi(x) as single particle wavefunctions = f(electron density) while the electron density η(x) is defined by electron density = g(single particle wavefunctions) DFT solves for these iteratively

1

Define an initial guess for the density η(0)(x)

2

Solve the Kohn–Sham equations with η(j)(x) to get Ψ(j)

i (x)

3

Calculate a new Kohn–Sham electron density η(j+1)(x) =

n

  • i=1

Ψ(j)

i (x)∗Ψ(j) i (x)

Edgar Solomonik Parallel Numerical Algorithms 8 / 27

slide-9
SLIDE 9

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods Kohn–Sham Equations Solving the Kohn–Sham Equations

Electron Density Representation

A basis is defined for the spatial domain to get a numerical representation of η(x) Plane waves provide harmonic representation (sparse/compact/local in Fourier basis) Gaussian (sparse/compact/local) functions local to orbitals

Typically lowest-energy configuration associates each electron with a single base orbital Compact support of basis functions enable sparse representations of single-electron wavefunctions If system is sufficiently large, potentials are well approximated by sparse representations

Edgar Solomonik Parallel Numerical Algorithms 9 / 27

slide-10
SLIDE 10

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods Kohn–Sham Equations Solving the Kohn–Sham Equations

Discretized Kohn-Sham Equations

Introduce a spatial basis {φ1, . . . , φm} for single-electron wavefunctions Ψi(x) =

m

  • µ=1

cµiφµ(x) The basis need not be orthonormal, and we generally have

  • verlap matrix S, where

sµν =

  • φµ(x)φν(x)dx

Density matrix D then given by η(j+1)(x) =

m

  • µ=1

m

  • ν=1

n

  • i=1

c∗

µicνi

  • dµν

φµ(x)∗φν(x)

Edgar Solomonik Parallel Numerical Algorithms 10 / 27

slide-11
SLIDE 11

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods Kohn–Sham Equations Solving the Kohn–Sham Equations

Discretized Kohn-Sham Equations

Projecting onto φµ(x) and integrating Kohn–Sham equations with Ψi(x) = m

ν=1 cνiφν(x), we get

  • φµ(x)∗

− 1 2m∇2 + V (x) + VH(x) + VXC(x)

  • Ψi(x)dx

= Ei

  • φµ(x)∗Ψi(x)dx

m

  • ν=1

fµνcνi = Ei

m

  • ν=1

sµνcνi so F C = SC    E1 ... En    The columns of C are obtained by solution of a generalized eigenvalue problem involving Fock matrix F

Edgar Solomonik Parallel Numerical Algorithms 11 / 27

slide-12
SLIDE 12

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods Kohn–Sham Equations Solving the Kohn–Sham Equations

DFT with a Plane Wave Basis Set

Every basis function in a plane wave basis set is based on a 3D periodic lattice in Fourier space The domain is treated as periodic, which makes physical sends for solids (less so for molecular system with heterogeneous structure) The Coulomb potential VH(x) and Laplace operator ∇2 are well-approximated in Fourier space Local potentials decay in real-space, motivating use of mixed representations

Edgar Solomonik Parallel Numerical Algorithms 12 / 27

slide-13
SLIDE 13

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods Kohn–Sham Equations Solving the Kohn–Sham Equations

DFT with Gaussian and Plane Waves

The simultaneous use of both Gaussian and plane wave bases gives the GPW method GPW split the potentials in the the Kohn-Sham equations into two parts

A short-range part that can be resolved using localized Gaussian basis functions A long-range part that is solved using fast methods in the plane-wave bases

Convergent sum ⇒ two rapidly convergent sums Methods like GPW provide algorithms for DFT that formally achieve linear scaling with system size

Edgar Solomonik Parallel Numerical Algorithms 13 / 27

slide-14
SLIDE 14

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods Kohn–Sham Equations Solving the Kohn–Sham Equations

Density Matrix as a Sign Function

Many other methods exist for solving the Kohn-Sham equations (for some representation of potential) Recent methods developed by leverage relationship between density matrix D, overlap matrix S, and Hamiltonian matrix H (component of the Fock matrix) D = (1/2)(I − sign(S−1H − µI))S−1 The sign function pushes the negative/positive eigenvalues to −1/ + 1 so sign(A) = A(A2)−1/2 = UΣ|Σ|−1U T

Edgar Solomonik Parallel Numerical Algorithms 14 / 27

slide-15
SLIDE 15

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods Kohn–Sham Equations Solving the Kohn–Sham Equations

Computing the Matrix Sign Function

The sign function sign(A) of symmetric matrix A is given by taking the eigenvalue decomposition A = UΣU T and replacing Σ with a diagonal matrix of signs Sign function can be found by repeated squaring Ai+1 = (1/2)Ai(3I − Ai)2 which converges quadratically to sign(A) = A(A2)−1/2 provided A0 = cA and c < ||A||−1 This method is done for DFT with screening of intermediate terms (discarding negligible matrix elements) to preserve sparsity in each Ai

Edgar Solomonik Parallel Numerical Algorithms 15 / 27

slide-16
SLIDE 16

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods Self Consistent Field (SCF) Iteration Cost of Integral Computation

Hartree–Fock Method

The Hartree–Fock (HF) method provides a more accurate representation of electron exchange HF is still a mean-field treatment that does not treat electron–electron interactions explicitly HF uses a Slater determinant as a wavefunction ansatz Ψ(x) ≈ det       Ψ1(x1) · · · Ψ1(x2) . . . . . . Ψn(x1) · · · Ψn(xn)       This wavefunction ansatz is an antisymmetrized Hartree product (DFT wavefunction ansatz) The antisymmetry (any permutation yields to a sign flip) allows the wavefunction to satisfy Pauli exclusion

Edgar Solomonik Parallel Numerical Algorithms 16 / 27

slide-17
SLIDE 17

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods Self Consistent Field (SCF) Iteration Cost of Integral Computation

Self Consistent Field Iteration

HF is solved by the Self Consistent Field (SCF) iteration, which is very similar to DFT For density matrix D, the Fock matrix is given by fµν = hcore

µν

+

  • λσ

dλσ(2(µν|λσ) − (µλ|νσ)) where hcore

ij

is the core-Hamiltonian and (µν|λσ) are the electron–repulsion integrals Due to explicit calculation of exchange terms (µλ|νσ), Fock matrix construction is more expensive in HF than DFT SCF iteratively computes F from D then D from solutions to the generalized eigenproblem with F

Edgar Solomonik Parallel Numerical Algorithms 17 / 27

slide-18
SLIDE 18

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods Self Consistent Field (SCF) Iteration Cost of Integral Computation

Electron-Repulsion Integral Computation

A key computational bottleneck in Hartree-Fock is calculation of the electron–repulsion integrals (ERI tensor) These are generally screened so a subset is computed An integral (µν|λσ) is derived from Dab where {a, b} ∈ {µ, ν, λ, σ} and contributes to each Fab Both F and D are symmetric so we consider 4

2

  • = 6

permutations If we compute a 4D block of (µν|λσ) of size s, require Θ(√s) entries of F and D Thus computing the O(n4) elements of the ERI tensor with p processors can be done with O(n2/√p) communication For sufficiently large systems, suffices to keep O(n2) terms

Edgar Solomonik Parallel Numerical Algorithms 18 / 27

slide-19
SLIDE 19

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods Configuration Interaction Møller-Plesset Perturbation Methods Coupled-Cluster Methods

Configuration Interaction

Hartree-Fock represents an n-electron wavefunction using a determinant of n basis functions Given a basis set of m > n functions (orbitals), we can define m

n

  • Slater determinants of n-electrons, which

‘occupy’ different subsets of functions (orbitals) Configuration-interaction (CI) works on a basis that includes all m

n

  • combinations

Eigendecomposition of the resulting matrix (dimension exponential in m) gives exact solution to electronic Schrödinger equation for given basis Quantum Monte Carlo methods select a subset of determinants by using weighted sampling

Edgar Solomonik Parallel Numerical Algorithms 19 / 27

slide-20
SLIDE 20

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods Configuration Interaction Møller-Plesset Perturbation Methods Coupled-Cluster Methods

Møller-Plesset Perturbation Theory

Møller-Plesset perturbation methods, modify the Hamiltonian slightly to take into account some ‘excited-state’ configurations Brillouin theorem – single-electron excitations have no integral affect (first-order perturbation is analytically zero) MP2 and MP3 are second and third order perturbations MP2 can be computed directly from the ERI tensor as a correction, requiring O(n4) cost MP3 requires a tensor contraction between two order four tensors, requiring O(n6) cost The dominant part of the cost in MP3 is the tensor contraction, which can be done by matrix-matrix multiplication

Edgar Solomonik Parallel Numerical Algorithms 20 / 27

slide-21
SLIDE 21

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods Configuration Interaction Møller-Plesset Perturbation Methods Coupled-Cluster Methods

Coupled-Cluster Theory

A more computationally robust alternative to CI is presented by coupled-cluster (CC) methods CC methods try to take into account electron correlation, by taking into account all possible excitations of k electrons

CCSD: (singles and doubles) k = 2, O(n6) cost CCSDT: (singles, doubles, and triples) k = 3, O(n8) cost CCSDTQ: (... and quadruples) k = 4, O(n10) cost

CC methods use a wavefunction ansatz of the form Ψ ≈ eT1+···+TkΨ0 where Ψ0 is the HF Slater determinant The exponential is expanded in polynomial form and truncated, resulting in a set of tensor contractions that define possible electron state transitions

Edgar Solomonik Parallel Numerical Algorithms 21 / 27

slide-22
SLIDE 22

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods Configuration Interaction Møller-Plesset Perturbation Methods Coupled-Cluster Methods

Coupled-Cluster Calculation

Coupled-cluster and related methods are dominated by matrix-multiplication (tensor contractions) The tensor representations have antisymmetry Methods attempt to lower complexity by leveraging sparsity

  • r low rank structure

Density Fitting Resolution of Identity Tensor Hypercontraction, etc.

Edgar Solomonik Parallel Numerical Algorithms 22 / 27

slide-23
SLIDE 23

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods Configuration Interaction Møller-Plesset Perturbation Methods Coupled-Cluster Methods

Sources of Parallelism in Quantum Chemistry

DFT and SCF methods often use dense linear algebra

Symmetric (generalized) eigenvalue problem Matrix multiplication, QR, Fourier transform

Localized bases can introduce sparsity (e.g. GPW)

Sparse matrix products and eigenvalue problems

Integral calculation can be done effectively in parallel (some load balance challenges with screening) Tensor contractions in post-HF methods are parallelizable

Tensor transposition or in-place contraction pose data-layout transformation challenges

Edgar Solomonik Parallel Numerical Algorithms 23 / 27

slide-24
SLIDE 24

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods

General References

David Sherril’s online notes: http://vergil.chemistry.gatech.edu/notes/ Helgaker, Trygve, Poul Jorgensen, and Jeppe Olsen. Molecular electronic-structure theory. John Wiley and Sons, 2014. Szabo, Attila, and Neil S. Ostlund. Modern quantum chemistry: introduction to advanced electronic structure theory. Courier Corporation, 2012.

Edgar Solomonik Parallel Numerical Algorithms 24 / 27

slide-25
SLIDE 25

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods

References

Pople, John A., Peter MW Gill, and Benny G. Johnson. Kohn–Sham density-functional theory within a finite basis set. Chemical physics letters 199.6 (1992): 557-560. Liu, Xing, Aftab Patel, and Edmond Chow. A new scalable parallel algorithm for Fock matrix construction. Parallel and Distributed Processing Symposium, IEEE 28th International, 2014. Auckenthaler, Thomas, et al. Parallel solution of partial symmetric eigenvalue problems from electronic structure calculations. Parallel Computing 37.12 (2011): 783-794.

Edgar Solomonik Parallel Numerical Algorithms 25 / 27

slide-26
SLIDE 26

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods

References

VandeVondele, Joost, et al. Quickstep: Fast and accurate density functional calculations using a mixed Gaussian and plane waves

  • approach. Computer Physics Communications 167.2 (2005): 103-128.

Enkovaara, J. E., et al. Electronic structure calculations with GPAW: a real-space implementation of the projectoraugmented-wave method. Journal of Physics: Condensed Matter 22.25 (2010): 253202. Hutter, Jürg, et al. CP2K: atomistic simulations of condensed matter

  • systems. Wiley Interdisciplinary Reviews: Computational Molecular

Science 4.1 (2014): 15-25. Head-Gordon, Martin, John A. Pople, and Michael J. Frisch. MP2 energy evaluation by direct methods. Chemical Physics Letters 153.6 (1988): 503-506.

Edgar Solomonik Parallel Numerical Algorithms 26 / 27

slide-27
SLIDE 27

Electronic Structure Calculations Density Functional Theory Hartree-Fock Method Post-Hartree-Fock Methods

References

Purvis III, George D., and Rodney J. Bartlett. A full coupled–cluster singles and doubles model: the inclusion of disconnected triples. The Journal of Chemical Physics 76.4 (1982): 1910-1918. Hohenstein, Edward G., Robert M. Parrish, and Todd J. Martìnez. Tensor hypercontraction density fitting. I. Quartic scaling second-and third-order Møller-Plesset perturbation theory. The Journal of Chemical Physics 137.4 (2012): 044103. Ren, Xinguo, et al. Resolution-of-identity approach to Hartree–Fock, hybrid density functionals, RPA, MP2 and GW with numeric atom-centered orbital basis functions. New Journal of Physics 14.5 (2012): 053020. Manby, Frederick R. Density fitting in second-order linear-r12 Møller–Plesset perturbation theory. The Journal of chemical physics 119.9 (2003): 4607-4613.

Edgar Solomonik Parallel Numerical Algorithms 27 / 27