betaFeedback

WorksPhysics and Astronomy

Exchange-Correlation Potentials and Energies from Inverse Generalized Kohn-Sham Calculations

Abstract

The Kohn-Sham (KS) formulation of density functional theory (DFT) is a map from the many-electron problem to an effective single-electron problem that is governed by a local multiplicative potential. The generalized-Kohn-Sham (GKS) formalism extends it to permit any single-electron operator—nonlocal, local non-multiplicative, local multiplicative, or any combination of them. Doing so expands the scope and ease of modeling the exchange-correlation (XC) functional in DFT, which encodes the complicated many-electron interactions into a mean-field of the electron density. However, unlike KS theory, development of XC functionals in GKS theory has been hindered by the absence of corresponding exact XC potentials and energies. We present the exact XC potentials and energies for atoms and molecules by solving the inverse GKS problem, using highly accurate correlated ab initio densities. Our approach is validated across weakly and strongly correlated systems. We further examine a common, yet untested, assumption that KS and GKS correlation potentials and energies are similar, finding instead that they differ substantially in strongly correlated systems. Overall, this work offers a powerful tool to model next-generation of XC functionals within the GKS formalism of DFT.

Introduction

Density functional theory (DFT) is one of the most consequential development in electronic structure theory. It remains the most popular electronic structure method, predicting a range of properties of atoms, molecules, and solids [1]. DFT establishes all groundstate properties of materials as a universal functional of the groundstate electron density (ρ(r)\rho(\mathbf{r})) [2]. Practically, its prowess is realized through the construction of an auxiliary system of non-interacting electrons, called the Kohn-Sham (KS) system, which yields the same groundstate density as the interacting system [3]. The KS formalism reduces the interacting many-electron problem to an effective single electron problem, where the electrons interact through a mean-field potential defined in terms of the electron density (ρ(r)\rho(\mathbf{r})) and termed as the Kohn-Sham potential (vKS[ρ](r)v_{\mathrm{KS}}[\rho](\mathbf{r})). The most vital ingredient in vKSv_{\mathrm{KS}} is the exchange-correlation (XC) potential (vxcv_{\mathrm{xc}}), which encapsulates the quantum many-body interaction between the electrons as a universal functional of the density (ρ\rho). The exact form of vxcv_{\mathrm{xc}} is unknown, needing approximations. Although many useful approximations have been proposed over the past 50 years, DFT still remains far from the chemical accuracy attained through quantum many-body methods, such as configuration interaction (CI) [4], coupled-cluster (CC) [5], or quantum Monte Carlo (QMC) [6]. Thus, the all-important challenge in DFT is to model better XC functionals.

The quest for better XC has led to a new auxiliary system, called the generalized Kohn-Sham (GKS) system [7]. Similar to the KS system, the the GKS system is still an effective single electron system, and hence, defined via a single or ensemble of degenerate Slater determinants, termed as the GKS Slater determinant. However, unlike the local multiplicative nature of the mean-field potential (vKSv_{\mathrm{KS}}) in the KS formalism, the GKS formalism allows for any single electron operator defined in terms of the GKS Slater determinant. The prototypical GKS system is defined by the “hybrid” XC functional (e.g., B3LYP [8, 9, 10], PBE0 [11]), where the single electron operator involves a fraction of the nonlocal exact (Hartree-Fock) exchange operator and a local multiplicative potential. A more recent GKS system is defined by the meta-GGA XC functional (e.g., SCAN [12], r2SCAN [13], etc.), where the single electron operator includes a combination of local multiplicative potential and a local non-multiplicative operator, such as the derivative operator. It is easy to see that the KS system is a special case of the GKS formalism. The GKS formalism enjoys both conceptual and practical advantages over the KS formalism. First, GKS, by construction, provides greater flexibility in designing XC functionals. Second, the ability to explicitly use the KS Slater determinant allows to embed a large portion of known electronic interactions, and hence, ease the modeling of the remainder XC functional. These advantages of the GKS formalism reflects in their superior accuracies in a wide range of thermochemical [14] and solid-state [15] properties.

Despite the success of GKS formalism, fundamental deficiencies, such as self-interaction and static correlation errors still persist [16]. As a result, XC functionals that offer chemical accuracy for both weakly and strongly correlated systems still remain elusive. To that end, the inverse DFT problem [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35] of determining the exact XC potential (vxcv_{\mathrm{xc}}) corresponding to a given electron density (ρ(r)\rho(\mathbf{r})), typically obtained from accurate quantum many-body methods (e.g., CI, CC, or QMC), provides a powerful framework for studying the nature of the XC functional [36]. Recently, the inverse DFT problem has also been instrumental in providing high-fidelity data to machine-learn accurate XC functionals [37, 38]. However, almost all attempts at inverse DFT are done within the KS formalism. The only attempt at inverse DFT within GKS formalism [39] is limited to single atoms and ions, where the spherically symmetry reduces the 3D problem to 1D radial problem. Thus, a generic 3D inverse GKS method that is applicable to polyatomic systems is lacking. This work seeks to fill that gap.

Inverse GKS poses several numerical and computational challenges. Computationally, inverse GKS is far more challenging than inverse KS, as it demands the evaluation of the nonlocal exchange operator. Numerically, it suffers from three sources of ill-posedness, all of which are inherited from the much simpler inverse KS problem. The ill-posedness, in turn, leads to unphysical and/or non-unique potentials. The first source of ill-posedness stems from the finite (incomplete) nature of the atomic orbital (AO) basis (e.g., Gaussian or Slater basis). The finite basis can lead to artificial small eigenvalues in the discrete GKS linear response function χGKS(r,r′)=δρ(r)δvxc(r′)\chi_{\mathrm{GKS}}(\mathbf{r},\mathbf{r}') = \frac{\delta\rho(\mathbf{r})}{\delta v_{\mathrm{xc}}(\mathbf{r}')}, which measures the change in the density due to a perturbation in XC potential. In other words, finite basis permit certain highly oscillatory perturbations to the vxcv_{\mathrm{xc}} which leaves the density unchanged. The second source of ill-posedness lies in the, often, “unbalanced” nature of the orbital and potential basis. Given a basis {Ni}\{N_i\} for the GKS orbitals, all vxcv_{\mathrm{xc}}’s for which the matrix Vij=∫Ni(r)vxc(r)Nj(r) drV_{ij} = \int N_i(\mathbf{r})v_{\mathrm{xc}}(\mathbf{r})N_j(\mathbf{r})\,\mathrm{d}r are the same yields the same density. This ill-posedness can, to a large extent, be alleviated by using a “balanced” potential basis: a potential basis that has no component orthogonal to the space spanned by the product of the orbital basis (i.e., space spanned by NiNjN_iN_j). The third source of inaccuracy stems from the the target density itself. The target density from quantum many-body methods (e.g., CI, CC), being represented in a Gaussian or Slater basis, do not accurately define the densities near the nuclei and can exhibit incorrect decay (e.g., Gaussian decay instead of exponential decay when using Gaussian basis). These incorrect asymptotics often induce spurious oscillations in the resulting XC potentials.

We address the above numerical and computational challenges through a combination of finite-element (FE) basis and adaptively compressed exchange (ACE) method. The FE basis, being systematically convergent, makes the discrete GKS linear response (χGKS\chi_{\mathrm{GKS}}) closer to the continuous, and hence, avoids any artificial small eigenvalues. The FE basis also allows for “balanced” potential basis owing to its flexibility of the polynomial order of the basis. To elaborate, we use higher-order (polynomial order 4-5) finite-elements for the orbital basis and linear finite-elements (polynomial order 1) for the potential basis. This ensures that the no component of the potential basis is orthogonal to the product of the orbital basis. Lastly, as will be discussed later, the FE basis can be used to also resolve artifacts arising from incorrect asymptotic behavior in the target density [27, 40, 41]. The ACE method [42] allows for efficient evaluation of the action of the nonlocal exchange operator on a set of orbitals, thereby making inverse GKS calculations computationally feasible. We demonstrate the robustness and accuracy of our proposed approach on a range both weakly and strongly correlated molecules. These advances allow us to test a conventional yet, largely untested, assumption that the KS and GKS XC potentials and mean-field energies (sum of non-interacting kinetic, electrostatic, and exchange energies) are similar to one another. We find that, while this assumption holds for weakly correlated systems, it breaks down significantly for strongly correlated systems (e.g., stretched molecules). All these advances for inverse GKS are implemented within a development branch of the massively parallel CPU-GPU invDFT software package [43]. We refer to Figure 1 for an overview of the work. We envisage the combination of the exact XC potentials, exact XC energies, and the GKS orbitals resulting from our approach to serve as high fidelity training data to machine-learn accurate XC functional that can significantly boost the predictive powers of DFT in chemical, physical, and materials sciences.

Schematic of the inverse GKS problem and nested loops in the inverse GKS

