# Numerical methods

Submitted
Fabian, M. D. ; Shpiro, B. ; Baer, R. Linear scalability of density functional theory calculations without imposing electron localization. arXiv:2108.13478 [physics] Submitted. Publisher's VersionAbstract

Linear scaling density functional theory approaches to electronic structure are often based on the tendency of electrons to localize even in large atomic and molecular systems. However, in many cases of actual interest, for example in semiconductor nanocrystals, system sizes can reach very large extension before significant electron localization sets in and the scaling of the numerical methods may deviate strongly from linear. Here, we address this class of systems, by developing a massively parallel density functional theory (DFT) approach which doesn't rely on electron localizationa and is formally quadratic scaling, yet enables highly efficient linear wall-time complexity in the weak scalability regime. The approach extends from the stochastic DFT method described in Fabian et. al. WIRES: Comp. Mol. Science, e1412 2019 but is fully deterministic. It uses standard quantum chemical atom-centered Gaussian basis sets for representing the electronic wave functions combined with Cartesian real space grids for some of the operators and for enabling a fast solver for the Poisson equation. Our main conclusion is, that when a processor-abundant high performance computing (HPC) infrastructure is available, this type of approach has the potential to allow the study of large systems in regimes where quantum confinement or electron delocalization prevents linear-scaling.

Shpiro, B. ; Fabian, M. D. ; Rabani, E. ; Baer, R. Forces from stochastic density functional theory under nonorthogonal atom-centered basis sets. arXiv:2108.06770 [physics] Submitted. Publisher's VersionAbstract

