In order to understand the implementation of the LEDO approximation for the XC contribution, it is instructive to give an outline of how this part is handled exactly. An overview of the algorithm used in TURBOMOLE has been given by
van W¨ullen [114]. The XC integrals that need to be evaluated for the setup of the KS matrix within the GGA approximation are given as [114]
Vxc,µν = Z dr δFxc δρ φµφν + 1 |∇ρ| δFxc δ|∇ρ|∇ρ · ∇(φµφν) . (3.4)
As described in Sec. 2.2, these integrals are solved by numerical quadrature on a grid. A special loop structure is used in the TURBOMOLE code to calculate the electron density [Eq. (2.16)] at the grid points rj
ρ(rj) =
X
µ,ν
Pµνφµ(rj)φν(rj) (3.5)
which takes advantage of the sparseness of the density matrix P as well as of the almost vanishing values of basis functions φµ(rj) in the time determining
steps [113, 114]. There are O(N ) grid points rj and O(N2) overlap densities
φµφν entering the expression for the electron density. Thus the computation
times formally scale as O(N3). However, there are only O(N ) significant overlap
densities in the asymptotic limit of very large molecules. Furthermore the (aver- age) number M of basis functions φµwhich have a non-negligible contribution to
a given grid point rj is essentially independent of the size of the molecule making
the computational effort per grid point a constant. The numerical quadrature thus effectively scales only linearly with the molecular size.
The LEDO approximation in a certain way implicitly exploits the sparseness of the density matrix as the electron density is expressed using only O(N ) atom- centered expansion functions [Eq. (2.119)],
ρ(rj) ≈
X
p
dpΩp(rj), (3.6)
reducing the formal scaling to O(N2). The (average) number MLEDOof expansion
functions Ωp which have a non-negligible contribution to a given grid point is
of course independent of the molecular size, as well. The asymptotical scaling behavior therefore is also linear. If, however, for each grid point MLEDO < M2, then the prefactor will be smaller for LEDO-DFT.
The elements of the density matrix P belonging to non-negligible overlap densities φµφν are stored in a linear array in TURBOMOLE and are addressed
the numerical quadrature routines [114] is outlined below (ωj are the quadrature
weights):
loop over all grid points j
calculate values φk and gradients ∇φk of those AO basis functions φµ
which contribute to the grid point j (1 ≤ k ≤ M ) calculate auxiliary vector sk =
M X l=1 Pklφl ρ = M X k=1 skφk, ∇ρ = 2 M X k=1 sk∇φk f1 = ωj δFxc δρ , f2 = ωj 1 |∇ρ| δFxc δ|∇ρ|
calculate auxiliary vectors tk = f2∇ρ · ∇φk and sk = f1φk+ tk
update KS matrix: HKS
kl = HklKS+ skφl+ tlφk
end loop
Note that only a small fraction of time is spent on the evaluation of the density functional itself and its (functional) derivatives. The XC energy and the integral of the electron density can also be evaluated at no extra cost [114].
The LEDO approximation requires only slight modifications of the algorithm sketched above. Since the set {ΩpA} of LEDO expansion functions on an atom
A is given by all one-center products of AO basis functions φµA and auxiliary
orbitals ηµA, one merely has to assure that the auxiliary orbitals ηµare known in
the subroutines for the numerical quadrature so that their values and gradients can be calculated. It should be mentioned that the use of auxiliary orbitals creates a computational overhead for this step, since the number M0 of non- negligible auxiliary orbitals at a given grid point simply adds to the number M of non-negligible AO basis functions. Instead of the density matrix P, the density vector d has to be handed over to the XC subroutines while the restriction of the summations to the one-center terms is simply achieved by an appropriate usage of the index vector mentioned above. Thus, in the present implementation all one- center elements of the XC part of the KS matrix as well as the respective auxiliary elements necessary to evaluate the two-center elements are obtained. In order to
save computation time, the one-center elements of the XC contribution are added to the one-center elements of the Hartree contribution which have been evaluated before and stored on the auxiliary vector v, so that all further operations can be executed for both contributions together. The one-center elements ˜Vh,xcA(AO) belonging to products of AO basis functions are then copied to the KS matrix and the near-linear dependent elements are removed from the auxiliary vector v. Next, the two-center matrix elements ˜VABh,xc of the approximated Hartree and XC potential are obtained from the one-center elements ˜Vh,xcA according to [Eq. (2.127)]
˜
Vh,xcAB = ˜Vh,xc[AB]†D[AB]= v †
[AB]D[AB] (3.7)
by just one call to the respective subroutine. In Eq. (3.7), ˜Vh,xc[AB] or v[AB] de-
note the vector of the one-center terms of atoms A and B. At this step both prescreening for small overlap densities ρµAνB (or atom pairs A > B) and the
near-linear dependences are taken into account. Once the SCF is converged, the linear independent one-center elements of ˜Vh,xc contained in the auxiliary vector
v are written to disk for later use in the gradient program.
Larger modifications to the numerical quadrature routines are necessary if auxiliary functions are to be employed instead of auxiliary orbitals. Nevertheless the changes are obvious and shall not be discussed in further detail here.