64

Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,
Page 2: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

Multiresolution Solution of Non-linear Integral Eigen-problems in

Electronic StructureGeorge I. Fann1, Zhengting Gan1, Robert J. Harrison1,2

1Oak Ridge National Laboratory2University of Tennessee, Knoxville

In collaboration with

Gregory Beylkin44University of Colorado

[email protected]

Page 3: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

3

The funding• This work is funded by the U.S. Department of Energy, the division of

Basic Energy Science, Office of Science, under contract DE-AC05-00OR22725 with Oak Ridge National Laboratory. This research was performed in part using

– the Molecular Science Computing Facility in the Environmental Molecular Sciences Laboratory at the Pacific Northwest National Laboratory under contract DE-AC06-76RLO 1830 with Battelle Memorial Institute,

– resources of the National Energy Scientific Computing Center which is supported by the Office of Energy Research of the U.S. Department of Energy under contract DE-AC03-76SF0098,

– and the Center for Computational Sciences at Oak Ridge National Laboratory under contract DE-AC05-00OR22725 .

Page 4: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

4

References• The methods in this work are primarily based upon

– Alpert, Beylkin, Grimes, Vozovoi (J. Comp. Phys., 2002)– B. Alpert (SIAM Journal on Mathematical Analysis 24, 246-262,

1993). – Beylkin, Coifman, Rokhlin (Communications on Pure and Applied

Mathematics, 44, 141-183, 1991.)– Beylkin and Mohlenkamp, (Proc. Nat. Acad. 2002)

• The following are useful further reading– Daubechies, “Ten lectures on wavelets”– Walnut, “An introduction to wavelets”– Meyer, “Wavelets, algorithms and applications”– Burrus et al, “Wavelets and Wavelet transforms”

Page 5: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

5

Multiresolution chemistry objectives• Complete elimination of the basis error

– One-electron models (e.g., HF, DFT)– Pair models (e.g., MP2, CCSD, …)

• Correct scaling of cost with system size• General approach

– Readily accessible by students and researchers– Higher level of composition – No two-electron integrals – replaced by fast

application of integral operators• New computational approaches • Fast algorithms with guaranteed precision

Page 6: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

6

Molecular electronic Schrödinger equation

• A 3-N dimensional, non-separable, second-order differential equation

• Practical approximations reduce to solving non-linear problems for single-particle (3D) and two-particle (6D) functions

1 2 1 2

212

1, 1, 1,1, 1, 1

( , , , ) ( , , , )

1n n

ii m i n i ni i j

N j i

H r r r E r r rZ

Hr r r r

μ

μμ

= = == = −

Ψ = Ψ

= − ∇ − +− −∑ ∑ ∑

K K

Page 7: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

7

“Independent” particle models

-20.44

-1.31

-0.67

-0.53

-0.48

• Atomic and molecular orbitals– Each electron feels the mean field of all other electrons (self-

consistent field, Hartree-Fock)– Replaces linear 3N-D Schrödinger w. non-linear 3-D eigen-problem– Provides the structure of the periodic table and the chemical bond– Linear combination of atomic orbitals - LCAO– E.g., molecular orbitals for water, H2O

Page 8: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

8

Density functional theory (DFT)• Hohenberg-Kohn theorem

– The energy is a functional of the density (3D) • Kohn-Sham

– Practical approach to DFT, parameterizing the density with orbitals (easier treatment of kinetic energy)

– Very similar computationally to Hartree-Fock, but potentially exact

( )212

2

( ; ) ( ; ) ( ) ( ) ( )

( ) ( )coul xc ext i i i

ii

V r V r V r r r

r r

ρ ρ φ ε φ

ρ φ

− ∇ + + + =

=∑

Page 9: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

9

Integral Formulation• Solving the integral equation

– Eliminates the derivative operator and related “issues”– Converges as fixed point iteration with no preconditioner

( )( )

( )

( )

212

12

2

2 2

2 *