We develop a formalism for calculating forces on the nuclei within the linear-scaling stochastic density functional theory (sDFT) in a nonorthogonal atom-centered basis-set representation (Fabian et al. WIREs Comput Mol Sci. 2019;e1412. https://doi.org/10.1002/wcms.1412) and apply it to Tryptophan Zipper 2 (Trp-zip2) peptide solvated in water. We use an embedded-fragment approach to reduce the statistical errors (fluctuation and systematic bias), where the entire peptide is the main fragment and the remaining 425 water molecules are grouped into small fragments. We analyze the magnitude of the statistical errors in the forces and find that the systematic bias is of the order of \$0.065\textbackslash,eV/\textbackslashr\A\\$ (\$\textbackslashsim1.2\textbackslashtimes10ˆ\-3\E\_\h\/a\_\0\\$) when 120 stochastic orbitals are used, independently of systems size. This magnitude of bias is sufficiently small to ensure that the bond lengths estimated by stochastic DFT (within a Langevin molecular dynamics simulation) will deviate by less than 1% from those predicted by a deterministic calculation.

2021
Nguyen, M. ; Li, W. ; Li, B. (Y. ); Baer, R. ; Rabani, E. ; Neuhauser, D. Tempering stochastic density functional theory. J. Chem. Phys. 2021, 5.0063266. Publisher's VersionAbstract

We introduce a tempering approach with stochastic density functional theory (sDFT), labeled t-sDFT, which reduces the statistical errors in the estimates of observable expectation values. This is achieved by rewriting the electronic density as a sum of a "warm" component complemented by "colder" correction(s). Since the "warm" component is larger in magnitude but faster to evaluate, we use many more stochastic orbitals for its evaluation than for the smaller-sized colder correction(s). This results in a significant reduction of the statistical fluctuations and the bias compared to sDFT for the same computational effort. We the method's performance on large hydrogen-passivated silicon nanocrystals (NCs), finding a reduction in the systematic error in the energy by more than an order of magnitude, while the systematic errors in the forces are also quenched. Similarly, the statistical fluctuations are reduced by factors of around 4-5 for the total energy and around 1.5-2 for the forces on the atoms. Since the embedding in t-sDFT is fully stochastic, it is possible to combine t-sDFT with other variants of sDFT such as energy-window sDFT and embedded-fragmented sDFT.

Chen, M. ; Baer, R. ; Neuhauser, D. ; Rabani, E. Stochastic density functional theory: Real- and energy-space fragmentation for noise reduction. J. Chem. Phys. 2021, 154, 204108. Publisher's VersionAbstract

Stochastic density functional theory (sDFT) is becoming a valuable tool for studying ground-state properties of extended materials. The computational complexity of describing the Kohn–Sham orbitals is replaced by introducing a set of random (stochastic) orbitals leading to linear and often sub-linear scaling of certain ground-state observables at the account of introducing a statistical error. Schemes to reduce the noise are essential, for example, for determining the structure using the forces obtained from sDFT. Recently, we have introduced two embedding schemes to mitigate the statistical fluctuations in the electron density and resultant forces on the nuclei. Both techniques were based on fragmenting the system either in real space or slicing the occupied space into energy windows, allowing for a significant reduction in the statistical fluctuations. For chemical accuracy, further reduction of the noise is required, which could√be achieved by increasing the number of stochastic orbitals. However, the convergence is relatively slow as the statistical error scales as 1/ Nχ according to the central limit theorem, where Nχ is the number of random orbitals. In this paper, we combined the embedding schemes mentioned above and introduced a new approach that builds on overlapped fragments and energy windows. The new approach significantly lowers the noise for ground-state properties, such as the electron density, total energy, and forces on the nuclei, as demonstrated for a G-center in bulk silicon.

2020
Lee, A. J. ; Chen, M. ; Li, W. ; Neuhauser, D. ; Baer, R. ; Rabani, E. Dopant levels in large nanocrystals using stochastic optimally tuned range-separated hybrid density functional theory. Physical Review B 2020, 102, 035112. Publisher's Version
Zhang, X. ; Lu, G. ; Baer, R. ; Rabani, E. ; Neuhauser, D. Linear-Response Time-Dependent Density Functional Theory with Stochastic Range-Separated Hybrids. Journal of Chemical Theory and Computation 2020, 16, 1064–1072. Publisher's VersionAbstract

Generalized Kohn−Sham density functional theory is a popular computational tool for the ground state of extended systems, particularly within range-separated hybrid (RSH) functionals that capture the long-range electronic interaction. Unfortunately, the heavy computational cost of the nonlocal exchange operator in RSH-DFT usually conﬁnes the approach to systems with at most a few hundred electrons. A signiﬁcant reduction in the computational cost is achieved by representing the density matrix with stochastic orbitals and a stochastic decomposition of the Coulomb convolution (J. Phys. Chem. A 2016, 120, 3071). Here, we extend the stochastic RSH approach to excited states within the framework of linear-response generalized Kohn−Sham time-dependent density functional theory (GKS-TDDFT) based on the plane-wave basis. As a validation of the stochastic GKS-TDDFT method, the excitation energies of small molecules N2 and CO are calculated and compared to the deterministic results. The computational eﬃciency of the stochastic method is demonstrated with a two-dimensional MoS2 sheet (∼1500 electrons), whose excitation energy, exciton charge density, and (excited state) geometric relaxation are determined in the absence and presence of a point defect.

Dou, W. ; Chen, M. ; Takeshita, T. Y. ; Baer, R. ; Neuhauser, D. ; Rabani, E. Range-separated stochastic resolution of identity: Formulation and application to second-order Green’s function theory. The Journal of Chemical Physics 2020, 153, 074113. Publisher's VersionAbstract

We develop a range-separated stochastic resolution of identity (RS-SRI) approach for the four-index electron repulsion integrals, where the larger terms (above a predefined threshold) are treated using a deterministic RI and the remaining terms are treated using a SRI. The approach is implemented within a second-order Green’s function formalism with an improved O(N3) scaling with the size of the basis set, N. Moreover, the RS approach greatly reduces the statistical error compared to the full stochastic version [T. Y. Takeshita et al., J. Chem. Phys. 151, 044114 (2019)], resulting in computational speedups of ground and excited state energies of nearly two orders of magnitude, as demonstrated for hydrogen dimer chains and water clusters.

Arnon, E. ; Rabani, E. ; Neuhauser, D. ; Baer, R. Efficient Langevin dynamics for "noisy" forces. J. Chem. Phys. 2020, 152, 161103. Publisher's VersionAbstract

Efficient Boltzmann-sampling using first-principles methods is challenging for extended systems due to the steep scaling of electronic structure methods with the system size. Stochastic approaches provide a gentler system-size dependency at the cost of introducing "noisy" forces, which serve to limit the efficiency of the sampling. In the first-order Langevin dynamics (FOLD), efficient sampling is achievable by combining a well-chosen preconditioning matrix S with a time-step-bias-mitigating propagator (Mazzola et al., Phys. Rev. Lett., 118, 015703 (2017)). However, when forces are noisy, S is set equal to the force-covariance matrix, a procedure which severely limits the efficiency and the stability of the sampling. Here, we develop a new, general, optimal, and stable sampling approach for FOLD under noisy forces. We apply it for silicon nanocrystals treated with stochastic density functional theory and show efficiency improvements by an order-of-magnitude.

2019
Chen, M. ; Baer, R. ; Neuhauser, D. ; Rabani, E. Energy window stochastic density functional theory. The Journal of Chemical Physics 2019, 151, 114116. Publisher's Version
Dou, W. ; Takeshita, T. Y. ; Chen, M. ; Baer, R. ; Neuhauser, D. ; Rabani, E. Stochastic Resolution of Identity for Real-Time Second-Order Green’s Function: Ionization Potential and Quasi-Particle Spectrum. Journal of Chemical Theory and Computation 2019. Publisher's VersionAbstract

We develop a stochastic resolution of identity approach to the real-time second-order Green’s function (real-time sRI-GF2) theory, extending our recent work for imaginary-time Matsubara Green’s function [Takeshita et al. J. Chem. Phys. 2019, 151, 044114]. The approach provides a framework to obtain the quasi-particle spectra across a wide range of frequencies and predicts ionization potentials and electron affinities. To assess the accuracy of the real-time sRI-GF2, we study a series of molecules and compare our results to experiments as well as to a many-body perturbation approach based on the GW approximation, where we find that the real-time sRI-GF2 is as accurate as self-consistent GW. The stochastic formulation reduces the formal computatinal scaling from O(Ne5) down to O(Ne3) where Ne is the number of electrons. This is illustrated for a chain of hydrogen dimers, where we observe a slightly lower than cubic scaling for systems containing up to Ne ≈ 1000 electrons.

Cytter, Y. ; Rabani, E. ; Neuhauser, D. ; Preising, M. ; Redmer, R. ; Baer, R. Transition to metallization in warm dense helium-hydrogen mixtures using stochastic density functional theory within the Kubo-Greenwood formalism. Physical Review B 2019, 100. Publisher's VersionAbstract

Abstract The Kubo-Greenwood (KG) formula is often used in conjunction with Kohn-Sham (KS) density functional theory (DFT) to compute the optical conductivity, particularly for warm dense mater. For applying the KG formula, all KS eigenstates and eigenvalues up to an energy cutoff are required and thus the approach becomes expensive, especially for high temperatures and large systems, scaling cubically with both system size and temperature. Here, we develop an approach to calculate the KS conductivity within the stochastic DFT (sDFT) framework, which requires knowledge only of the KS Hamiltonian but not its eigenstates and values. We show that the computational effort associated with the method scales linearly with system size and reduces in proportion to the temperature unlike the cubic increase with traditional deterministic approaches. In addition, we find that the method allows an accurate description of the entire spectrum, including the high-frequency range, unlike the deterministic method which is compelled to introduce a high-frequency cut-off due to memory and computational time constraints. We apply the method to helium-hydrogen mixtures in the warm dense matter regime at temperatures of \textbackslashsim60\textbackslashtext\kK\ and find that the system displays two conductivity phases, where a transition from non-metal to metal occurs when hydrogen atoms constitute \textbackslashsim0.3 of the total atoms in the system.

Fabian, M. D. ; Shpiro, B. ; Rabani, E. ; Neuhauser, D. ; Baer, R. Stochastic density functional theory. Wiley Interdisciplinary Reviews: Computational Molecular Science 2019, 10.1002/wcms.1412, e1412. Publisher's VersionAbstract

Linear-scaling implementations of density functional theory (DFT) reach their intended efficiency regime only when applied to systems having a physical size larger than the range of their Kohn–Sham density matrix (DM). This causes a problem since many types of large systems of interest have a rather broad DM range and are therefore not amenable to analysis using DFT methods. For this reason, the recently proposed stochastic DFT (sDFT), avoiding exhaustive DM evaluations, is emerging as an attractive alternative linear-scaling approach. This review develops a general formulation of sDFT in terms of a (non)orthogonal basis representation and offers an analysis of the statistical errors (SEs) involved in the calculation. Using a new Gaussian-type basis-set implementation of sDFT, applied to water clusters and silicon nanocrystals, it demonstrates and explains how the standard deviation and the bias depend on the sampling rate and the system size in various types of calculations. We also develop a basis-set embedded-fragments theory, demonstrating its utility for reducing the SEs for energy, density of states and nuclear force calculations. Finally, we discuss the algorithmic complexity of sDFT, showing it has CPU wall-time linear-scaling. The method parallelizes well over distributed processors with good scalability and therefore may find use in the upcoming exascale computing architectures. This article is categorized under: Electronic Structure Theory \textgreater Ab Initio Electronic Structure Methods Structure and Mechanism \textgreater Computational Materials Science Electronic Structure Theory \textgreater Density Functional Theory

2018
Vlček, V. ; Baer, R. ; Rabani, E. ; Neuhauser, D. Simple eigenvalue-self-consistent ΔGW0. J. Chem. Phys. 2018, 149, 174107. Publisher's Version
Vlček, V. ; Li, W. ; Baer, R. ; Rabani, E. ; Neuhauser, D. Swift G W beyond 10,000 electrons using sparse stochastic compression. Phys. Rev. B 2018, 98, 075107. Publisher's Version
Hernandez, S. ; Xia, Y. ; Vlček, V. ; Boutelle, R. ; Baer, R. ; Rabani, E. ; Neuhauser, D. First-principles spectra of Au nanoparticles: from quantum to classical absorption. Molecular Physics 2018, 116, 2506–2511. Publisher's VersionAbstract

Absorption cross-section spectra for gold nanoparticles were calculated using fully quantum Stochastic Density Functional Theory and a classical Finite-Difference Time Domain Maxwell solver. Spectral shifts were monitored as a function of size (1.3–) and shape (octahedron, cubeoctahedron and truncated cube). Even though the classical approach is forced to fit the quantum time-dependent density functional theory at , at smaller sizes there is a significant deviation as the classical theory is unable to account for peak splitting and spectral blueshifts even after quantum spectral corrections. We attribute the failure of classical methods at predicting these features to quantum effects and low density of states in small nanoparticles. Classically, plasmon resonances are modelled as collective conduction electron excitations, but at small nanoparticle size these excitations transition to few or even individual conductive electron excitations, as indicated by our results.

2003
Neuhauser, D. ; Baer, R. A two-grid time-dependent formalism for the Maxwell equation. Journal of Theoretical & Computational Chemistry 2003, 2 537–546.
2002
Baer, R. ; Neuhauser, D. Shifted Contour Auxiliary Field Monte Carlo. In Recent Advances in Quantum Monte Carlo Methods II; W.A. Lester Jr., S. R. ; Tanaka, S., Ed.; World Scientific: Singapore, 2002; Vol. 3, pp. 279.
2001
Baer, R. Ab initio computation of molecular singlet-triplet energy differences using auxiliary field Monte Carlo. Chem. Phys. Lett. 2001, 343, 535–542.
Baer, R. ; Gould, R. A method for ab initio nonlinear electron-density evolution. J. Chem. Phys. 2001, 114, 3385–3392.Abstract

A numerical method is given for effecting nonlinear local density functional evolution. Within a given time interval, Chebyshev quadrature points are used to sample the evolving orbitals. An implicit equation coupling wave functions at the different time points is then set up. The equation is solved iteratively using the ‘‘direct inversion in iterative space’’ acceleration technique. Spatially, the orbitals are represented on a Fourier grid combined with soft pseudopotentials. The method is first applied to the computation of the 3Pg adiabatic potential energy curves of Al2 . Next, the electronic dynamics of a toy molecular wire is studied. The wire consists of a C2H4 molecule connected via sulfur atoms to two gold atoms, the ‘‘electrodes.’’ The molecule is placed in a homogeneous electric field and a dynamical process of charge transfer is observed. By comparing the transient with that of a resistance-capacitance circuit, an effective Ohmic resistance and capacitance is estimated for the system.

Baer, R. Nonlinear evolution of electronic density in molecules. In Multiscale computational methods in Chemistry and Physics; IOS Press: Amsterdam, 2001; Vol. 177, pp. 1.