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 () [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 () and termed as the Kohn-Sham potential (). The most vital ingredient in is the exchange-correlation (XC) potential (), which encapsulates the quantum many-body interaction between the electrons as a universal functional of the density (). The exact form of 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 () 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 () corresponding to a given electron density (), 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 , 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 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 for the GKS orbitals, all ’s for which the matrix 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 ). 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 () 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.

Figure 1. Top panel: Schematic of the inverse GKS problem. Here the inversion is restricted to the prototypical GKS system containing a fraction () 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 and a prescribed nonlocal or local non-multiplicative operator, the inverse GKS problem is to determine the local multiplicative XC potential that yields . For simplicity, we restrict to the prototypical GKS system containing a fraction () 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
system is defined as
where is the number of electrons, is the exact exchange energy defined in terms of the GKS orbitals corresponding to , and denotes the remainder density-dependent XC energy. The inverse GKS seeks to find the remainder local multiplicative XC potential as well as the GKS orbitals . This can be posed as the following Levy-Lieb constrained optimization problem [44, 45, 7]:
where is the Slater determinant comprised of the GKS orbitals and denotes all Slater determinants which yield . The above constrained optimization can be recast as an unconstrained optimization by introducing a local multiplicative potential () as the Lagrange-multiplier field enforcing the density constraint, along with the Lagrange multipliers () that enforce the normalization condition on the GKS orbitals. In other words, we optimize the following Lagrangian with respect to and ,
with electron density . Optimizing with respect to yields the GKS eigenvalue problem
In the above, is the nonlocal exchange operator whose action on a function (say is given as
Upon solving Eq. (4), the derivative of with respect to is given by
Thus, the density mismatch provides the gradient for updating . The update for 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 operator and the corresponding -dependent local multiplicative potential. Upon convergence, we express , where is the nuclear potential and is the Hartree potential of . The above form of results in , and hence, allows us to extract the exact -dependent XC potential for .
We note that the GKS eigenvalue problem (Eq. (4)) is a nonlinear problem, as the input to the GKS Hamiltonian () depends on the solution ’s. Thus, the GKS eigenvalue problem needs to be solved self-consistently with respect to the ’s. We employ a nested optimization strategy. We start with a trial , and self-consistently solve Eq. (4) to obtain and , and then update using Eq. (6). This process is repeated until matches to a prescribed tolerance. We refer the readers to the bottom panel of Figure 1 for an overview of the algorithm.
The resulting and the corresponding ’s provide reference data to understand and develop better hybrid XC functionals. By obtaining an accurate reference energy () for the system from the many-body calculation, the inverse GKS can provide the exact XC energy, as: , where is the GKS non-interacting kinetic energy; is the Hartree energy; and is the nuclear-nuclear repulsive energy. Second, through Eq. (1), it also provides the exact remainder XC energy ().
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 . Within the GKS eigenvalue problem, it is action of the exchange operator () on the orbitals () 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 . 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 for the neon (Ne) atom obtained from a groundstate DFT calculation with full exact exchange (i.e., ) and the PW92 LDA correlation functional [46], solved using an FE basis. This test allows us to directly compare the obtained from the inverse GKS calculation with the PW92 correlation potential for (i.e. ). 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 norm of the error in density () is driven below . Figure 2 compares with the obtained from inverse GKS calculation on . As evident, the solution from inverse GKS is in good agreement with 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 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, , to the , given as
In the above, refers to the self-consistent density obtained using a systematically convergent FE basis with an approximate density functional. refers to the self-consistent density using the same approximate density functional, albeit solved using the AO basis used in the CI calculation. Broadly, captures the AO basis set error near the nuclei, and hence, helps in alleviating any basis set artifact in near the nuclei. We refer to Refs [27, 48] for the efficacy of the 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 correction in our previous works [27, 43]. Second, to alleviate any spurious behavior in stemming from the incorrect decay in , we enforce the known decay on the in the low density regime. Specifically, we set in regions where .
We present the exact and energies for different benchmark systems, each at five different values of . The energies we consider include the non-interacting kinetic energy (), the electrostatic energy (, where is the nuclear-nuclear repulsive energy), and the exact exchange energy () for these systems. The for represents the Kohn-Sham XC potential and that for represents the exact GKS correlation potential. All inverse GKS calculations are deemed converged when . Figure 3 shows the for different for the Ne atom. As evident, decreases by an order of magnitude with increasing . The intershell structure in (the hump in the potential around ) becomes less prominent with increasing . 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 for the LiH and molecules, respectively, each at their equilibrium geometry. Similar to Ne atom, the magnitude of and the intershell structure diminishes with increasing . Figure 6 shows the for benzyne (), which is a strongly correlated system. Given the high computational cost associated with inverse GKS for larger molecules, we limit the evaluation of for benzyne to only . As evident, the 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 ( and ) for these systems in Table 1. We find that, at least for these systems, the energies are largely insensitive to the choice of , 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.
| Ne | -116.4681 | -116.4681 | -116.4679 | -116.4666 | -116.4657 | |
| Ne | -12.0709 | -12.07544 | -12.07616 | -12.07775 | -12.07875 | |
| LiH(eq) | -5.8423 | -5.8421 | -5.8421 | -5.842 | -5.8418 | |
| LiH(eq) | -2.1432 | -2.1447 | -2.1449 | -2.1450 | -2.1452 | |
| CH | -66.3325 | -66.3322 | -66.3317 | -66.3284 | -66.3258 | |
| CH | -11.7246 | -11.7279 | -11.7303 | -11.7348 | -11.7379 | |
| Benzyne | – | – | – | – | -196.9517 | |
| Benzyne | – | – | – | – | -32.5065 |
Table 1. Energies for GKS potentials for Ne, LiH(eq), CH and benzyne (CH). , , and denote the non-interacting kinetic energy, the electrostatic energy, and the exact exchange energy, respectively. The energies are in Ha.

Figure 3. potentials for different fractions () of exact exchange for a Ne atom.
Figure 4. potentials for different fractions () of exact exchange for LiH molecule.
Figure 5. potentials for different fractions () of exact exchange for CH molecule.
Figure 6. for the benzyne molecule (CH), shown on the plane of the molecule.
Assessing common approximations to
Given the computational and numerical difficulty of inverse GKS, over the years, approximations to based on quantities available from inverse KS calculations have been pursued.
One such approximation, based on perturbative analysis, is [39, 50, 49]
where and denote the Kohn-Sham exchange and correlation potentials, respectively. The , where denotes the exchange energy evaluated using the exact Kohn-Sham orbitals (i.e., orbitals corresponding to ). Accordingly, , where is the exact Kohn-Sham XC potential. Evaluation of 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 , i.e., . In this work, we use this Hartree-Fock based approximation to and evaluate
Using our inverse GKS method, we test the approximation in Eq. (8) for . That is, we check if the exact GKS correlation potential () and KS correlation potential () are close to each other. Figure 7 compares the and 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 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 , , , and the mean-field energy (), evaluated using the orbitals () corresponding to and . We obtain the orbitals by self-consistently solving the GKS eigenvalue problem in Eq. (4) with set to and . This measures the differences in energies one would obtain, if the (which is exact) is replaced by 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 from GKS and KS correlation potentials are in good agreement ( mHa difference). Indeed, for LiH(eq) and CO(eq), even the individual energies (, , and ) are in good agreement. However, this changes for the stretched molecules (LiH(2eq) and CO(1.25eq)), where the energies show notable differences ( mHa). Overall, the 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).
| System | (Ha) | (Ha) | (Ha) | Diff. (mHa) | |||
| GKS | KS | GKS | KS | GKS | KS | (GKS - KS) | |
| Ne | 128.6005 | 128.5817 | -245.0662 | -245.0514 | -12.0788 | -12.0746 | -0.15 |
| LiH(eq) | 7.999 | 8.000 | -13.841 | -13.842 | -2.145 | -2.144 | 0.073 |
| LiH(2eq) | 7.799 | 7.787 | -13.691 | -13.692 | -2.004 | -1.979 | 11.50 |
| CO(eq) | 112.823 | 112.824 | -212.286 | -212.291 | -13.317 | -13.312 | -2.277 |
| CO(1.25eq) | 112.060 | 112.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. , , and denote the non-interacting kinetic energy, the electrostatic energy, and the exact exchange energy, respectively. .
Discussion
We have presented an accurate method to evaluate the exact local multiplicative potential () 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 to avoid numerical artifacts; and (iii) use of adaptively compressed exchange (ACE) approximation to the exchange operator () to substantially accelerate its action on orbitals. We have demonstrated the efficacy of our approach by obtaining the exact , for different ’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 ’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 , exact , and the corresponding orbitals (), 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 . Being a nonlinear problem, it needs to be solved self-consistently with respect to ’s. We employ a nested self-consistent strategy, where the outer loop updates the exchange operator () and the inner loop updates the orbitals (). To elaborate, in the outer loop we take a set of input orbitals () and define . Subsequently, in the inner loop, we solve the GKS eigenvalue problem with the fixed until self-consistency in the density () is reached. The output orbitals () from the inner self-consistent solve serves as the input () for the next iteration for the outer loop. We repeat the process until self-consistency in is achieved, i.e., until the difference in the exact energy () corresponding to and 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 (defined using ) and define its Hartree potential . We then solve the linear GKS eigenvalue in presence of and to find the output orbitals and its corresponding density . The serves as for the next iteration of the inner loop, which is continued until and match to a chosen tolerance.
Within the above nested self-consistent approach, the major computational cost stems from the action of on a set of orbitals . To elaborate, one needs to solve the inner linear eigenvalue problem (i.e., for a fixed and fixed ) using an iterative eigensolver (e.g., Chebyshev filtering [56] or Jacobi-Davidson [57]). Thus, one has to apply to a set of orbitals 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 inside the inner linear eigensolver. ACE is based on the idea that although the exchange-operator () 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 which closely span the space of , we define . Here the projection vectors are defined as , where and the is the Cholesky factor of the matrix: . That is, . The key idea is that as ’s get iteratively updated in the linear eigensolver, one can still approximate . This approximation is exact when ’s and ’s span the same space. Thus, as long as the ’s do not deviate much from ’s, ACE offers a good approximation for the action of on ’s. If and when the deviation between ’s and ’s exceed a tolerance, we update the ACE operator to . We note that the most expensive part of constructing the ACE operator is the evaluation of the . To elaborate, , where denotes a nonlocal evaluation. For efficient evaluation of , we recast it into a Poisson problem: . We solve it by discretizing the 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 . In this work, we use . All electrons were correlated. Gaussian basis sets were used for all systems except , 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 , the HBCI calculation was performed using the TZ2P Slater-type basis from the ADF program [71]. The density for ortho-benzyne () 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]Axel D Becke. Perspective: Fifty years of density-functional theory in chemical physics. The Journal of chemical physics, 140(18), 2014.DOI
- [2]P. Hohenberg and W. Kohn. Inhomogeneous electron gas. Phys. Rev., 136:B864–B871, Nov 1964.
- [3]Walter Kohn and Lu Jeu Sham. Self-consistent equations including exchange and correlation effects. Physical review, 140(4A):A1133, 1965.DOI
- [4]Isaiah Shavitt. The method of configuration interaction. In Methods of electronic structure theory, pages 189–275. Springer, 1977.DOI
- [5]Rodney J Bartlett and Monika Musial. Coupled-cluster theory in quantum chemistry. Reviews of Modern Physics, 79(1):291–352, 2007.DOI
- [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]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]Axel D Becke. A new mixing of Hartree–Fock and local density-functional theories. J. Chem. Phys., 98(2):1372–1377, 1993.DOI
- [9]Axel D Becke. Density-functional thermochemistry. iii. the role of exact exchange. J. Chem. Phys., 98(7):5648–6, 1993.DOI
- [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]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]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]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]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]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]Aron J. Cohen, Paula Mori-Sánchez, and Weitao Yang. Challenges for density functional theory. Chem. Rev., 112(1):289–320, 2012.DOI
- [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]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]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]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]David J Tozer, Victoria E Ingamells, and Nicholas C Handy. Exchange-correlation potentials. J. Chem. Phys., 105(20):9200–9213, 1996.DOI
- [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]Christoph R. Jacob. Unambiguous optimization of effective potentials in finite basis sets. J. Chem. Phys., 135(24):244102, 2011.DOI
- [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]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]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]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]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]Yuming Shi and Adam Wasserman. Inverse Kohn–Sham density functional theory: Progress and challenges. J. Phys. Chem. Lett., 12:5308–5318, 2021.DOI
- [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]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]T. Gould. Toward routine kohn–sham inversion using the “lieb-response” approach. J. Chem. Phys., 158:064102, 2023.DOI
- [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]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]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]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]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]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]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]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]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]Lin Lin. Adaptively compressed exchange operator. Journal of chemical theory and computation, 12(5):2242–2249, 2016.DOI
- [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]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]Elliott H Lieb. Density functionals for coulomb systems. International journal of quantum chemistry, 24(3):243–277, 1983.
- [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]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]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]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]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]RT Sharp and GK Horton. A variational approach to the unipotential many-electron problem. Phys. Rev., 90(2):317, 1953.DOI
- [52]James D. Talman and William F. Shadwick. Optimized effective atomic central potential. Phys. Rev. A, 14:36–40, Jul 1976.DOI
- [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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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]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