* ( ) ( ) in 3D ; 24

k r s

V E

E V

G V

eG f r ds f s k Er sπ

− −

− ∇ + Ψ = Ψ

Ψ = − −∇ − Ψ

= − Ψ

= = −−∫

Such Green’s Functions (bound state Helmholtz, Poisson) can be rapidlyand accurately applied with a single, sparse matrix vector product.

Page 10: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

10

Essential techniques for fast computation

• Multiresolution

• Low-separation rank

• Low-operator rank

( ) ( )0 1

0 1 0 1

n

n n n

V V VV V V V V V −

⊂ ⊂ ⊂

= + − + + −

L

L

( )1

1 1

( )

2

( , , ) ( ) ( )

1 0

dMl

d l i il i

li l

f x x f x O

f

σ ε

σ= =

= +

= >

∑ ∏K

1( )

0 . .

rT

T T

A u v O

v v u u

μ μ μμ

μ μ λ μ λ μλ

σ ε

σ δ=

= +

> = =

Page 11: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

11

How to “think” multiresolution• Consider a ladder of function spaces

– E.g., increasing quality atomic basis sets, or finer resolution grids, …

• Telescoping series

– Instead of using the most accurate representation, use the difference between successive approximations

– Representation on V0 small/dense; differences sparse– Computationally efficient; possible insights

0 1 2 nV V V V⊂ ⊂ ⊂ ⊂L

0 1 0 2 1 1( ) ( ) ( )n n nV V V V V V V V −= + − + − + + −L

Page 12: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

12

Scaling Function Basis• Divide domain into 2n pieces (level n)

– Adaptive sub-division (local refinement)– lth sub-interval [l*2-n,(l+1)*2-n] l=0,…,n-1

• In each sub-interval define a polynomial basis– First k Legendre polynomials– Orthonormal, disjoint support

n=0

n=1

n=2l=0 l=1 l=2 l=3

/ 2

( ) 2 1 (2 1)

( ) 2 (2 )i in n nil i

x i P x

x x l

φ

φ φ

= + −

= −

Page 13: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

13

Multiwavelet Basis• An orthonormal basis to span

1 1n n nW V V− −= −

( )

( )

11 (0) (1)

2 2 10

11 (0) (1)

2 2 10

( ) ( ) ( )

( ) ( ) ( )

il

il

kn n n

ij j l ij j lj

kn n n

ij j l ij j lj

x h x h x

x g x g x

φ φ φ

ψ φ φ

−−

+=

−−

+=

= +

= +

Haar (piecewise constant basis)

( )( )

1 1/ 22 2

1 1/ 22 2

2

2

n nl l l

n nl l

n

nl

φ φ φ

ψ φ φ

− −

− −

= +

= −

sum

difference

Page 14: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

14

Vanishing moments• Critically important property

– Since Wn=Vn+1-Vn is orthogonal to Vn the first kmoments of functions in Wn vanish, i.e.,

• Compact representation of smooth functions– Consider Taylor series … the first k terms vanish and

smooth implies higher order terms are small• Compact representation of integral operators

– E.g., |r-s|-1 … interaction decays as r-2k-1

• Derivatives vanish at origin in Fourier space– Diminishes effect of singularities at that point

( ) 0, 0, , 1jix x dx j kψ = = −∫ K

Page 15: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

15

Truncation Error• To satisfy the global

error condition

• Truncate according to

• Above is rather conservative – often use

• For accurate function & derivative

22

nf f fε− ≤

/ 222

2n nld fε−≤

2

nld ε≤

22n n

ld ε−≤

Page 16: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

16

Page 17: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

17

Iterative solution scheme – v1

( ) ( )( ) ( ) ( ) ( )

( ) ( )

1

1 2

1

Suppose is the exact eigenfunction and we seek acorrection to an approximate eigenvalue

Left projection with yields

where

The correction to the

T V

T V T VV

V

T V

ψε

ψ ε ψ

ε ψ ε ψψ

ψ ψ ψ

ψ ε ψ

− −

Δ

= − − −Δ

= − − −Δ − +

Δ = − −

= − −

L

wavefunction is thenψδ ψψ

= −

Overall linear convergence

Error in eigenvalue is quadraticin error in wavefunction (forlinear problem) due to relatedvariational approach.

Page 18: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

18

1. destroys pure asymptotic form of eigenfunctions2. requires additional work to compute differential operator, and 3. requires the integral and differential operators to be consistent to desired precision4. solves for eigenfunctions which may be delocalized

Page 19: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

19

Strontium s orbitals

Page 20: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

20

Iterative Solution v1• Form update as described above• Use this as residual in inexact-Newton

(Krylov subspace) non-linear solver– Well preconditioned (residual is approximate

correction to solution)• Multiscale solution

– Solve to low precision at low resolution/threshold– Repeat at higher precision with tighter threshold

(analgous to h-p refinement)

Page 21: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

21

Iterative Solver v1• Works well for relatively small systems

– Typical #iterations 7, 3, 1, 1, … (k,ε) = (5,10-3), (7, 10-5), (9, 10-7), (11, 10-9), …

• Problems– Convergence stalls for large molecules

• hypothesized to be due to accidental degeneracy leading to poorly resolved rotations

• inconsistent handling of orthogonality constraints (enforced after making the updated)

– Inefficient for large molecules (esp. high symmetry) due to delocalized eigenvalues

– Often only need space spanned by the eigenfunctions

Page 22: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

22

Water dimer LDAaug-cc-pVTZ geometry, kcal/mol.

Basis Uncorrected BSSE Corrected

cc-pVDZ -11.733 -3.958 -7.775

cc-pVTZ -9.464 -1.654 -7.810

cc-pVQZ -8.708 -0.821 -7.888

aug-cc-pVDZ -8.187 -0.382 -7.805

aug-cc-pVTZ -7.992 -0.086 -7.906

aug-cc-pVQZ -7.995 -0.054 -7.941

ε=10-3 -6.483

ε=10-5 -7.932

ε=10-7 -7.943

Page 23: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

23

0

50

100

150

200

1 2 3

time/min

22.55*n^1.86

6.1*n+17.3*n^2

0

500

1000

1500

2000

0 10 20 30 40

time/s7.2*Z^1.520.506*Z+0.6334*Z^2

LDA scaling with Z and system size (energy ε=10-5)

Rare earth atoms Z=4,12,20,38 (C6H6)n MP2 aug-cc-pvTZ geometry

(H2O)n n=5,9 … t = O(n1.1)

Stacked benzene – MOs are delocalized by symmetry Water cluster – MOs are asymptotically localized

(long tail is smooth so is inexpensively treated)

Page 24: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

24

Iterative Solver v2

• Solve for a set of functions to span the space of the lowest N eigenfunctions– C.f., Bernholc, Yang, …– Choose computationally efficient resolution

• Maximally localized set• Strive for overall linear scaling

Page 25: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

25

( ), 1

1

Return to the variational form of the eigen-problem and introducethe Lagrangian inlcuding the orthonormality constraints.

In the linear case,

and in the non-linear case def

n

ij iji j

n

i

L E i j

E i H i

λ δ=

=

= − −

=

∑ine

2

Differentiation w.r.t. the eigenfunctions and multipliers0

0

i

jij

ij

E H i

H i j

i j

φ

λ

δ

∂=

− =

− =

∑ At this point normally invoke invarianceof trace or energy w.r.t. rotations and choose to diagonalize Λ

Page 26: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

26

2 2

2 2 2 2 3

A common approach to generating localized orthonormal orbitals is to solve

min

where for some positive operator .

(Identity - Niessen, square dipole - Boys, Coulomb - Edmiston

i j

i j

i j

i j M dr Mφ φ

=

( )( ) ( )( )

2 2

0

2

-Ruedenberg).This is equivalent to

max

A Newton iteration is readily constructed from an orthonormal rotation formed by exponentiating an antisymmetric matrix

4

i

K K K K

i

ji K

i i

K

W e i e i e i e i

W ji iik

Wk

=

=

∂=

∂∂

( )0

4 2 4ti si tjst ji K

js ii ji si si iik

δ δ δ=

= + +∂

Page 27: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

27

( ) ( )1

The integral equations becomes

0

0

where must be treated as a sparse matrix and a negative energyprobably best chosen as .With analogy to the conventiona

i i i i i j jij

i j ij

i

ii

r T Vφ ξ ξ φ φ λ

φ φ δ

ξλ

− ⎛ ⎞= + − − − =⎜ ⎟

⎝ ⎠

− =

Λ

l approach of diagonalizing the matrixrepresentation of the Hamiltonian, we first compute the residuals andthen solve in a least squares sense a linearized version of

0

0

fully maintaining

i

i

i j ij

r

r

φ φ δ

=

− =

the orthonormality constraints.After (during) determining this update, the orthonormal orbitals aresubjected to one (several) Newton iteration of the localization procedure.

Iterative Solver v2

Page 28: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

28

Electron correlation• All defects in the mean-field model are ascribed to

electron correlation• Consideration of singularities in the Hamiltonian

imply that for a two-electron singlet atom (e.g., He)

• Include the inter-electron distance in the wavefunction– E.g., Hylleraas 1938 wavefunction for He

– Potentially very accurate, but not systematically improvable, and (until recently) not computationally feasible for many-electron systems

211 2 12 12 12 122( , , ) 1 ( ) as 0r r r r O r rΨ = + + →

1 2( )1 2 12 12( , , ) (1 )r rr r r e arς− +Ψ = + +L

r1

r2

r12

Page 29: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

29

Conventional approach• The two-electron wave function is expanded as a

product of one-particle functions (orbitals)

• Can prove for atoms, that if saturate the atomic basis up to some angular momentum L, then

• Correlation consistent basis sets (Dunning) are currently the best choice – cost is

• Explicitly correlated wave functions yields• Fully numerical promises

1 2 1 2( , ) ( ) ( )ij i jij

r r c r rφ φΨ =∑

( ) 31corrE L −Δ ∝ +L d f g h

(L+1)-3 0.04 0.016 0.008 0.0046

4( )O ε −

2.4( )O ε −

1(log )O ε −

Page 30: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

30

x

y

|x-y|

|x-y| x-y

|x-y|

x-y

|x-y|

|x-y|

|x-y|

|x-y|

x-y

x-y

x-y

x-y

In 3D, ideally mustbe one box removedfrom the diagonal

Diagonal box hasfull rank

Boxes touching diagonal (face, edge,or corner) have increasingly low rank

Away from diagonalr = O(-log ε)

1( ) ( )

r

x y f x g yμ μμ=

− =∑r = separation rank

Page 31: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

31

Multiresolution solver of two-electron Schrödinger equation

• Wavefunction in 6-D multiresolution representation • Solve integral equation

– The 6D GF nominally has 12 indices! Separated representation of operator accurate and efficient

• Partly or fully use SVD to represent 6-D tensor coefficient sets– Blocks separated from the diagonal have low rank (1 or 2,

the full rank being k3) – Directly analogous to linear CI expansion but not global

• Can compute directly in this form, but other refinements make it much more practical

Page 32: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

32

Summary• Multiresolution in multi-wavelet bases

– Made practical in three and higher dimensions by separated representations

• Integral form of non-linear eigen-problem– Well preconditioned– Original formulation not consistent thru first order

with poor treatment of accidental degeneracies– New formulation

• consistent (?) • well resolved (must still treat ambiguity in localization)• hopefully much more efficient (O(N) ?)

Page 33: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

33

Separated form for integral operators

• Approach in current prototype code– Represent the kernel over a finite range as a sum of Gaussians

– Only need compute 1D transition matrices (X,Y,Z)– SVD the 1-D operators (low rank away from singularity)– Apply most efficient choice of low/full rank 1-D operator– Even better algorithms not yet implemented

2

', ', ' ' ' ' ( ) in 3D

( ) ( )

yx z

i

nlnl nlnlii jj kk i ii ii ii

i

t ri

i

r X Y Z O

K r e O

ω ε

ω ε−

= +

= +

* ( ) ( )T f dsK r s f s= −∫

Page 34: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

34

Accurate Quadratures

• Trapezoidal quadrature– Geometric precision for

periodic functions with sufficient smoothness.

2 2 2 2

2 2 2 2

/ 4

0

/ 4

2

2 s s

rx t t

x e e s

e e dtr

e ds

μμ

μ

π

π−

∞−− −

∞− − +

−∞

=

=

The kernel for x=1e-4,1e-3,1e-2,1e-,1e0. The curve for x=1e-4 is the rightmost

Page 35: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

35

Automatically generated representations ofexp(-30r)/r accurate to 1e-10, 1e-8, 1e-6, 1e-4, 1e-2 (relative error) for r in [1e-8,1] (92, 74, 57, 39 and 21 terms, respectively).

Low-energy scatteringstates also possible (but stronger dependence on range)

Periodic systems (cubic subgroups) straightforward.

Page 36: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

36

Current Capabilities• Open/closed shell Hartree-Fock and DFT

– Wide range of GGAs, hybrid (O(N) HF exchange), and asymptotically corrected functionals

– Energies and analytic derivatives– Full TDDFT and RPA for excitation energies *****– Abelian point groups– Parallel execution on shared memory computers – Interfaces to NWChem and GAMESS-US

• Working prototypes for computing in 6D– Direct solution of the pair equation for polyatomic

systems (initial target is basis-set limit MP2)

Page 37: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

37

Prototype code in use by …

• Hideo Sekino at Toyohashi, Japan– Benchmark calculations of base pair stacking– Electron transport in molecules

• Schaefer and Allen U. Georgia, Athens, USA– Benchmark HF energies and structures

• Tennant, U. Sheffield, England– New solvation models

Page 38: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

38

High-level composition using functions and operators

• Conventional quant. chem. uses explicitly indexed sparse arrays of matrix elements– Complex, tedious and error prone

• Python classes for Function and Operator– in 1,2,3,6 and general dimensions– wide range of operations Hpsi = -0.5*Delsq*psi+ V*psiJ = Coulomb.apply(rho)

• All with guaranteed speed and precision

212

( ) *( )

| |

H V

J r Gs ds

r s

ϕ ϕ ϕ

ρρ

= − ∇ +

=

=−∫

Page 39: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

39

New solver being developed• Working with localized orbitals

– O(1) application of operators to one orbital– O(N) computation of Coulomb potential (already)– O(N) computation of Fock-like matrices

• As a result of localized orbitals

– More robust convergence

• Near total rewrite in C++ – Two-levels of parallelism targeting massively

parallel computer using multi-processor nodes– In anticipation of highly-threaded processors

Page 40: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

40

1-D Example Sub-Tree Parallelism

0

1

2

3

4

5

6

Both sub-trees can be done in parallel. In 3-D nodes split into 8 children … in 6-D there are 64 children

Page 41: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

41

Next Generation Languages/Mechanisms

• X10 (IBM) (funded under DARPA HPCS)– Derivative of Java– Futures/Async(Dynamic Scheduling)– Var@Place (notion of locality)

• Chapel (Cray) (funded under DARPA HPCS)– Roots in ZPL, MTA stuff, and others– Futures– Domains (locality and scheduling)

• In both cases still waiting on a more complete/up-to-date language spec

Page 42: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

42

Futures

• Parallel language construct that simplifies parallel execution with a dependency upon result– Store an unevaluated expression in a variable of type

Future – May be executed by another thread as resources permit– Reference to the result forces it to be evaluated if it has

not yet been done so.• Implementation as templated C++ class with thread

pool (similar interface to Java)

Page 43: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

43

Recursive composition with Futures

void Function::_reconstruct(OctTreeT *t) {Tensor<double> ss = unfilter(t->data());

FORIJK(OctTreeT *child = t->child(i,j,k);if (child) {

child->data()…;_reconstruct(child);

}else {

t->insert_child(…);});

};

void Function::_reconstruct(OctTreeT *t) {Tensor<double> ss = unfilter(t->data());Future<void,Function,OctTreeT*> fut[2][2][2];FORIJK(OctTreeT *child = t->child(i,j,k);

if (child) {child->data()…;

fut[i][j][k].start(&Function::_reconstruct, this, child);}else {

t->insert_child(…);});

FORIJK( fut[i][j][k].force(); );};

Sequential Multithreaded

Page 44: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

44

Analytic removal of cusp(s)• Two-electron

Hamiltonian• Two-electron

wavefunction• Transformed

problem

• Choose u to eliminate singularity at r12=0• Quantum Monte Carlo calculations

– Best to eliminate all r1=0, r2=0, r12=0, r1=r2=r12=0

1 2 1 21 2

1 1 1( , )2 2

H V r rr r

= − Δ − Δ + +−

( )1 21 2 1 2( , ) ( , )u r rr r e r rφ−Ψ =

( )

( )( ) ( )

1 21 2 1 2

1 2

2

1 2

1 12 2

1 1 2

u u r re He ur r

V u u ur r

φ φ φ φ φ

φ

− −′= − Δ − Δ − ∇ −∇−

⎛ ⎞′ ′′ ′+ − + + −⎜ ⎟−⎝ ⎠

Page 45: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

45

Smoothed potential and wave function• Similarity-transformed Hamiltonian with correlation

factor (cf. transcorrelated Hamiltonian)– The effective wavefuntion Φ as well as the transformed

Hamiltonian is smoothed at r12=0

– Electron-electron repulsion is smoothed

( ) ( )

( ) ( ) ( )

12 12

121 2 1 2

ˆ

, ,

u r u r

u r

H e He

r r e r r

−=

Ψ = ΦCorrelation factor: u(r12)

( )( ) ( ) ( )

( ) ( )

212 12 12

12

1 212

1 1 21

u r u r u rr

r u r

′ ′ ′′− − −

→−′− ⋅ ∇ −∇

r r12 1 2

12r

Page 46: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

46

Smoothed interelectron potential• Correlation factor

– Jastrow

– Exponential

– Linear

( ) 1212

121aru r

br=

+

( ) ( )1212 1 bru r a e−= −

( )12 1212

u r r=

1/r12

Page 47: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

47

Solve for the correlation correction to the HF wavefunction

• The smoothed wavefunction is separated into Hartree-Fock wavefunction and its perturbation. – The perturbative wavefunction is numerically

smaller than Hartree-Fock wavefunction. ( ) ( ) ( )1 2 1 2 1 2, , ,HFr r r r r rδΦ = Φ + Φ

( )1 2 2, 1.0HF r rΦ =

( )1 2 2, 0.r rδ Φ ≈ 1 For He atom

Page 48: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

48

Preliminary results

for He atom

Variational E ΔE residual

-0.023 84-0.005 51-0.001 75-0.000 70-0.000 32-0.000 20

…-0.000 04

+0.000 00414 -2.903 77 -0.000 04 0.000 28

HF -2.861 61Iter. 0 -2.871 08 0.414 73

1 -2.894 92 0.017 282 -2.900 43 0.007 94

4 -2.902 88 0.002 02

6 -2.903 39 0.000 91… … …12 -2.903 73 0.000 3613 -2.903 73 0.000 32

3 -2.902 18 0.003 84

5 -2.903 20 0.001 25

Computational details:

- 5-th order multiwavelets- Wavelet threshold: 2×10-5

- SVD threshold: 2×10-6

- Exponential correlation factorPerturbative wavefunction:

- Maximum refinement: n=4

-Memory: 132M in full SVD form

-Energy is variational(small non-variational is just truncation err)

exact -2.903 74 (E(HF)=-2.861 68)

cc-pV6Z -2.903 48 (FCI) (E(HF)= -2.861 67)

Hylleraas (6 terms) -2.903 24Löwdin and Redei -2.895 4

Page 49: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

49

Coulomb hole (He)

Radial θ

Wav

efun

ctio

n (r

1,r2)

θ

r1=r2=0.5a0

0.25

0.27

0.29

0.31

0.33

0.35

0.37

-180 -120 -60 0 60 120 180

Hartree-Fock

W.F. (smoothed target function)

W.F. (multiplied by correlation factor)

Page 50: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

50

Summary• Multiresolution analysis provides a general

framework for computational chemistry– Accurate and efficient with high-level composition– Multiwavelets provide high-order convergence and

readily accommodate singularities/boundary conditions– General framework readily accessible to researchers– Real impact will be application to many-body models

• Separated form for operators and functions– Critical for efficient computation in higher dimension

• Precision is guaranteed– Excited states, non-linear response, …

Page 51: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

51

“Time-dependent” DFT

• Linear response to frequency dependent perturbation– Eigenvalues yield excitation energies

– Actually solve corresponding integral equation

( ) ( ) ( ) ( ) ( ) ( ) ( )0 0 0 †ˆˆ1occ

couli i j j i i

j

VF x r x r r r x rρ ε φ φ ωρ

⎡ ⎤⎛ ⎞∂ ′− − + ∗ =⎢ ⎥⎜ ⎟∂⎢ ⎥⎝ ⎠⎣ ⎦∑

Transition densityfor one excited state

Page 52: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

52

Low Separation Rank Representation

• Different from low operator rank– Identity has full operator rank, but unit separation rank

• Beylkin & Mohlenkamp Proc. Nat. Acad.2002– Many functions and operators have low sep. rank– E.g., Poisson GF; the many-electron Schrödinger Hamiltonian

• We are combining adaptive multires. & separated representations to compute in 6D

( )1

1 1

( )

2

( , , ) ( ) ( )

1 0

dMl

d l i il i

li l

f x x f x O

f

σ ε

σ= =

= +

= >

∑ ∏K

Page 53: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

53

Putting it all together –A path to O(N) exact MP2

• HF provably O(N) to arbitrary finite precision– Based upon the density matrix

(Geodecker, Beylkin and Coult)– Orbital-based schemes more expensive without

enforcing localization (e.g., Bernholc)

• Need an MP2 scheme based upon density matrices

Page 54: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

54

Characteristics of H and P• Hamiltonian

– Globally and locally has low separation rank– Globally has full operator rank– Locally off-diagonal blocks have low op-rank

• Density matrix has low separation & operator rank– Full density matrix has operator rank Nelec

– Local blocks of the density matrix have a much lower operator rank independent of Nelec

• Due to localization and orbitals being locally smooth

– E.g., water monomer 2.6, dimer 2.5, trimer 2.3 average off-diagonal block rank.

Page 55: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

55

Shotglass (not yet the holy grail)• Global separation of the Hamiltonian• Sign function (purification) iteration to

produce the density matrix

• Python classes (+ Fortran) • Working, but not practical

– Cost of maintaining LS form is too high– LS rank r is O(N) ... rank reduction costs O(r3)

( )0 2

31

/

3 / 2, 0,1,k k k

S F F

S S S k+

=

= − = K

Page 56: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

56

Efficient representation of the density matrix and Green’s Function

• Currently exploring these representations– Global low separation rank– Local low separation rank + NS/S forms– Local low operator rank + NS/S forms

Page 57: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

57

