Comment on "Self-Averaging Stochastic Kohn-Sham Density-Functional Theory"
11 Comment on “Self-Averaging Stochastic Kohn-Sham Density-Functional Theory”
In a recent Letter [1], Baer et al. present a stochasticmethod for Kohn-Sham density functional theory (DFT)calculations. They converge the total energy per electron,
E/N , to determine the number of statistical samples, s .Self-averaging of E/N allows it to achieve constant errorwhile reducing s with increasing N . However, when usedas a convergence criterion, E/N does not guarantee theconvergence of quantities that do not self-average. Theirerrors relative to
E/N grow with N until saturating at alarge maximum error. This includes the electron density,atomic forces, and orbital energies, which the authorsclaim can be calculated reliably. When converging E/N ,computational costs exhibit novel sublinear scaling in N as s →
1, beyond which the cost scales linearly. If anynon-self-averaging values are converged, sublinear scalingceases and the cost prefactor increases significantly.The Letter calculates the stochastic expectation valueof X for N electrons on M grid points with s samples asTr s ( ρ X ) ≈ ( M/s ) (cid:88) si =1 v † i √ ρ q X √ ρ q v i , (1)where v i is a random unit vector, ρ is a density matrix, √ ρ q is a polynomial approximation of erfc[ β ( H − E F )]with degree q , H is the Hamiltonian, and E F is the Fermienergy. v i are sampled from the random-phase ensembleof vectors [2], which converges the standard error as (cid:15) s ( ρ X ) = | Tr s ( ρ X ) − Tr( ρ X ) | ≈ σ ( ρ X ) / √ s,σ ( ρ X ) = (cid:88) i (cid:0) | λ i ( √ ρ X √ ρ ) | − | [ √ ρ X √ ρ ] ii | (cid:1) , (2)where λ i ( √ ρ X √ ρ ) are the eigenvalues of √ ρ X √ ρ .From Eq. (2) it is evident that expectation values withsimilar magnitudes, Tr( ρ X ) ∼ Tr( ρ Y ), will not alwayshave similar standard errors, (cid:15) s ( ρ X ) ∼ (cid:15) s ( ρ Y ), if thespectra of X and Y differ. For E/N = Tr( ρ H /N ) ∝ σ ( ρ H /N ) ∝ / √ N from ∝ N eigenvalues of magnitude ∝ /N . Self-averaging is the reduction of σ with N . Forother Tr( ρ X ) ∝ σ ( ρ X ) ∝ ∝ ∝
1. They do not self-average, and converged
E/N does not imply their convergence for N (cid:29)
1. Thespatial structure of eigenvectors is irrelevant here. Theyare localized for the electron density and delocalized fororbital energies, but σ ∝ σ scaling on a simple-cubictight-binding model of cubic nanoparticles with 2 N sitesand hopping energy T in Fig. 1. Dimensionless values of σ for H /N T , a local energy density H i /T ( H = (cid:80) i H i , H i is hopping to and from site i ), an electron density D i ,and an ionization energy φφ † ( φ is the highest occupiedorbital) all match predictions. E/N shows self-averaging, σ ∝ / √ N , but the other quantities do not, σ ∝
1. Theerror in electron density increases with N until a ≈ . E/N convergence criterion. N -3 -2 -1 σ & † s (a) H i /Tφφ † D i H /NT N† =0 . (b) 10 N† =0 . (c) 10 N -1 t ( s ec ond s ) † =0 . (d) FIG. 1. (a) example σ values, (b) electron density errors,and (c,d) runtimes t [3]. In (b-d), we set s to converge either (cid:15) s ( H /NT ) ( (cid:72) ) or all four (cid:15) s values ( (cid:78) ) to a target standarderror (cid:15) . All tests use q = 600, βT = 30, and s min = 8. Based on runtimes in Fig. 1, s ∝ σ /(cid:15) , and t ∝ N per sample, convergence uses t ∝ max { (cid:15) − , N } for E/N and t ∝ (cid:15) − N for all values. With all values converged,the sublinear-to-linear crossover at s ∝ N ∝ (cid:15) − for E/N vanishes and the cost prefactor grows by (cid:15) − .Electron density errors cause errors in the Hartree andexchange-correlation potentials, which bias other values.For runtimes in the Letter, we estimate the increased costof converging the electron density. Density errors are notreported directly, but cause force errors of ≈ s ≈ . 0 .
05 eV/˚A is a representative stochastic forceerror in the literature [4], which will require s ≈ × here. Runtimes in Fig. 2 of the Letter are ≈ × − N s hours (at s ≈ × / √ N ) for the stochastic calculationsand ≈ − N hours for the conventional calculations.Using the estimated value for s , the stochastic methodbecomes faster at N ≈ N ≈ not self-average, which avoids the errors discussed here.Sandia National Laboratories is a multi-program lab-oratory managed and operated by Sandia Corporation,a wholly owned subsidiary of Lockheed Martin Corpora-tion, for the U.S. Department of Energy’s National Nu-clear Security Administration under contract DE-AC04-94AL85000.Jonathan E. Moussa ∗ and Andrew D. Baczewski Sandia National Laboratories, Albuquerque, NM 87185, USA ∗ [email protected] [1] R. Baer, D. Neuhauser, and E. Rabani, Phys. Rev. Lett. , 106402 (2013).[2] T. Iitaka and T. Ebisuzaki, Phys. Rev. E , 057701(2004).[3] See arXiv source files for implementation details.[4] A. Badinski and R. J. Needs, Phys. Rev. E , 036707(2007).[5] P. J. Reynolds, D. M. Ceperley, B. J. Alder, and W. A.Lester Jr., J. Chem. Phys. , 5593 (1982). a r X i v : . [ c ond - m a t . m t r l - s c i ] A p rr