T SCFM AN E -B Aes12.wfu.edu/pdfarchive/poster/ES12_B_Gavin.pdfANONLINEAR EIGENSOLVER-BASED...

1
AN ONLINEAR E IGENSOLVER -B ASED A LTERNATIVE TO T RADITIONAL SCF M ETHODS B RENDAN G AVIN AND E RIC P OLIZZI U NIVERSITY OF M ASSACHUSETTS ,A MHERST [email protected], [email protected] P ROBLEM S OLVING THE K OHN -S HAM E QUATIONS H [n]x i = λ i Sx i , n = X i |x i | 2 Where H[n] is the typical Kohn-Sham Hamiltonian with (for our work here) spinless LDA approxima- tion, x i , λ i are eigenvector/eigenvalue pairs, n is the electron density, and S is the mass matrix re- sulting from a finite elements discretization. T RADITIONAL SCF The Kohn-Sham equations are traditionally solved using self-consistent field methods that follow the general procedure: 1. Find good initial guess n 1 (e.g. with Thomas- Fermi model) 2. Get n 0 = f (n i ), where f (n i ) is the procedure consisting of: (a) Forming the Kohn-Sham hamiltonian H[n i ] by solving poisson’s equation, cal- culating the exchange-correlation opera- tor, etc. (b) Solving the eigenvalue problem H [n i ]x i = λ i Sx i (c) Calculating the new density from the oc- cupied states x i 3. Form n i+1 from some function of n 0 and n i . If kn i+1 - f (n i+1 )k < then stop; otherwise GOTO step 2. S IMPLE M IXING : n i+1 = αn i + (1 - α)n 0 , 0 α 1 The value of α is determined heuristically. Typical α =0.1. Convergence is usually very slow. DIIS : A list of m densities is first produced using some other procedure (e.g. simple mixing), and then subsequent n i+1 are given by[2]: n i+1 = m X j =1 c j n i-j + c j r i-j , r i = n i - f (n i ) where c j are the coefficients that minimize k c j r j k such that c j =1 . Convergence is known to be super linear. A DVANTAGES Computational efficiency: The primary computa- tional costs of our method are mat-vec mul- tiplication and boundary condition assign- ment in solving Poisson’s equation, both of which can easily be parallelized. No Initial Guess: Our method converges on the correct result for arbitrary initial guess of density and subspace High Convergence rate: Our method converges significantly faster than DIIS, and the conver- gence rate remains high regardless of system size. N ONLINEAR E IGENSOLVER Our method is based on the FEAST algorithm[1], a method for solving linear eigenvalue problems. The nonlinear Kohn-Sham equations are solved in an approximate subspace Q, which is updated at each iteration: 1. Get initial guess for X , the matrix whose columns are the eigenvectors of interest x i , and n, either or both of which can be com- pletely random 2. Get density matrix ρ via numerical complex contour integration: ρ = H C (zS - H [n]) -1 dz, z C where C is a contour around the part of the real axis where the eigenvalues of the occu- pied states are expected to be found. 3. Form the subspace Q = ρSX 4. Solve the projected, reduced nonlinear eigen- vector problem Q T H [n]Qx q = λ q Q T SQx q by iterating over the density n. This pro- cecure is computationally inexpensive com- pared to performing the full SCF iteration. 5. Calculate x i = Qx q , λ i = λ q , and the new density. If λ i has converged, exit. Otherwise, GOTO step 2. R ESULTS The following is the result of testing done with LDA all-electron DFT using a third order finite elements discretization. The total energy residual, the relative difference between the calculated total energy at subsequent iterations, is used as the means of gauging convergence. 0 1 2 3 4 5 6 7 8 9 10 -14 10 -13 10 -12 10 -11 10 -10 10 -9 10 -8 10 -7 10 -6 10 -5 10 -4 10 -3 10 -2 Total Energy Residual H2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Iteration CO 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Nonlinear Solver DIIS C6H6 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Iteration 10 -14 10 -13 10 -12 10 -11 10 -10 10 -9 10 -8 10 -7 10 -6 10 -5 10 -4 10 -3 10 -2 10 -1 10 0 Total Energy Residual DIIS (Good guess) Good Initial Guess Initial Guess n=0.0 C6H6 Nonlinear Solver: Good Initial Guess Vs. Poor Initial guess C60 (Buckminsterfullerine): F UTURE W ORK Parallelize the solution of the subspace prob- lem Q T H [n]Qx q = λ q Q T SQx q . This will be- come the primary bottleneck for much larger systems. Update the FEAST package to provide a black-box interface for the algorithm de- scribed above. FEAST 2.0 currently provides black-box fuctionality for steps 2 and 3 de- scribed in "Nonlinear Eigensolver. http://www.ecs.umass.edu/polizzi/feast/ R EFERENCES [1] E. Polizzi, "Density-matrix-based algorithm for solving eigenvalue problems," Phys. Rev. B., vol 79 115112, Mar. 2009. [2] T. Rohwedder, R. Schneider, "An analysis for the DIIS acceleration method used in quantum chem- istry calculations," J. Math Chem.,Volume 49, Issue 9, pp 1889-1914, Oct2011.

Transcript of T SCFM AN E -B Aes12.wfu.edu/pdfarchive/poster/ES12_B_Gavin.pdfANONLINEAR EIGENSOLVER-BASED...

Page 1: T SCFM AN E -B Aes12.wfu.edu/pdfarchive/poster/ES12_B_Gavin.pdfANONLINEAR EIGENSOLVER-BASED ALTERNATIVE TO TRADITIONAL SCFMETHODS BRENDAN GAVIN AND ERIC POLIZZI UNIVERSITY OF MASSACHUSETTS,

A NONLINEAR EIGENSOLVER-BASED ALTERNATIVETO TRADITIONAL SCF METHODS

BRENDAN GAVIN AND ERIC POLIZZI UNIVERSITY OF MASSACHUSETTS, [email protected], [email protected]

PROBLEMSOLVING THE KOHN-SHAM EQUATIONS

H[n]xi = λiSxi , n =∑i

|xi|2

Where H[n] is the typical Kohn-Sham Hamiltonianwith (for our work here) spinless LDA approxima-tion, xi, λi are eigenvector/eigenvalue pairs, n isthe electron density, and S is the mass matrix re-sulting from a finite elements discretization.

TRADITIONAL SCFThe Kohn-Sham equations are traditionally solvedusing self-consistent field methods that follow thegeneral procedure:

1. Find good initial guess n1 (e.g. with Thomas-Fermi model)

2. Get n′ = f(ni), where f(ni) is the procedureconsisting of:

(a) Forming the Kohn-Sham hamiltonianH[ni] by solving poisson’s equation, cal-culating the exchange-correlation opera-tor, etc.

(b) Solving the eigenvalue problemH[ni]xi = λiSxi

(c) Calculating the new density from the oc-cupied states xi

3. Form ni+1 from some function of n′ and ni. If‖ni+1 − f(ni+1)‖ < ε then stop; otherwiseGOTO step 2.

SIMPLE MIXING:

ni+1 = αni + (1− α)n′ , 0 ≤ α ≤ 1

The value of α is determined heuristically. Typicalα = 0.1. Convergence is usually very slow.

DIIS:

A list of m densities is first produced using someother procedure (e.g. simple mixing), and thensubsequent ni+1 are given by[2]:

ni+1 =m∑j=1

cjni−j + cjri−j , ri = ni − f(ni)

where cj are the coefficients that minimize‖∑cjrj‖ such that

∑cj = 1 . Convergence is

known to be super linear.

ADVANTAGESComputational efficiency: The primary computa-

tional costs of our method are mat-vec mul-tiplication and boundary condition assign-ment in solving Poisson’s equation, both ofwhich can easily be parallelized.

No Initial Guess: Our method converges on thecorrect result for arbitrary initial guess ofdensity and subspace

High Convergence rate: Our method convergessignificantly faster than DIIS, and the conver-gence rate remains high regardless of systemsize.

NONLINEAR EIGENSOLVEROur method is based on the FEAST algorithm[1],a method for solving linear eigenvalue problems.The nonlinear Kohn-Sham equations are solved inan approximate subspace Q, which is updated ateach iteration:

1. Get initial guess for X , the matrix whosecolumns are the eigenvectors of interest xi,and n, either or both of which can be com-pletely random

2. Get density matrix ρ via numerical complexcontour integration:

ρ =∮C(zS −H[n])−1dz, z ∈ C

where C is a contour around the part of thereal axis where the eigenvalues of the occu-pied states are expected to be found.

3. Form the subspace Q = ρSX

4. Solve the projected, reduced nonlinear eigen-vector problem

QTH[n]Qxq = λqQTSQxq

by iterating over the density n. This pro-cecure is computationally inexpensive com-pared to performing the full SCF iteration.

5. Calculate xi = Qxq, λi = λq , and thenew density. If

∑λi has converged, exit.

Otherwise, GOTO step 2.

RESULTSThe following is the result of testing done with LDA all-electron DFT using a third order finite elementsdiscretization. The total energy residual, the relative difference between the calculated total energy atsubsequent iterations, is used as the means of gauging convergence.

0 1 2 3 4 5 6 7 8 910

-14

10-13

10-12

10-11

10-10

10-9

10-8

10-7

10-6

10-5

10-4

10-3

10-2

Tota

l E

ner

gy R

esid

ual

H2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Iteration

CO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Nonlinear SolverDIIS

C6H6

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Iteration

10-14

10-13

10-12

10-11

10-10

10-9

10-8

10-7

10-6

10-5

10-4

10-3

10-2

10-1

100

Tota

l E

ner

gy R

esid

ual

DIIS (Good guess)

Good Initial GuessInitial Guess n=0.0

C6H6Nonlinear Solver: Good Initial Guess Vs. Poor Initial guess

C60 (Buckminsterfullerine):

FUTURE WORK• Parallelize the solution of the subspace prob-

lem QTH[n]Qxq = λqQTSQxq . This will be-

come the primary bottleneck for much largersystems.

• Update the FEAST package to provide ablack-box interface for the algorithm de-scribed above. FEAST 2.0 currently providesblack-box fuctionality for steps 2 and 3 de-scribed in "Nonlinear Eigensolver.

http://www.ecs.umass.edu/∼polizzi/feast/

REFERENCES[1] E. Polizzi, "Density-matrix-based algorithm forsolving eigenvalue problems," Phys. Rev. B., vol 79115112, Mar. 2009.

[2] T. Rohwedder, R. Schneider, "An analysis for theDIIS acceleration method used in quantum chem-istry calculations," J. Math Chem.,Volume 49, Issue9, pp 1889-1914, Oct2011.