Figure 1. Top panel: Schematic of the inverse GKS problem. Here the inversion is restricted to the prototypical GKS system containing a fraction (α\alpha) of the exact exchange operator. Bottom panel: A schematic of the nested loops in the inverse GKS.

Results

Inverse GKS Formalism

Given a target groundstate density ρdata(r)\rho_{\mathrm{data}}(\mathbf{r}) and a prescribed nonlocal or local non-multiplicative operator, the inverse GKS problem is to determine the local multiplicative XC potential that yields ρdata(r)\rho_{\mathrm{data}}(\mathbf{r}). For simplicity, we restrict to the prototypical GKS system containing a fraction (α\alpha) of the exact exchange operator, in addition to the local multiplicative XC potential we seek. Here, we present the formulation for a closed-shell (spin-unpolarised) and finite systems (atoms and molecules) which have real-valued orbitals. Extension to other forms of nonlocal or local non-multiplicative operators, open-shell (spin-polarized), and/or extended (solids) systems can be built upon the proposed method. The XC energy in such a GKS

min⁡Φ→ρdata⟨Φ|−∑i12∇i2+α∑i<j1∣ri−rj∣|Φ⟩\min_{\Phi\to\rho_{\mathrm{data}}} \left\langle\Phi\middle| -\sum_i \frac{1}{2}\nabla_i^2+\alpha\sum_{i<j}\frac{1}{\lvert r_i-r_j\rvert}\middle|\Phi\right\rangle

system is defined as

