Large-scale electronic structure calculations

Large-scale electronic structure calculations
Kristopher E. Andersen
Physics Department, UC Davis
John E. Pask
Condensed Matter Physics Division, LLNL
Acknowledgments
● Andrew Knyazev, U. Colorado
A
● Richard Lehoucq, SNL
● Warren Pickett, UC Davis
1/18
Scientific Problem
Computational Problem
Locally-Optimal Methods
Electronic Structure of Hydrogen
Problem
H nlm r =E n nlm r 
2
H =− ∇ V r 
321 r 
Solution
nlm r =R nl r Y lm  , 
−13.6
E n= 2
n
Source: http://library.wolfram.com/webMathematica/Physics/Hydrogen.jsp
2/18
Scientific Problem
Computational Problem
Locally-Optimal Methods
Density Functional Theory
The other DFT
Key idea
 i r 1, r 2, ... , r N  r 
E []=T []V ext []V hxc []
- Walter Kohn (Nobel Prize, 1998)
New Problem
Minimize
∂E
∂ r 
H n r = n n r 
2
H =−∇ V ext []V hxc []
1
r =
V
occ
∑ n r n r 
n
3/18
Scientific Problem
Computational Problem
Locally-Optimal Methods
Boundary Conditions
n k r =e
Twisted boundary conditions:
i k⋅r
u n k r 
(i.e., Bloch's theorem)
H k []u n k r = n k u n k r 
2
2
H k []=− ∇ −2 i k⋅∇k V ext []V hxc []
u n k r =u n k r R
n⋅∇ un k r =n⋅∇ un k rR
r ∈
4/18
Scientific Problem
Computational Problem
Locally-Optimal Methods
Computational Problem
Rayleigh-Ritz (Variational) Procedure
N
u n r =∑ x n i i r 
H x n= n S x n
H ∈ℂ
i=1
S ∈ℝ
H ij =〈i∣H ∣ j 〉
S ij =〈i∣ j 〉
 A x= B x
N×N
N ×N
... remember H = H [r ]
1
r =
V
occ
N
n
ij
∑ ∑ x n i x nj i r  j r 
5/18
Scientific Problem
Computational Problem
Locally-Optimal Methods
Self-Consistent Procedure
Initialize i n r   X =random
Construct H = H [i n r ]
●
solve Poisson's Equation ∇ 2 V h r =−4  i n r 
Solve H X =S X 
calculate out r 
●
i n r   mix {i n r  , out r }
6/18
Scientific Problem
Computational Problem
Locally-Optimal Methods
Eigenvalue Problem: Review
A x= B x
A∈ℂ
N×N
hermitian positive definite
B∈ℝ
N ×N
symmetric positive definite
N ~ 105106
3
4
●
Goal: Find the M ~ 10 10 lowest eigenpairs
● Use initial guesses
● Matrix free method desired
●

matrix-vector operations are cheap
7/18
Scientific Problem
Computational Problem
Locally-Optimal Methods
Locally-optimal Minimization
x k1= x k  k p k
p k =r  x k  k p k−1
Standard Minimization
k determined using
Bradbury-Fletcher or
Polak formulas
●
●
Locally-optimal Minimization
●
k determines using line
minimization
A. V. Knyazev, SIAM J. Sci. Comput. 23, 617 (2001)
Determine k, k using the
Rayleigh-Ritz procedure
on the subspace
[ x k , r  x k  , pk ]
8/18
Scientific Problem
Computational Problem
Locally-Optimal Methods
Implementation Issues
Block matrices [ X , H , P ]
● Deflation (soft-locking, hard-locking)
● Eigenvector buffer
● Index gymnastics to use initial guess
●
Robustness: does it work?
● Performance: preconditioning operator?
●
9/18
Scientific Problem
Computational Problem
Locally-Optimal Methods
Test Problem
System: Lithium (local pseudopotential)
● Fixed matrix: non-SCF calculation
● N ≈ 20,000 (nnz = 0.2%)
● M = 1000 (block size = 100)
-9
● 
=
10
TOL
-1
● Preconditioner: K ≈ A
●
∣r∣2
=
∣A x∣2
Linear dependence? B=[ X H P ]† B[ X H P ]
●
quantify using cond  B
10/18
Scientific Problem
Computational Problem
Locally-Optimal Methods
Robustness
Conjugate Gradient and Linear Dependence
11
588
11/18
Scientific Problem
Computational Problem
Locally-Optimal Methods
Robustness
Steepest descent, deflation, and 1000 eigenpairs
418
12/18
Scientific Problem
Computational Problem
Locally-Optimal Methods
Robustness
Subspace diagonalization
13/18
Scientific Problem
Computational Problem
Locally-Optimal Methods
Realistic Calculation
System: Silicon (conventional cell)
● SCF calculation
● N ≈ 12,000 (nnz = 0.3%)
● M = 16 (block size = 26)
-6
● 
=
10
TOL
●
Physically relevant finite-element mesh
●
∣r∣
=
∣A x∣
Preconditioning Operators
-1
● K ≈ A
using PCG linear solver
-1
● K ≈ (A -  B)
approximations
i
V. Notay, Numer. Linear Algebra Appl. 9, 21 (2002)
14/18
Scientific Problem
Computational Problem
Locally-Optimal Methods
Steepest Descent: Preconditioning
CG
SD with PCG
15/18
Scientific Problem
Computational Problem
Locally-Optimal Methods
Targeted Preconditoning
Steepest Descent
KA-1
K(A-iB)-1
Conjugate Gradient
KA-1
K(A-iB)-1
16/18
Scientific Problem
Computational Problem
Locally-Optimal Methods
SD vs CG
Too close to call
SD
CG
17/18
Conclusion
●
Locally-optimal methods show promise in
electronic structure calculations
●
“Targeted” preconditioning operator is preferred
●
Steepest descent is (surprisingly) competitive
Future Work
● Better preconditioning (operators + implementation)
● Comparisons to other methods!
This work was performed under the auspices of the U.S. Department of Energy by
University of California, Lawrence Livermore National Laboratory under Contract W-7405-Eng-48.
18/18