The Resolvent has low separation rank• Already known – Almlöf Laplace factorization

( ) ( )

( )

( )

( ) ( )

1

0

1

2

2

2

1/8 1/8

14

14

a b i j

a b i j

f i a f

ta b i j

Mt

ijab a b i j

ijab

t t

e dt

e

ij abE

i j a b

i e i a e a

μ

μ μ

ε ε ε ε

ε ε ε εμ

μ

μ μ μ μμ

ε ε ε εμ μ μ μ

ε ε ε ε

ω

ε ε ε ε

ω ω

∞− − + − −

− + − −

=

− − − −

+ − − =

= −+ − −

≈ −

= =

εi = Fock matrix eigenvalue

i,j = occupied statesa,b = unoccupied states

Page 58: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

58

Density matrix form of MP2

( )

0 0

2

1 11 3 2 4 1 3 2 4 12 34 1 2 3 4

2 3 2 3 2 3

( (1) ) ( (2)1/ 41 2

1 ( | ) 2( | ) ( | )41 2 ( , ) ( , ) ( , ) ( , )4

exchange1 2 ( , ) ( , ) exchange4

( , ) f

ijab

H t H

E i a j b i a j b i b j a

r r r r q r r q r r r r dr dr dr dr

V r r V r r dr dr

r r e e

μ μ μ μ μ μ μ μ μ μ μ μμ

μ μ μ μμ

μ μμ

εμ μ

ρ ρ

ρ ω

− −

= − −

= −

+

= − +

=

∑∫

∑∫)

1 2

12 3 1 3 1 3 12 1

( , )

1

( , ) ( , ) ( , )

f t r r

q

V r r r r q r r r dr

ε

μ μ μ

ρ

ρ

ρ

= −

= ∫

Page 59: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

The KS Green’s Function• Purification loses precision for all-electron

potential, has limited opportunity for parallelism, and requires full precision throughout

• GF approach is self-correcting, efficient (iterative solution of well-conditioned equations), and highly parallel

0 0( , '; ) ( , '; ) ( , ''; ) ( '') ( '', '; ) ''

1( , ') Im ( , '; )2

G r r E G r r E G r r E V r G r r E dr

r r G r r E dEμ

ρπ

−∞

= +

−=

∫Re E

Im E

Page 60: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

60

Summary

• Multiresolution analysis provides a general framework for computational chemistry– Accurate and efficient with high-level composition– Multiwavelets provide high-order convergence and

readily accommodate singularities and boundary conditions

– Real impact will be application to many-body models for which we must compute in 6D

• Separated form for operators and functions– Critical for efficient computation

Page 61: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

61

Linear Combination of Atomic Orbitals (LCAO)

• Molecules are composed of (weakly) perturbed atoms– Use finite set of atomic wave functions as the basis– Hydrogen-like wave functions are exponentials

• E.g., hydrogen molecule (H2)

• Smooth function ofmolecular geometry

• MOs: cusp at nucleuswith exponential decay

1 ( ) e

( ) e e

r

r a r b

s r

− − − −

=

= +

0

0.2

0.4

0.6

0.8

1

1.2

1.4

-2 -1 0 1 2

Page 62: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

62

LCAO• A fantastic success, but …• Basis functions have extended support

– causes great inefficiency in high accuracy calculations– origin of non-physical density matrix

• Basis set superposition error (BSSE)– incomplete basis on each center leads to over-binding as

atoms are brought together

• Linear dependence problems– accurate calculations require balanced approach to a

complete basis on every atom

• Must extrapolate to complete basis limit– unsatisfactory and not feasible for large systems

Page 63: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

63

Page 64: Multiresolution Solution of Non-bai/SIAMAN05/siam_harrison.pdfMultiresolution Solution of Non-linear Integral Eigen-problems in Electronic Structure George I. Fann 1, Zhengting Gan,

64

Scaling Function Basis - III21( ) , 0, ,3i x iφ = K

i=0

i=2i=3

i=1