Excα=αExx[{ψi}]+Exc,αrem[ρdata],Exx=−∑i=1Ne/2∑j=1Ne/2∬ψi(r)ψj(r)ψj(r′)ψi(r′)∣r−r′∣ dr dr′,(1)E_{\mathrm{xc}}^{\alpha}=\alpha E_{\mathrm{xx}}[\{\psi_i\}]+E_{\mathrm{xc},\alpha}^{\mathrm{rem}}[\rho_{\mathrm{data}}],\qquad E_{\mathrm{xx}}=-\sum_{i=1}^{N_e/2}\sum_{j=1}^{N_e/2}\iint\frac{\psi_i(\mathbf{r})\psi_j(\mathbf{r})\psi_j(\mathbf{r}')\psi_i(\mathbf{r}')}{\lvert\mathbf{r}-\mathbf{r}'\rvert}\,\mathrm{d}r\,\mathrm{d}r', \tag*{(1)}

where NeN_e is the number of electrons, ExxE_{\mathrm{xx}} is the exact exchange energy defined in terms of the GKS orbitals ψi\psi_i corresponding to ρdata\rho_{\mathrm{data}}, and Exc,αremE_{\mathrm{xc},\alpha}^{\mathrm{rem}} denotes the remainder density-dependent XC energy. The inverse GKS seeks to find the remainder local multiplicative XC potential vxc,αrem(r)=δExc,αrem[ρdata]δρdata(r)v_{\mathrm{xc},\alpha}^{\mathrm{rem}}(\mathbf{r})=\frac{\delta E_{\mathrm{xc},\alpha}^{\mathrm{rem}}[\rho_{\mathrm{data}}]}{\delta\rho_{\mathrm{data}}(\mathbf{r})} as well as the GKS orbitals ψi\psi_i. This can be posed as the following Levy-Lieb constrained optimization problem [44, 45, 7]:

min⁡Φ→ρdata⟨Φ∣−∑i12∇i2+α∑i<j1∣ri−rj∣∣Φ⟩(2)\min_{\Phi\to\rho_{\mathrm{data}}}\left\langle\Phi\left|-\sum_i\frac{1}{2}\nabla_i^2+\alpha\sum_{i<j}\frac{1}{\lvert\mathbf{r}_i-\mathbf{r}_j\rvert}\right|\Phi\right\rangle \tag*{(2)}

where Φ\Phi is the Slater determinant comprised of the GKS orbitals ψi\psi_i and Φ→ρdata\Phi\to\rho_{\mathrm{data}} denotes all Slater determinants which yield ρdata\rho_{\mathrm{data}}. The above constrained optimization can be recast as an unconstrained optimization by introducing a local multiplicative potential (vαloc(r)v_{\alpha}^{\mathrm{loc}}(\mathbf{r})) as the Lagrange-multiplier field enforcing the density constraint, along with the Lagrange multipliers (ϵi\epsilon_i) that enforce the normalization condition on the GKS orbitals. In other words, we optimize the following Lagrangian with respect to Φ\Phi and ϵi\epsilon_i,

L=⟨Φ∣−∑i12∇i2+α∑i<j1∣ri−rj∣∣Φ⟩+∫vαloc(r)(ρ(r)−ρdata(r)) dr+∑iϵi(∫ψi2(r) dr−1)(3)\mathcal{L}=\left\langle\Phi\left|-\sum_i\frac{1}{2}\nabla_i^2+\alpha\sum_{i<j}\frac{1}{\lvert\mathbf{r}_i-\mathbf{r}_j\rvert}\right|\Phi\right\rangle+\int v_{\alpha}^{\mathrm{loc}}(\mathbf{r})\left(\rho(\mathbf{r})-\rho_{\mathrm{data}}(\mathbf{r})\right)\,\mathrm{d}r+\sum_i\epsilon_i\left(\int\psi_i^2(\mathbf{r})\,\mathrm{d}r-1\right) \tag*{(3)}

with electron density ρ(r)=2∑iNe/2∣ψi(r)∣2\rho(\mathbf{r})=2\sum_{i}^{N_e/2}\lvert\psi_i(\mathbf{r})\rvert^2. Optimizing L\mathcal{L} with respect to ψi\psi_i yields the GKS eigenvalue problem

H^GKSψi(r)=ϵiψi(r),H^GKS=−12∇2+αV^X[{ψi}]+αvH[ρ](r)+vαloc(r).(4)\hat{H}_{\mathrm{GKS}}\psi_i(\mathbf{r})=\epsilon_i\psi_i(\mathbf{r}),\qquad\hat{H}_{\mathrm{GKS}}=-\frac{1}{2}\nabla^2+\alpha\hat{V}_{\mathrm{X}}[\{\psi_i\}]+\alpha v_{\mathrm{H}}[\rho](\mathbf{r})+v_{\alpha}^{\mathrm{loc}}(\mathbf{r}). \tag*{(4)}

In the above, V^X[{ψi}]\hat{V}_{\mathrm{X}}[\{\psi_i\}] is the nonlocal exchange operator whose action on a function (say f(r)f(\mathbf{r}) is given as

V^xf(r)=−∑j(∫ψj(r′)f(r′)∣r−r′∣ dr′)ψj(r).(5)\hat{V}_{\mathrm{x}}f(\mathbf{r})=-\sum_j\left(\int\frac{\psi_j(\mathbf{r}')f(\mathbf{r}')}{\lvert\mathbf{r}-\mathbf{r}'\rvert}\,\mathrm{d}\mathbf{r}'\right)\psi_j(\mathbf{r}). \tag*{(5)}

Upon solving Eq. (4), the derivative of L\mathcal{L} with respect to vαlocv_{\alpha}^{\mathrm{loc}} is given by

δLδvαloc(r)=ρ(r)−ρdata(r).(6)\frac{\delta\mathcal{L}}{\delta v_{\alpha}^{\mathrm{loc}}(\mathbf{r})}=\rho(\mathbf{r})-\rho_{\mathrm{data}}(\mathbf{r}). \tag*{(6)}

Thus, the density mismatch provides the gradient for updating vαlocv_{\alpha}^{\mathrm{loc}}. The update for vαlocv_{\alpha}^{\mathrm{loc}} in Eq. (6) is structurally analogous to the Wu–Yang inversion strategy [22] in KS theory, generalized here to a GKS auxiliary system through the explicit presence of the αV^X\alpha\hat{V}_{\mathrm{X}} operator and the corresponding α\alpha-dependent local multiplicative potential. Upon convergence, we express vαloc(r)=vext(r)+(1−α)vH[ρdata](r)+vxc,αrem(r)v_{\alpha}^{\mathrm{loc}}(\mathbf{r})=v_{\mathrm{ext}}(\mathbf{r})+(1-\alpha)v_{\mathrm{H}}[\rho_{\mathrm{data}}](\mathbf{r})+v_{\mathrm{xc},\alpha}^{\mathrm{rem}}(\mathbf{r}), where vext(r)=−∑IZI∣r−RI∣v_{\mathrm{ext}}(\mathbf{r})=-\sum_I\frac{Z_I}{\lvert\mathbf{r}-\mathbf{R}_I\rvert} is the nuclear potential and vH[ρdata](r)=∫ρdata(r′)∣r−r′∣ dr′v_{\mathrm{H}}[\rho_{\mathrm{data}}](\mathbf{r})=\int\frac{\rho_{\mathrm{data}}(\mathbf{r}')}{\lvert\mathbf{r}-\mathbf{r}'\rvert}\,\mathrm{d}\mathbf{r}' is the Hartree potential of ρdata\rho_{\mathrm{data}}. The above form of vαlocv_{\alpha}^{\mathrm{loc}} results in H^GKS=−12∇2+αV^X[{ψi}]+vext+vH[ρdata]+vxc,αrem\hat{H}_{\mathrm{GKS}}=-\frac{1}{2}\nabla^2+\alpha\hat{V}_{\mathrm{X}}[\{\psi_i\}]+v_{\mathrm{ext}}+v_{\mathrm{H}}[\rho_{\mathrm{data}}]+v_{\mathrm{xc},\alpha}^{\mathrm{rem}}, and hence, allows us to extract the exact α\alpha-dependent XC potential for ρdata\rho_{\mathrm{data}}.

We note that the GKS eigenvalue problem (Eq. (4)) is a nonlinear problem, as the input to the GKS Hamiltonian (H^GKS\hat{H}_{\mathrm{GKS}}) depends on the solution ψi\psi_i’s. Thus, the GKS eigenvalue problem needs to be solved self-consistently with respect to the ψi\psi_i’s. We employ a nested optimization strategy. We start with a trial vxc,αremv_{\mathrm{xc},\alpha}^{\mathrm{rem}}, and self-consistently solve Eq. (4) to obtain ψi\psi_i and ρ(r)\rho(\mathbf{r}), and then update vxc,αremv_{\mathrm{xc},\alpha}^{\mathrm{rem}} using Eq. (6). This process is repeated until ρ(r)\rho(\mathbf{r}) matches ρdata(r)\rho_{\mathrm{data}}(\mathbf{r}) to a prescribed tolerance. We refer the readers to the bottom panel of Figure 1 for an overview of the algorithm.

The resulting vxc,αremv_{\mathrm{xc},\alpha}^{\mathrm{rem}} and the corresponding ψi\psi_i’s provide reference data to understand and develop better hybrid XC functionals. By obtaining an accurate reference energy (EGSE_{\mathrm{GS}}) for the system from the many-body calculation, the inverse GKS can provide the exact XC energy, as: Excα=EGS−(Ts[{ψi}]+EH[ρdata]+∫vext(r)ρdata(r) dr+EZZ)E_{\mathrm{xc}}^{\alpha}=E_{\mathrm{GS}}-\left(T_{\mathrm{s}}[\{\psi_i\}]+E_{\mathrm{H}}[\rho_{\mathrm{data}}]+\int v_{\mathrm{ext}}(\mathbf{r})\rho_{\mathrm{data}}(\mathbf{r})\,\mathrm{d}\mathbf{r}+E_{\mathrm{ZZ}}\right), where Ts[{ψi}]=−∑i=1Ne/2∫ψi(r)∇2ψi(r) drT_{\mathrm{s}}[\{\psi_i\}]=-\sum_{i=1}^{N_{\mathrm{e}}/2}\int\psi_i(\mathbf{r})\nabla^2\psi_i(\mathbf{r})\,\mathrm{d}\mathbf{r} is the GKS non-interacting kinetic energy; EH[ρ]=12∬ρ(r)ρ(r′)∣r−r′∣ dr dr′E_{\mathrm{H}}[\rho]=\frac{1}{2}\iint\frac{\rho(\mathbf{r})\rho(\mathbf{r}')}{\lvert\mathbf{r}-\mathbf{r}'\rvert}\,\mathrm{d}\mathbf{r}\,\mathrm{d}\mathbf{r}' is the Hartree energy; and EZZ=∑I=1Na∑J=1,J≠INaZIZJ∣RI−RJ∣E_{\mathrm{ZZ}}=\sum_{I=1}^{N_{\mathrm{a}}}\sum_{\substack{J=1,J\ne I}}^{N_{\mathrm{a}}}\frac{Z_I Z_J}{\lvert\mathbf{R}_I-\mathbf{R}_J\rvert} is the nuclear-nuclear repulsive energy. Second, through Eq. (1), it also provides the exact remainder XC energy (Exc,αremE^{\mathrm{rem}}_{\mathrm{xc},\alpha}).

In the above inverse GKS approach, the most expensive part is the solution of the nonlinear GKS eigenvalue problem in Eq. (4), for a given vxc,αremv^{\mathrm{rem}}_{\mathrm{xc},\alpha}. Within the GKS eigenvalue problem, it is action of the exchange operator (V^X\hat{V}_{\mathrm{X}}) on the orbitals (ψi\psi_i) that is the most dominant cost, owing to its nonlocal nature. To alleviate this high cost, we employ an adaptively compressed exchange (ACE) approximation to the action of V^X\hat{V}_{\mathrm{X}}. We refer to the Methods section for the details of the ACE approximation, and the overall approach to solve the nonlinear GKS eigenvalue problem, which together accelerate the inverse GKS calculations.

Verification with LDA correlation

To assess the accuracy of the algorithm, we consider ρdata\rho_{\mathrm{data}} for the neon (Ne) atom obtained from a groundstate DFT calculation with full exact exchange (i.e., α=1\alpha= 1) and the PW92 LDA correlation functional [46], solved using an FE basis. This test allows us to directly compare the vxc,αremv^{\mathrm{rem}}_{\mathrm{xc},\alpha} obtained from the inverse GKS calculation with the PW92 correlation potential for ρdata\rho_{\mathrm{data}} (i.e. vcLDA[ρdata]v_{\mathrm{c}}^{\mathrm{LDA}}[\rho_{\mathrm{data}}]). Although seemingly trivial, numerically it represents a difficult test, given the ill-posedness of the discrete inverse DFT problem. To elaborate, past efforts at similar LDA tests for the relatively easier inverse KS problem had suffered from non-unique solutions and/or spurious oscillations [47], owing to the finite nature of the atomic orbital (AO) basis employed. The inverse GKS calculation, solved as a 3D problem, is performed until the L2L_2 norm of the error in density (∥ρ−ρdata∥L2=∫(ρ(r)−ρdata(r))2 dr\lVert\rho-\rho_{\mathrm{data}}\rVert_{L_2}=\sqrt{\int(\rho(\mathbf{r})-\rho_{\mathrm{data}}(\mathbf{r}))^2\,\mathrm{d}r}) is driven below 10−510^{-5}. Figure 2 compares vcLDA[ρdata]v_{\mathrm{c}}^{\mathrm{LDA}}[\rho_{\mathrm{data}}] with the vxc,αremv^{\mathrm{rem}}_{\mathrm{xc},\alpha} obtained from inverse GKS calculation on ρdata\rho_{\mathrm{data}}. As evident, the solution from inverse GKS is in good agreement with vcLDA[ρdata]v_{\mathrm{c}}^{\mathrm{LDA}}[\rho_{\mathrm{data}}] and exhibits no spurious oscillations at the scale of the potential features underscoring the reliability of the proposed inverse GKS method.

Figure 2. LDA validation test: Comparison of inverse GKS reconstructed and exact potential for a groundstate density obtained using exact exchange + LDA (PW92) correlation.

Exact GKS exchange-correlation potentials

We evaluate the exact exchange-correlation potentials corresponding to accurate groundstate densities obtained from configuration interaction (CI) calculations. These calculations in general, use atomic orbital (AO) basis, such as Gaussian- or Slater-type orbitals. However, as noted in earlier works [27, 41, 48], AO basis sets, owing to their finite (incomplete) nature, do not accurately capture the asymptotics of the density near the nuclei and in the far-field (low density region). Gaussian basis sets, in particular, lack the nuclear cusp and exhibit Gaussian rather than exponential decay in the far-field. These inaccurate asymptotics can induce unphysical oscillations in the vxc,αremv_{\mathrm{xc},\alpha}^{\mathrm{rem}} obtained through inverse GKS, similar to those observed in inverse KS [27, 48]. Slater-type basis sets, by contrast, are better suited to capture these asymptotics, and have been shown to alleviate such issues in the context of Ryabinkin-Kohut-Staroverov (RKS) method for inverse KS [31]. However, minor oscillations may persist depending on the choice of basis, especially when used with a complete basis like finite-elements for the inverse problem [48]. To alleviate these artifacts, we employ the following two strategies. First, we add a small correction, Δρ(r)\Delta\rho(\mathbf{r}), to the ρdata(r)\rho_{\mathrm{data}}(\mathbf{r}), given as

Δρ(r)=ρDFAFE(r)−ρDFAAO(r).(7)\Delta\rho(\mathbf{r}) = \rho_{\mathrm{DFA}}^{\mathrm{FE}}(\mathbf{r}) - \rho_{\mathrm{DFA}}^{\mathrm{AO}}(\mathbf{r}) . \tag*{(7)}

In the above, ρDFAFE\rho^{\mathrm{FE}}_{\mathrm{DFA}} refers to the self-consistent density obtained using a systematically convergent FE basis with an approximate density functional. ρDFAAO(r)\rho^{\mathrm{AO}}_{\mathrm{DFA}}(\mathbf{r}) refers to the self-consistent density using the same approximate density functional, albeit solved using the AO basis used in the CI calculation. Broadly, Δρ\Delta\rho captures the AO basis set error near the nuclei, and hence, helps in alleviating any basis set artifact in vxc,αremv^{\mathrm{rem}}_{\mathrm{xc},\alpha} near the nuclei. We refer to Refs [27, 48] for the efficacy of the Δρ\Delta\rho correction, in the context of inverse KS. We have shown that the accuracy of the inverse calculations is insensitive to the choice of functional used to compute the Δρ\Delta\rho correction in our previous works [27, 43]. Second, to alleviate any spurious behavior in vxc,αremv^{\mathrm{rem}}_{\mathrm{xc},\alpha} stemming from the incorrect decay in ρdata\rho_{\mathrm{data}}, we enforce the known −(1−α)/r-(1-\alpha)/r decay on the vxc,αremv^{\mathrm{rem}}_{\mathrm{xc},\alpha} in the low density regime. Specifically, we set vxc,αrem=−1−αNevH[ρdata]v^{\mathrm{rem}}_{\mathrm{xc},\alpha}=-\frac{1-\alpha}{N_{\mathrm{e}}}v_{\mathrm{H}}[\rho_{\mathrm{data}}] in regions where (ρdata<10−6)(\rho_{\mathrm{data}}<10^{-6}).

We present the exact vxc,αremv^{\mathrm{rem}}_{\mathrm{xc},\alpha} and energies for different benchmark systems, each at five different values of α={0,0.25,0.5,0.75,1.0}\alpha=\{0,0.25,0.5,0.75,1.0\}. The energies we consider include the non-interacting kinetic energy (TsT_{\mathrm{s}}), the electrostatic energy (Ees[ρ]=EH[ρ]+∫ρvext dr+EzzE_{\mathrm{es}}[\rho]=E_{\mathrm{H}}[\rho]+\int\rho v_{\mathrm{ext}}\,\mathrm{d}r+E_{\mathrm{zz}}, where EzzE_{\mathrm{zz}} is the nuclear-nuclear repulsive energy), and the exact exchange energy (ExxE_{\mathrm{xx}}) for these systems. The vxc,αremv^{\mathrm{rem}}_{\mathrm{xc},\alpha} for α=0\alpha=0 represents the Kohn-Sham XC potential and that for α=1\alpha=1 represents the exact GKS correlation potential. All inverse GKS calculations are deemed converged when ∥ρ−ρdata∥L2<10−3\lVert\rho-\rho_{\mathrm{data}}\rVert_{L_2}<10^{-3}. Figure 3 shows the vxc,αremv^{\mathrm{rem}}_{\mathrm{xc},\alpha} for different α\alpha for the Ne atom. As evident, vxc,αremv^{\mathrm{rem}}_{\mathrm{xc},\alpha} decreases by an order of magnitude with increasing α\alpha. The intershell structure in vxc,αremv^{\mathrm{rem}}_{\mathrm{xc},\alpha} (the hump in the potential around r=0.3r=0.3) becomes less prominent with increasing α\alpha. This indicates the intershell features to be largely a consequence of the exchange operator. We next conduct a similar analysis for molecules. Figure 4 and Figure 5 present the vxc,αremv^{\mathrm{rem}}_{\mathrm{xc},\alpha} for the LiH and C2H4\mathrm{C}_2\mathrm{H}_4 molecules, respectively, each at their equilibrium geometry. Similar to Ne atom, the magnitude of vxc,αremv^{\mathrm{rem}}_{\mathrm{xc},\alpha} and the intershell structure diminishes with increasing α\alpha. Figure 6 shows the vxc,αremv^{\mathrm{rem}}_{\mathrm{xc},\alpha} for benzyne (C6H4\mathrm{C}_6\mathrm{H}_4), which is a strongly correlated system. Given the high computational cost associated with inverse GKS for larger molecules, we limit the evaluation of vxc,αremv^{\mathrm{rem}}_{\mathrm{xc},\alpha} for benzyne to only α=1\alpha=1. As evident, the vxc,α=1remv^{\mathrm{rem}}_{\mathrm{xc},\alpha=1} for benzyne is devoid any numerical artifacts. These results, spanning both weakly and strongly correlated systems, highlight the accuracy, robustness, and scalability of our inverse GKS method. We also report the energies (Ts+EesT_s + E_{\mathrm{es}} and ExxE_{\mathrm{xx}}) for these systems in Table 1. We find that, at least for these systems, the energies are largely insensitive to the choice of α\alpha, consistent with the conventional wisdom that the KS and GKS density matrices are nearly identical [49], at least by energy metrics. However, in the next section we provide examples for which this conventional wisdom does not hold. The molecular geometries, the CI density matrices, and the corresponding AO basis sets used in these calculations are provided in the SI.

α=0.0\alpha= 0.0α=0.25\alpha= 0.25α=0.5\alpha= 0.5α=0.75\alpha= 0.75α=1.0\alpha= 1.0
NeTs+EesT_s + E_{\mathrm{es}}-116.4681-116.4681-116.4679-116.4666-116.4657
NeExxE_{\mathrm{xx}}-12.0709-12.07544-12.07616-12.07775-12.07875
LiH(eq)Ts+EesT_s + E_{\mathrm{es}}-5.8423-5.8421-5.8421-5.842-5.8418
LiH(eq)ExxE_{\mathrm{xx}}-2.1432-2.1447-2.1449-2.1450-2.1452
C2_2H4_4Ts+EesT_s + E_{\mathrm{es}}-66.3325-66.3322-66.3317-66.3284-66.3258
C2_2H4_4ExxE_{\mathrm{xx}}-11.7246-11.7279-11.7303-11.7348-11.7379
BenzyneTs+EesT_s + E_{\mathrm{es}}––––-196.9517
BenzyneExxE_{\mathrm{xx}}––––-32.5065

Table 1. Energies for GKS potentials for Ne, LiH(eq), C2_2H4_4 and benzyne (C6_6H4_4). TsT_s, EesE_{\mathrm{es}}, and ExxE_{\mathrm{xx}} denote the non-interacting kinetic energy, the electrostatic energy, and the exact exchange energy, respectively. The energies are in Ha.

Plot of $v_{\mathrm{xc},\alpha}^{\mathrm{rem}}$ potentials for different fractions of exact exchange

Figure 3. vxc,αremv_{\mathrm{xc},\alpha}^{\mathrm{rem}} potentials for different fractions (α\alpha) of exact exchange for a Ne atom.

Figure 4. vxc,αremv^{\mathrm{rem}}_{\mathrm{xc},\alpha} potentials for different fractions (α\alpha) of exact exchange for LiH molecule.

Figure 5. vxc,αremv^{\mathrm{rem}}_{\mathrm{xc},\alpha} potentials for different fractions (α\alpha) of exact exchange for C2_2H4_4 molecule.

Figure 6. vxc,α=1remv_{\mathrm{xc},\alpha=1}^{\mathrm{rem}} for the benzyne molecule (C6_6H4_4), shown on the plane of the molecule.

Assessing common approximations to vxc,αremv_{\mathrm{xc},\alpha}^{\mathrm{rem}}

Given the computational and numerical difficulty of inverse GKS, over the years, approximations to vxc,αremv_{\mathrm{xc},\alpha}^{\mathrm{rem}} based on quantities available from inverse KS calculations have been pursued.

One such approximation, based on perturbative analysis, is [39, 50, 49]

vxc,αrem≈(1−α)vxKS+vcKS,(8)v_{\mathrm{xc},\alpha}^{\mathrm{rem}} \approx(1-\alpha)v_{\mathrm{x}}^{\mathrm{KS}}+v_{\mathrm{c}}^{\mathrm{KS}}, \tag*{(8)}

where vxKSv_{\mathrm{x}}^{\mathrm{KS}} and vcKSv_{\mathrm{c}}^{\mathrm{KS}} denote the Kohn-Sham exchange and correlation potentials, respectively. The vxKS=∂ExxKS∂ρ(r)∣ρdatav_{\mathrm{x}}^{\mathrm{KS}}=\left.\frac{\partial E_{\mathrm{xx}}^{\mathrm{KS}}}{\partial\rho(\mathbf{r})}\right|_{\rho_{\mathrm{data}}}, where ExxKSE_{\mathrm{xx}}^{\mathrm{KS}} denotes the exchange energy evaluated using the exact Kohn-Sham orbitals (i.e., orbitals corresponding to vxc,α=0remv_{\mathrm{xc},\alpha=0}^{\mathrm{rem}}). Accordingly, vcKS=vxc−vxKSv_{\mathrm{c}}^{\mathrm{KS}}=v_{\mathrm{xc}}-v_{\mathrm{x}}^{\mathrm{KS}}, where vxc=vxc,α=0remv_{\mathrm{xc}}=v_{\mathrm{xc},\alpha=0}^{\mathrm{rem}} is the exact Kohn-Sham XC potential. Evaluation of vxKSv_{\mathrm{x}}^{\mathrm{KS}} requires solving the optimized effective potential (OEP) integral equations in a complete basis [51, 52], which presents a much more challenging problem than inverse KS. However, it has been shown, both theoretically and numerically [53, 54, 55, 49, 50], that the XC potential corresponding to the self-consistent Hartree-Fock density can serve as a good approximation to vxKSv_{\mathrm{x}}^{\mathrm{KS}}, i.e., vxc[ρHF]≈vxKS[ρdata]v_{\mathrm{xc}}[\rho_{\mathrm{HF}}] \approx v_{\mathrm{x}}^{\mathrm{KS}}[\rho_{\mathrm{data}}]. In this work, we use this Hartree-Fock based approximation to vxKSv_{\mathrm{x}}^{\mathrm{KS}} and evaluate

vcKS[ρdata]≈vxc[ρdata]−vxc[ρHF].(9)v_{\mathrm{c}}^{\mathrm{KS}}[\rho_{\mathrm{data}}] \approx v_{\mathrm{xc}}[\rho_{\mathrm{data}}] - v_{\mathrm{xc}}[\rho_{\mathrm{HF}}]. \tag*{(9)}

Using our inverse GKS method, we test the approximation in Eq. (8) for α=1\alpha= 1. That is, we check if the exact GKS correlation potential (vcGKS=vxc,α=1remv_{\mathrm{c}}^{\mathrm{GKS}} = v_{\mathrm{xc},\alpha=1}^{\mathrm{rem}}) and KS correlation potential (vcKSv_{\mathrm{c}}^{\mathrm{KS}}) are close to each other. Figure 7 compares the vcGKSv_{\mathrm{c}}^{\mathrm{GKS}} and vcKSv_{\mathrm{c}}^{\mathrm{KS}} for Ne atom. Figure 8 offers the same comparison for LiH molecule at both equilibrium and twice the equilibrium bond-length, hereafter denoted as LiH(eq) and LiH(2eq). Similarly, Figure 9 presents the comparison for CO molecule at equilibrium and 1.25×1.25 \times the equilibrium bond-length, hereafter denoted as CO(eq) and CO(1.25eq). For all the systems, the GKS and KS correlation potential differ both qualitatively and quantitatively. Beyond the visual comparison, a more instructive measure to compare the two potentials is through various single-electron energies. Specifically, we compare the TsT_{\mathrm{s}}, Ees[ρ]E_{\mathrm{es}}[\rho], ExxE_{\mathrm{xx}}, and the mean-field energy (EMF=Ts+Ees+ExxE_{\mathrm{MF}} = T_{\mathrm{s}} + E_{\mathrm{es}} + E_{\mathrm{xx}}), evaluated using the orbitals (ψi\psi_i) corresponding to vcGKSv_{\mathrm{c}}^{\mathrm{GKS}} and vcKSv_{\mathrm{c}}^{\mathrm{KS}}. We obtain the orbitals by self-consistently solving the GKS eigenvalue problem in Eq. (4) with vxc,α=1remv_{\mathrm{xc},\alpha=1}^{\mathrm{rem}} set to vcGKSv_{\mathrm{c}}^{\mathrm{GKS}} and vcKSv_{\mathrm{c}}^{\mathrm{KS}}. This measures the differences in energies one would obtain, if the vcGKSv_{\mathrm{c}}^{\mathrm{GKS}} (which is exact) is replaced by vcKSv_{\mathrm{c}}^{\mathrm{KS}} and is used in conjunction with the exact exchange. Table 2 compares the energies for Ne, LiH(eq), LiH(2eq), CO(eq), and CO(1.25eq). The stretched molecules—LiH(2eq) and CO(1.25eq)—present strongly correlated systems. We observe that for Ne, LiH(eq), and CO(eq), the EMFE_{\mathrm{MF}} from GKS and KS correlation potentials are in good agreement (<2< 2 mHa difference). Indeed, for LiH(eq) and CO(eq), even the individual energies (TsT_{\mathrm{s}}, EesE_{\mathrm{es}}, and ExxE_{\mathrm{xx}}) are in good agreement. However, this changes for the stretched molecules (LiH(2eq) and CO(1.25eq)), where the ExxE_{\mathrm{xx}} energies show notable differences (>20> 20 mHa). Overall, the EMFE_{\mathrm{MF}} for the stretched molecules differ by more than 11 mHa. Thus, from an energy perspective, we observe that, while the GKS and KS correlation potential are agree with each other for weakly correlated systems (i.e., Ne, LiH(eq), and CO(eq)), they differ significantly (in relation to the desired chemical accuracy of 1 mHa) for strongly correlated systems (e.g. LiH(2eq) and CO(1.25eq)). Based on these results, we hypothesize Eq. (8) to be valid for weakly correlated systems, but not necessarily for strongly correlated ones.

Figure 7. Comparison of GKS and KS correlation potentials for neon (Ne) atom.

Figure 8. Comparison of KS and GKS correlation potentials for LiH molecules, along the bond. Left: LiH(eq). Right: LiH(2eq).

Figure 9. Comparison of KS and GKS correlation potentials for CO molecules, along the bond. Left: CO(eq). Right: CO(1.25eq).

SystemTsT_{\mathrm{s}} (Ha)EesE_{\mathrm{es}} (Ha)ExxE_{\mathrm{xx}} (Ha)Diff. EMFE_{\mathrm{MF}} (mHa)
GKSKSGKSKSGKSKS(GKS - KS)
Ne128.6005128.5817-245.0662-245.0514-12.0788-12.0746-0.15
LiH(eq)7.9998.000-13.841-13.842-2.145-2.1440.073
LiH(2eq)7.7997.787-13.691-13.692-2.004-1.97911.50
CO(eq)112.823112.824-212.286-212.291-13.317-13.312-2.277
CO(1.25eq)112.060112.059-211.651-211.658-13.043-13.021-13.30

Table 2. Comparison of energies for GKS and KS correlation potentials when used with full exact exchange across different systems. TsT_{\mathrm{s}}, EesE_{\mathrm{es}}, and ExxE_{\mathrm{xx}} denote the non-interacting kinetic energy, the electrostatic energy, and the exact exchange energy, respectively. EMF=Ts+Ees+ExxE_{\mathrm{MF}} = T_{\mathrm{s}} + E_{\mathrm{es}} + E_{\mathrm{xx}}.

Discussion

We have presented an accurate method to evaluate the exact local multiplicative potential (vxc,αremv_{\mathrm{xc},\alpha}^{\mathrm{rem}}) from a target density, within the generalized-Kohn-Sham (GKS) formulation. The key ingredients in our approach are: (i) the use of systematically convergent finite-element (FE) basis, by which the inverse GKS problem can be solved robustly; (ii) use of asymptotic corrections to the target density and enforcement of appropriate boundary conditions on vxc,αremv_{\mathrm{xc},\alpha}^{\mathrm{rem}} to avoid numerical artifacts; and (iii) use of adaptively compressed exchange (ACE) approximation to the exchange operator (V^X\hat{V}_{\mathrm{X}}) to substantially accelerate its action on orbitals. We have demonstrated the efficacy of our approach by obtaining the exact vxc,αremv_{\mathrm{xc},\alpha}^{\mathrm{rem}}, for different α\alpha’s, using accurate configuration interaction (CI) densities, for different molecules, spanning weakly correlated and strongly correlated ones. Through the benzyne molecule, we demonstrated the ability of our proposed method to handle large systems. Overall, to the best of our knowledge, this offers the first attempt at obtaining the vxc,αremv_{\mathrm{xc},\alpha}^{\mathrm{rem}}’s for molecules.

We also demonstrate that a commonly held but previously untested assumption that GKS and KS correlation potentials yield similar energies holds only for weakly correlated systems and breaks down in the strongly correlated regime. Inverse DFT is increasingly serving as a powerful tool for machine-learning of accurate XC functionals, through the use of exact XC potentials and energies [37, 38]. However, all such attempts are limited to the KS formalism. This work, by offering exact vxc,αremv_{\mathrm{xc},\alpha}^{\mathrm{rem}}, exact Exc,αremE_{\mathrm{xc},\alpha}^{\mathrm{rem}}, and the corresponding orbitals (ψi\psi_i), paves the way for machine-learning of accurate XC functionals within GKS formalism of DFT which can remedy the notable deficiencies in DFT, of self-interaction and static correlation errors [16].

Methods

Efficient GKS Eigensolve

The most expensive part of the above inverse GKS approach is the solution of the GKS eigenvalue problem in Eq. (4) for a given vxc,αrevv^{\mathrm{rev}}_{\mathrm{xc},\alpha}. Being a nonlinear problem, it needs to be solved self-consistently with respect to ψi\psi_i’s. We employ a nested self-consistent strategy, where the outer loop updates the exchange operator (V^X\hat{V}_{\mathrm{X}}) and the inner loop updates the orbitals (ψi\psi_i). To elaborate, in the outer loop we take a set of input orbitals (ψiin\psi_i^{\mathrm{in}}) and define V^Xin=V^X[{ψiin}]\hat{V}_{\mathrm{X}}^{\mathrm{in}} = \hat{V}_{\mathrm{X}}[\{\psi_i^{\mathrm{in}}\}]. Subsequently, in the inner loop, we solve the GKS eigenvalue problem with the fixed V^Xin\hat{V}_{\mathrm{X}}^{\mathrm{in}} until self-consistency in the density (ρ\rho) is reached. The output orbitals (ψiout\psi_i^{\mathrm{out}}) from the inner self-consistent solve serves as the input (ψiin\psi_i^{\mathrm{in}}) for the next iteration for the outer loop. We repeat the process until self-consistency in ψi\psi_i is achieved, i.e., until the difference in the exact energy (ExxE_{\mathrm{xx}}) corresponding to ψiin\psi_i^{\mathrm{in}} and ψiout\psi_i^{\mathrm{out}} drops below a prescribed tolerance. We note that the inner self-consistent loop resembles the usual self-consistent field iteration in Kohn-Sham DFT. To elaborate, in the inner loop, we start with an input density ρin\rho_{\mathrm{in}} (defined using ψiin\psi_i^{\mathrm{in}}) and define its Hartree potential vH[ρin]v_{\mathrm{H}}[\rho_{\mathrm{in}}]. We then solve the linear GKS eigenvalue in presence of V^Xin\hat{V}_{\mathrm{X}}^{\mathrm{in}} and vH[ρin]v_{\mathrm{H}}[\rho_{\mathrm{in}}] to find the output orbitals ψiout\psi_i^{\mathrm{out}} and its corresponding density ρout\rho_{\mathrm{out}}. The ρout\rho_{\mathrm{out}} serves as ρin\rho_{\mathrm{in}} for the next iteration of the inner loop, which is continued until ρin\rho_{\mathrm{in}} and ρout\rho_{\mathrm{out}} match to a chosen tolerance.

Within the above nested self-consistent approach, the major computational cost stems from the action of V^Xin\hat{V}_{\mathrm{X}}^{\mathrm{in}} on a set of orbitals ψi\psi_i. To elaborate, one needs to solve the inner linear eigenvalue problem (i.e., for a fixed V^Xin\hat{V}_{\mathrm{X}}^{\mathrm{in}} and fixed vH[ρin]v_{\mathrm{H}}[\rho_{\mathrm{in}}]) using an iterative eigensolver (e.g., Chebyshev filtering [56] or Jacobi-Davidson [57]). Thus, one has to apply V^Xin\hat{V}_{\mathrm{X}}^{\mathrm{in}} to a set of orbitals ψi\psi_i at each iteration of the linear eigensolver, which can easily add to an enormous computational cost. We alleviate this cost by employing the adaptively compressed exchange (ACE) approximation [42] to expedite the action of V^Xin\hat{V}_{X}^{\mathrm{in}} inside the inner linear eigensolver. ACE is based on the idea that although the exchange-operator (V^Xin\hat{V}_{X}^{\mathrm{in}}) has full-rank, its action on a set of functions can be approximated using a low-rank operator. To elaborate, given an initial set of functions {gi(r)}\{g_i(\mathbf{r})\} which closely span the space of ψi(r)\psi_i(\mathbf{r}), we define V^XACE[{ψiin,gi}](r,r′)=−∑kζk(r)ζk(r′)\hat{V}_{X}^{\mathrm{ACE}}[\{\psi_i^{\mathrm{in}},g_i\}](\mathbf{r},\mathbf{r}')=-\sum_k\zeta_k(\mathbf{r})\zeta_k(\mathbf{r}'). Here the projection vectors ζk\zeta_k are defined as ζk(r)=∑lul(r)(L−1)k,l\zeta_k(\mathbf{r})=\sum_l u_l(\mathbf{r})(\mathbf{L}^{-1})_{k,l}, where ul(r)=V^X[{ψiin}]gl(r)u_l(\mathbf{r})=\hat{V}_{X}[\{\psi_i^{\mathrm{in}}\}]g_l(\mathbf{r}) and the L\mathbf{L} is the Cholesky factor of the S\mathbf{S} matrix: Si,j=∫gi(r)uj(r) drS_{i,j}=\int g_i(\mathbf{r})u_j(\mathbf{r})\,\mathrm{d}\mathbf{r}. That is, S=−LLT\mathbf{S}=-\mathbf{L}\mathbf{L}^{T}. The key idea is that as ψi\psi_i’s get iteratively updated in the linear eigensolver, one can still approximate V^Xinψi(r)≈∫V^XACE[{ψiin,gi}](r,r′)ψi(r′) dr′\hat{V}_{X}^{\mathrm{in}}\psi_i(\mathbf{r})\approx\int\hat{V}_{X}^{\mathrm{ACE}}[\{\psi_i^{\mathrm{in}},g_i\}](\mathbf{r},\mathbf{r}')\psi_i(\mathbf{r}')\,\mathrm{d}\mathbf{r}'. This approximation is exact when ψi\psi_i’s and gig_i’s span the same space. Thus, as long as the ψi\psi_i’s do not deviate much from gig_i’s, ACE offers a good approximation for the action of V^Xin\hat{V}_{X}^{\mathrm{in}} on ψi\psi_i’s. If and when the deviation between gig_i’s and ψi\psi_i’s exceed a tolerance, we update the ACE operator to V^XACE[{ψiin,ψi}]\hat{V}_{X}^{\mathrm{ACE}}[\{\psi_i^{\mathrm{in}},\psi_i\}]. We note that the most expensive part of constructing the ACE operator is the evaluation of the ui(r)u_i(\mathbf{r}). To elaborate, uj(r)=−∑iψiin(r)vi,j(r)u_j(\mathbf{r})=-\sum_i\psi_i^{\mathrm{in}}(\mathbf{r})v_{i,j}(\mathbf{r}), where vi,j(r)=∫ψiin(r′)gj(r′)∣r−r′∣ dr′v_{i,j}(\mathbf{r})=\int\frac{\psi_i^{\mathrm{in}}(\mathbf{r}')g_j(\mathbf{r}')}{|\mathbf{r}-\mathbf{r}'|}\,\mathrm{d}\mathbf{r}' denotes a nonlocal evaluation. For efficient evaluation of vi,jv_{i,j}, we recast it into a Poisson problem: −4π∇2vi,j(r)=ψiin(r)gj(r)-4\pi\nabla^2v_{i,j}(\mathbf{r})=\psi_i^{\mathrm{in}}(\mathbf{r})g_j(\mathbf{r}). We solve it by discretizing the vi,j(r)v_{i,j}(\mathbf{r}) with a finite-element (FE) basis. The finite-element approach reformulates these calculations as a series of small, dense matrix multiplications — an operation that is exceptionally well-suited to modern computer hardware, since it performs many arithmetic operations per unit of data moved. This efficiency also makes the method naturally compatible with graphics processing units (GPUs), which substantially accelerate the computations further [58, 59].

Ab initio densities

The exact groundstate densities are obtained from heat bath CI (HBCI) [60, 61, 62, 63, 64, 65], a systematically convergent route to the full CI (FCI) limit with significantly reduced computational cost [60, 62, 66]. In HBCI, the variational space is constructed iteratively: starting from a reference state, new determinants are selectively added to expand the wavefunction toward the FCI limit, retaining only those whose coupling to the current wavefunction exceeds a selection threshold ε1\varepsilon_{1}. In this work, we use ε1=5×10−5Ha\varepsilon_{1} = 5 \times10^{-5}\mathrm{Ha}. All electrons were correlated. Gaussian basis sets were used for all systems except C2H4\mathrm{C}_{2}\mathrm{H}_{4}, and the basis sets were obtained from the Basis Set Exchange [67]. Specifically, the cc-pV5Z basis was used for LiH [68, 69], aug-cc-pVQZ for CO [69] and cc-pVTZ for Ne and benzyne [70]. For C2H4\mathrm{C}_{2}\mathrm{H}_{4}, the HBCI calculation was performed using the TZ2P Slater-type basis from the ADF program [71]. The density for ortho-benzyne (C6H4\mathrm{C}_{6}\mathrm{H}_{4}) was taken from Ref. [27]; details of the corresponding wavefunction calculations are provided therein.

Data availability

The molecular geometries, CI density matrices, and corresponding AO basis sets used in this study are provided in the Supplementary Information. The three-dimensional exchange-correlation potential field data generated in this study are available from the corresponding author upon reasonable request.

Code availability

The inverse DFT code (invDFT) is publicly available at https://github.com/dftfeDevelopers/invDFT. The inverse GKS calculations presented in this work were performed using a private development branch of invDFT, which will be made available upon reasonable request to the corresponding author.

Acknowledgment

We acknowledge the support of Department of Energy, Office of Science, through grant number DE-SC0022241, under the auspices of which this study is conducted. This study used resources of the Oak Ridge Leadership Computing Facility, which is a DOE Office of Science User Facility supported under Contract DE-AC05-00OR22725 . This study also used resources of the NERSC Center, a DOE Office of Science User Facility using NERSC award BES-ERCAP0034270.

References

  1. [1]Axel D Becke. Perspective: Fifty years of density-functional theory in chemical physics. The Journal of chemical physics, 140(18), 2014.DOI
  2. [2]P. Hohenberg and W. Kohn. Inhomogeneous electron gas. Phys. Rev., 136:B864–B871, Nov 1964.
  3. [3]Walter Kohn and Lu Jeu Sham. Self-consistent equations including exchange and correlation effects. Physical review, 140(4A):A1133, 1965.DOI
  4. [4]Isaiah Shavitt. The method of configuration interaction. In Methods of electronic structure theory, pages 189–275. Springer, 1977.DOI
  5. [5]Rodney J Bartlett and Monika Musial. Coupled-cluster theory in quantum chemistry. Reviews of Modern Physics, 79(1):291–352, 2007.DOI
  6. [6]William MC Foulkes, Lubos Mitas, RJ Needs, and Guna Rajagopal. Quantum monte carlo simulations of solids. Reviews of Modern Physics, 73(1):33, 2001.DOI
  7. [7]A Seidl, Andreas Görling, Peter Vogl, Jacek A Majewski, and Mel Levy. Generalized Kohn-Sham schemes and the band-gap problem. Physical Review B, 53(7):3764, 1996.pubmed.ncbi.nlm.nih.gov/9983927
  8. [8]Axel D Becke. A new mixing of Hartree–Fock and local density-functional theories. J. Chem. Phys., 98(2):1372–1377, 1993.DOI
  9. [9]Axel D Becke. Density-functional thermochemistry. iii. the role of exact exchange. J. Chem. Phys., 98(7):5648–6, 1993.DOI
  10. [10]Chengteh Lee, Weitao Yang, and Robert G Parr. Development of the Colle-Salvetti correlation-energy formula into a functional of the electron density. Phys. Rev. B, 37(2):785, 1988.pubmed.ncbi.nlm.nih.gov/9944570
  11. [11]Carlo Adamo and Vincenzo Barone. Toward reliable density functional methods without adjustable parameters: The PBE0 model. J. Chem. Phys., 110(13):6158–6170, 1999.DOI
  12. [12]Jianwei Sun, Adrienn Ruzsinszky, and John P Perdew. Strongly constrained and appropriately normed semilocal density functional. Phys. Rev. Lett., 115(3):036402, 2015.arxiv.org/abs/1504.03028
  13. [13]James W Furness, Aaron D Kaplan, Jinliang Ning, John P Perdew, and Jianwei Sun. Accurate and numerically efficient r²SCAN meta-generalized gradient approximation. The journal of physical chemistry letters, 11(19):8208–8215, 2020.DOI
  14. [14]Lars Goerigk, Andreas Hansen, Christoph Bauer, Stephan Ehrlich, Asim Najibi, and Stefan Grimme. A look at the density functional theory zoo with the advanced GMTKN55 database for general main group thermochemistry, kinetics and noncovalent interactions. Physical Chemistry Chemical Physics, 19(48):32184–32215, 2017.DOI
  15. [15]Guo-Xu Zhang, Anthony M Reilly, Alexandre Tkatchenko, and Matthias Scheffler. Performance of various density-functional approximations for cohesive properties of 64 bulk solids. New Journal of Physics, 20(6):063020, 2018.DOI
  16. [16]Aron J. Cohen, Paula Mori-Sánchez, and Weitao Yang. Challenges for density functional theory. Chem. Rev., 112(1):289–320, 2012.DOI
  17. [17]A. Görling. Kohn-Sham potentials and wave functions from electron densities. Phys. Rev. A, 46:3753–3757, 1992.pubmed.ncbi.nlm.nih.gov/9908566
  18. [18]Y. Wang and R. G. Parr. Construction of exact Kohn-Sham orbitals from a given electron density. Phys. Rev. A, 47:R1591–R1593, 1993.pubmed.ncbi.nlm.nih.gov/9909208
  19. [19]Qingsheng Zhao, Robert C Morrison, and Robert G Parr. From electron densities to Kohn-Sham kinetic energies, orbital energies, exchange-correlation potentials, and exchange-correlation energies. Physical Review A, 50(3):2138, 1994.pubmed.ncbi.nlm.nih.gov/9911123
  20. [20]R. van Leeuwen and E. J. Baerends. Exchange-correlation potential with correct asymptotic behavior. Phys. Rev. A, 49:2421–2431, Apr 1994.pubmed.ncbi.nlm.nih.gov/9910514
  21. [21]David J Tozer, Victoria E Ingamells, and Nicholas C Handy. Exchange-correlation potentials. J. Chem. Phys., 105(20):9200–9213, 1996.DOI
  22. [22]Qin Wu and Weitao Yang. A direct optimization method for calculating density functionals and exchange–correlation potentials from electron densities. The Journal of chemical physics, 118(6):2498–2509, 2003.DOI
  23. [23]Christoph R. Jacob. Unambiguous optimization of effective potentials in finite basis sets. J. Chem. Phys., 135(24):244102, 2011.DOI
  24. [24]T. Gould and J. Toulouse. Kohn-Sham potentials in exact density-functional theory at noninteger electron numbers. Phys. Rev. A, 90:050502, 2014.DOI
  25. [25]Ilya G. Ryabinkin, Sviataslau V. Kohut, and Viktor N. Staroverov. Reduction of electronic wave functions to Kohn-Sham effective potentials. Phys. Rev. Lett., 115:083001, Aug 2015.pubmed.ncbi.nlm.nih.gov/26340185
  26. [26]Daniel S. Jensen and Adam Wasserman. Numerical methods for the inverse problem of density functional theory. Int. J. Quantum Chem., 118(1):e25425, 2018.DOI
  27. [27]Bikash Kanungo, Paul M Zimmerman, and Vikram Gavini. Exact exchange-correlation potentials from ground-state electron densities. Nat. Commun., 10(1):1–9, 2019.DOI
  28. [28]Ashish Kumar, Rabeet Singh, and Manoj K Harbola. Universal nature of different methods of obtaining the exact Kohn–Sham exchange-correlation potential for a given density. J. Phys. B, 52(7):075007, 2019.
  29. [29]Yuming Shi and Adam Wasserman. Inverse Kohn–Sham density functional theory: Progress and challenges. J. Phys. Chem. Lett., 12:5308–5318, 2021.DOI
  30. [30]Jannis Erhard, Egor Trushin, and Andreas Görling. Numerically stable inversion approach to construct kohn–sham potentials for given electron densities within a gaussian basis set framework. J. Chem. Phys., 156(20), 2022.DOI
  31. [31]Soumi Tribedi, Duy-Khoi Dang, Bikash Kanungo, Vikram Gavini, and Paul M Zimmerman. Exchange correlation potentials from full configuration interaction in a slater orbital basis. The Journal of Chemical Physics, 159(5), 2023.DOI
  32. [32]T. Gould. Toward routine kohn–sham inversion using the “lieb-response” approach. J. Chem. Phys., 158:064102, 2023.DOI
  33. [33]Ayoub Aouina, Matteo Gatti, Siyuan Chen, Shiwei Zhang, and Lucia Reining. Accurate Kohn-Sham auxiliary system from the ground-state density of solids. Phys. Rev. B, 107(19):195123, 2023.DOI
  34. [34]Vaibhav Khanna, Bikash Kanungo, Jeffrey Hatch, Joshua Kammeraad, and Paul M Zimmerman. Exchange-correlation potentials and energy densities through orbital averaging and aufbau integration. The Journal of Physical Chemistry A, 129(18):4162–4173, 2025.DOI
  35. [35]Visagan Ravindran, Nikitas I. Gidopoulos, and Stewart J. Clark. Local exchange-correlation potentials by density inversion in solids. Phys. Rev. B, 112:085208, Aug 2025.DOI
  36. [36]Vaibhav Khanna, Soumi Tribedi, Bikash Kanungo, Vikram Gavini, and Paul M Zimmerman. Bridges from Wavefunction Theory to Density Functional Theory. Annual Review of Physical Chemistry, 77, 2026.DOI
  37. [37]Jonathan Schmidt, Carlos L Benavides-Riveros, and Miguel AL Marques. Machine learning the physical nonlocal exchange–correlation functional of density-functional theory. J. Phys. Chem. Lett., 10(20):6425–6431, 2019.DOI
  38. [38]Bikash Kanungo, Jeffrey Hatch, Paul M Zimmerman, and Vikram Gavini. Learning local and semi-local density functionals from exact exchange-correlation potentials and energies. Science Advances, 11(38):eady8962, 2025.
  39. [39]Rachel Garrick, Amir Natan, Tim Gould, and Leeor Kronik. Exact generalized Kohn-Sham theory for hybrid functionals. Physical Review X, 10(2):021040, 2020.
  40. [40]Bikash Kanungo, Paul M Zimmerman, and Vikram Gavini. A comparison of exact and model exchange–correlation potentials for molecules. The Journal of Physical Chemistry Letters, 12(50):12012–12019, 2021.arxiv.org/abs/2106.12476
  41. [41]Bikash Kanungo, Jeffrey Hatch, Paul M Zimmerman, and Vikram Gavini. Exact and model exchange-correlation potentials for open-shell systems. J. Phys. Chem. Lett., 14(44):10039–10045, 2023.DOI
  42. [42]Lin Lin. Adaptively compressed exchange operator. Journal of chemical theory and computation, 12(5):2242–2249, 2016.DOI
  43. [43]Vishal Subramanian, Bikash Kanungo, and Vikram Gavini. invDFT: A CPU-GPU massively parallel tool to find exact exchange-correlation potentials from groundstate densities. Computer Physics Communications, page 110218, 2026.
  44. [44]Mel Levy. Universal variational functionals of electron densities, first-order density matrices, and natural spin-orbitals and solution of the v-representability problem. Proceedings of the National Academy of Sciences, 76(12):6062–6065, 1979.pubmed.ncbi.nlm.nih.gov/16592733
  45. [45]Elliott H Lieb. Density functionals for coulomb systems. International journal of quantum chemistry, 24(3):243–277, 1983.
  46. [46]John P. Perdew and Yue Wang. Accurate and simple analytic representation of the electron-gas correlation energy. Phys. Rev. B, 45:13244–13249, Jun 1992.pubmed.ncbi.nlm.nih.gov/10001404
  47. [47]Alex P Gaiduk, Ilya G Ryabinkin, and Viktor N Staroverov. Removal of basis-set artifacts in Kohn–Sham potentials recovered from electron densities. Journal of chemical theory and computation, 9(9):3959–3964, 2013.DOI
  48. [48]Bikash Kanungo, Soumi Tribedi, Paul M Zimmerman, and Vikram Gavini. Accelerating inverse Kohn–Sham calculations using reduced density matrices. The Journal of Chemical Physics, 162(6), 2025.
  49. [49]Rogelio Cuevas-Saavedra, Paul W Ayers, and Viktor N Staroverov. Kohn–Sham exchange-correlation potentials from second-order reduced density matrices. J. Chem. Phys., 143(24):244116, 2015.
  50. [50]Egor Trushin, Steffen Fauser, Andreas Mö​lkner, Jannis Erhard, and Andreas Görling. Accurate correlation potentials from the self-consistent random phase approximation. Physical Review Letters, 134(1):016402, 2025.
  51. [51]RT Sharp and GK Horton. A variational approach to the unipotential many-electron problem. Phys. Rev., 90(2):317, 1953.DOI
  52. [52]James D. Talman and William F. Shadwick. Optimized effective atomic central potential. Phys. Rev. A, 14:36–40, Jul 1976.DOI
  53. [53]Claudia Filippi, CJ Umrigar, and Xavier Gonze. Separation of the exchange-correlation potential into exchange plus correlation: An optimized effective potential approach. Phys. Rev. A, 54(6):4810, 1996.DOI
  54. [54]Ilya G Ryabinkin, Alexei A Kananenka, and Viktor N Staroverov. Accurate and efficient approximation to the optimized effective potential for exchange. Phys. Rev. Lett., 111(1):013001, 2013.DOI
  55. [55]Sviataslau V Kohut, Ilya G Ryabinkin, and Viktor N Staroverov. Hierarchy of model Kohn–Sham potentials for orbital-dependent functionals: A practical alternative to the optimized effective potential method. J. Chem. Phys., 140(18):18A535, 2014.DOI
  56. [56]Yunkai Zhou, Yousef Saad, Murilo L Tiago, and James R Chelikowsky. Self-consistent-field calculations using Chebyshev-filtered subspace iteration. J. Comput. Phys., 219(1):172–184, 2006.DOI
  57. [57]Gerard LG Sleijpen and Henk A Van der Vorst. A Jacobi–Davidson iteration method for linear eigenvalue problems. SIAM review, 42(2):267–293, 2000.
  58. [58]Sambit Das, Phani Motamarri, Vishal Subramanian, David M Rogers, and Vikram Gavini. DFT-FE 1.0: A massively parallel hybrid CPU-GPU density functional theory code using finite-element discretization. Computer Physics Communications, 280:108473, 2022.
  59. [59]Sambit Das, Bikash Kanungo, Vishal Subramanian, Gourab Panigrahi, Phani Motamarri, David Rogers, Paul Zimmerman, and Vikram Gavini. Large-scale materials modeling at quantum accuracy: Ab initio simulations of quasicrystals and interacting extended defects in metallic alloys. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, pages 1–12, 2023.DOI
  60. [60]Adam A. Holmes, Norm M. Tubman, and C. J. Umrigar. Heat-bath configuration interaction: An efficient selectedconfiguration interaction algorithm inspired by heat-bath sampling. J. Chem. Theory Comput., 12:3674–3680, 2016.DOI
  61. [61]Adam A. Holmes, C. J. Umrigar, and Sandeep Sharma. Excited states using semistochastic heat-bath configuration interaction. J. Chem. Phys., 147:164111, 2017.DOI
  62. [62]Sandeep Sharma, Adam A. Holmes, Guillaume Jeanmairet, and C. J. Umrigar. Semistochastic heat-bath configuration interaction method: Selected configuration interaction with semistochastic perturbation theory. J. Chem. Theory Comput., 13:1595–1604, 2017.DOI
  63. [63]Junhao Li, Matthew Otten, Adam A. Holmes, Sandeep Sharma, and C. J. Umrigar. Fast semistochastic heat-bath configuration interaction. J. Chem. Phys., 149:214110, 2018.
  64. [64]Duy-Khoi Dang, Leighton W. Wilson, and Paul M. Zimmerman. The numerical evaluation of Slater integrals on graphics processing units. J. Comput Chem., 43:1680–1689, 2022.DOI
  65. [65]Alan D. Chien, Adam A. Holmes, Matthew Otten, C. J. Umrigar, Sandeep Sharma, and Paul M. Zimmerman. Excited states of methylene, polyenes, and ozone from heat-bath configuration interaction. J. Phys. Chem. A, 122:2714–2722, 2018.DOI
  66. [66]Duy-Khoi Dang, Joshua A. Kammeraad, and Paul M. Zimmerman. Advances in parallel heat bath configuration interaction. J. Phys. Chem. A, 127:400–411, 2023.DOI
  67. [67]Benjamin P Pritchard, Doaa Altarawy, Brett Didier, Tara D Gibson, and Theresa L Windus. New basis set exchange: An open, up-to-date resource for the molecular sciences community. Journal of chemical information and modeling, 59(11):4814–4820, 2019.DOI
  68. [68]Brian P Prascher, David E Woon, Kirk A Peterson, Thom H Dunning Jr, and Angela K Wilson. Gaussian basis sets for use in correlated molecular calculations. vii. valence, core-valence, and scalar relativistic basis sets for li, be, na, and mg. Theoretical Chemistry Accounts, 128(1):69–82, 2011.DOI
  69. [69]Rick A Kendall, Thom H Dunning Jr, and Robert J Harrison. Electron affinities of the first-row atoms revisited. systematic basis sets and wave functions. The Journal of chemical physics, 96(9):6796–6806, 1992.DOI
  70. [70]Thom H Dunning Jr. Gaussian basis sets for use in correlated molecular calculations. i. the atoms boron through neon and hydrogen. The Journal of chemical physics, 90(2):1007–1023, 1989.DOI
  71. [71]Erik Van Lenthe and Evert Jan Baerends. Optimized Slater-type basis sets for the elements 1–118. Journal of computational chemistry, 24(9):1142–1156, 2003.pubmed.ncbi.nlm.nih.gov/12759913

Paper details

vlnc:W_w49dktc2
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 10

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents