# Connector theory for reusing model results to determine materials properties

Marco Vanzini, Ayoub Aouina, Martin Panholzer, Matteo Gatti, Lucia Reining

► To cite this version:

Marco Vanzini, Ayoub Aouina, Martin Panholzer, Matteo Gatti, Lucia Reining. Connector theory for reusing model results to determine materials properties. npj Computational Materials, 2022, 8, pp.98. 10.1038/s41524-022-00762-2 . hal-03663059

HAL Id: hal-03663059

https://hal.science/hal-03663059

Submitted on 26 Sep 2022

**HAL** is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>
ARTICLE **OPEN**

<figure><img src="image_2.png" /></figure>

Check for updates

Connector theory for reusing model results to determine
materials properties

Marco Vanzini<sup>1,2,3</sup>, Ayoub Aouina<sup>1,3</sup>, Martin Panholzer<sup>1,3,4,5</sup>, Matteo Gatti<sup>1,3,6</sup> and Lucia Reining<sup>1,3✉</sup>

The success of Density Functional Theory (DFT) is partly due to that of simple approximations, such as the Local Density Approximation (LDA), which uses results of a model, the homogeneous electron gas, to simulate exchange-correlation effects in real materials. We turn this intuitive approximation into a general and in principle exact theory by introducing the concept of a connector: a prescription how to use results of a model system in order to simulate a given quantity in a real system. In this framework, the LDA can be understood as one particular approximation for a connector that is designed to link the exchange-correlation potentials in the real material to that of the model. Formulating the in principle exact connector equations allows us to go beyond the LDA in a systematic way. Moreover, connector theory is not bound to DFT, and it suggests approximations also for other functionals and other observables. We explain why this very general approach is indeed a convenient starting point for approximations. We illustrate our purposes with simple but pertinent examples.

npj Computational Materials (2022)8:98; https://doi.org/10.1038/s41524-022-00762-2

INTRODUCTION

Computational materials design 1⁻³ is complicated by the complex-
ity of materials and by interaction effects. This hampers both
calculations and understanding. The fundamental problem lies in
the fact that the effects of the Coulomb interaction and of the
specific material cannot be separated. Otherwise, one could
calculate the interaction contributions once and for all, store them
and add them every time a new material is calculated. This is an
unreachable dream, but it still indicates an intriguing direction of
thinking: in some model systems the effects of the Coulomb
interaction can be treated exactly, or at least to a much better
extent than in real systems, and attempts to use model results in
order to approximately simulate interaction effects in real
materials are widespread. The most prominent example is the
local density approximation (LDA) to the exchange-correlation (xc)
energy whose functional derivative is the Kohn–Sham (KS) xc
potential $v_{xc}(\mathbf{r}; [n])$ of density functional theory (DFT)⁴. The exact
potential is unknown in most real materials. The LDA replaces
$v_{xc}(\mathbf{r}; [n])$ at a point $\mathbf{r}$ by its value in a homogeneous electron gas
(HEG) that is calculated at the density $n(\mathbf{r})$ of the real system in the
same point $\mathbf{r}$. In this way, DFT profits from the existence of
tabulated and interpolated Quantum Monte Carlo (QMC) results<fnref n="5" />.
Similarly, dynamical mean field theory in the single site
approximation takes the effective local self-energy from the
Anderson impurity model, and although in this case results have
not been tabulated, the procedure has enabled a realistic
description of correlated materials⁶.

However, in spite of numerous studies and attempts⁴,⁷⁻⁴⁴ it is
very difficult to go beyond these simple schemes. One reason is
that the very fact of using results of the models is considered as an
approximation from the start. This, however, is not inevitable. In
the present work, we pose the following questions: Can one
exactly the idea of re-using results from one system, for example
a model, to describe another system? If yes, under which

conditions? And does this suggest strategies for systematic
approximations? Our answer, termed connector theory (COT), is
an in principle exact connection between different systems, which
is used as starting point to find good approximations in practice.
As we will illustrate, it is a promising tool to design functionals, for
example within DFT. It is, however, much more general than just
density functionals and can be used to design other functionals,
and also to speed up calculations.

RESULTS

From the LDA to an exact xc potential

In order to face this challenge, let us first analyze the LDA from the
connector point of view. This seemingly simple approximation is
probably one of the main reasons for the early success of DFT.
Thanks to the LDA, many thousands of ground state calculations
could be performed in the KS scheme without ever recomputing
the exchange-correlation energy: indeed, the really involved
calculation was done once and forever using QMC, in the HEG.
In the LDA, these results are then used over and over again, for all
materials. This constitutes an invaluable gain. Of course, the idea
requires a prescription of how to use the HEG results.

The simple prescription given by the LDA reads $v_{xc}^{\text{LDA}}(\mathbf{r}; [n]) = v_{xc}^{h}(n_{\mathbf{r}}^{h})$, where $n_{\mathbf{r}}^{h} = n(\mathbf{r})$. In other words, one supposes that the xc potential of a material in a point $\mathbf{r}$ takes the same value as $v_{xc}^{h}$ in a HEG with a density $n_{\mathbf{r}}^{h}$. Note the subscript $\mathbf{r}$, which indicates that for every point in which the potential is to be determined, one may choose a different homogeneous density $n^{h}$. The LDA makes the guess that a reasonable choice for the homogeneous density that represents the material in $\mathbf{r}$ is $n(\mathbf{r})$, its local density.

Probably, both the power and the limitation of the LDA stem from
the fact that it is based on Kohn's ingenious intuition of
nearsightedness⁴,⁴⁵,⁴⁶, where the xc potential in a given point
doesn't know about the density elsewhere. This hypothesis not only

<footnote n="1">¹LSI, CNRS, CEA/DRF/IRAMIS, École Polytechnique, Institut Polytechnique de Paris, F-91120 Palaiseau, France. ²Theory and Simulation of Materials (THEOS), École Polytechnique Fédérale de Lausanne, CH-1015 Lausanne, Switzerland. ³European Theoretical Spectroscopy Facility (ETSF) https://www.etsf.eu. ⁴Johannes Kepler University Linz, Linz, Austria.</footnote>

<footnote n="5">⁵Uni Software Plus GmbH, Linzer Strasse 6, 4320 Perg, Austria. ⁶Synchrotron SOLEIL, L'Orme des Merisiers, Saint-Aubin, BP 48, F-91192 Gif-sur-Yvette, France.</footnote>

<footnote>✉email: lucia.reining@polytechnique.fr</footnote>
leads to a very simple prescription, it also justifies why results for the HEG can be used at all for systems that are extremely inhomogeneous, such as atoms: differences away from the point of interest are supposed to have no influence at all. The shortcoming, however, is that the hypothesis of nearsightedness gives no a priori clue of how to do better than the LDA, and straightforward attempts such as the first gradient corrections were not conclusive. Successful suggestions for better xc potentials were rather based on the fitting of parameters to known results$^{47,48}$, or, most importantly, on the use of exact constraints$^{18–22}$. One such attempt, which is may be the closest to our work, is the Weighted Density Approximation (WDA), where the sum rule on the xc hole was imposed in order to replace the local density by a suitably averaged one$^{11–15}$. Along the same lines, one also finds the Average Density Approximation$^{11,14}$ (ADA). However, while capable to overcome the failure of the LDA to describe image potential effects$^{49}$, also the WDA and ADA did not lead to more systematic developments and are rarely used today.

Still, these approaches based on averaged densities were pioneering and suggest an interesting question: which homogeneous density $n_r^h$ would represent the real system best in each point $\mathbf{r}$, and could one even find a prescription where $v_{xc}^h(n_r^h)$ exactly equals the xc potential of the real material? We know that $v_{xc}^h(n^h)$ as a function of $n^h$ takes values spanning a range of all negative real numbers. This means that as long as the xc potential of the real system is negative in a given point, it equals the xc potential of the HEG with a specific, though unknown, homogeneous density $n_r^c$:

$$v_{xc}(\mathbf{r}; [n]) = v_{xc}^h(n_r^c). \qquad (1)$$

In other words, the task to find $v_{xc}(\mathbf{r}; [n])$ can be reformulated as the task to find $n_r^c[n]$. This quantity, which is itself a functional of the density, is the prescription of how to use the HEG in order to represent the real system: we call it the connector. The exact connector reads

$$n_r^c[n] = (v_{xc}^h)^{-1}(v_{xc}(\mathbf{r}; [n])) \qquad (2)$$

Since $v_{xc}^h$ is a monotonic function the inversion poses no problem. There are, however, two issues with these equations: first, Eq. (1) has no solution when the xc potential of the real system is positive. This is not the usual case, but it can happen in certain points in some systems; for example the xc potential of some linear molecules builds up a positive bump upon dissociation, see, e.g.,$^{50–55}$. We will discuss in Sec. Generalization how to potentially face the problem. Second, Eq. (2) is our exact starting point, but it cannot be used in practice, because it expresses the connector in terms of the xc potential of the real system, which is the unknown that we are looking for. However, having an in principle exact relation is extremely precious, since it allows one to make controlled approximations.

For this, let us formulate the problem differently: the function $v_{xc}^h(n^h)$ is a more compact representation of $v_{xc}(\mathbf{r}; [n])|_{\bar{n}(\bar{r})=n^h}$, the functional $v_{xc}$ restricted to the domain of homogeneous densities. In other words, we could have equally expressed Eq. (1) as

$$v_{xc}(\mathbf{r}; [\bar{n}])|_{\bar{n}(\bar{r})=n(\bar{r})} = v_{xc}(\mathbf{r}; [\bar{n}])|_{\bar{n}(\bar{r})=n_r^c} \qquad (3)$$

the equation requires that the functional $v_{xc}$ takes in each point $\mathbf{r}$ the same value for at least two different density distributions, namely, for the $n(\bar{r})$ of interest and for some homogeneous density of value $n_r^c$. The same functional appears on both sides of the equation, we only restrict the domain of allowed densities on the right side. Therefore, one can expect that by making the same approximation on both sides, a similar error is made, which means that we can benefit from massive error canceling if we determine an approximate connector

$$n_r^{c, \text{approx}}[n] = (v_{xc}^{h, \text{approx}})^{-1}(v_{xc}^{\text{approx}}(\mathbf{r}; [n])) \qquad (4)$$

With the approximate connector being close to the exact one, the connector approximation for the xc potential defined as

$$v_{xc}^c(\mathbf{r}; [n]) = v_{xc}^h(n^h = n_r^{c, \text{approx}}([n])) \qquad (5)$$

can yield good results since $v_{xc}^h(n^h)$ is a smooth function. Note that in Eq. (5) the HEG potential $v_{xc}^h$ appears without approximation, which is a crucial point, as it allows us to benefit from the knowledge encoded in the model.

Of course, such an approximate xc potential is not, in general, the functional derivative of an energy functional $E_{xc}$. There are various ways to reconstruct an energy functional starting from some $v_{xc}^{\text{approx}}$, leading to different results that may have problems such as a lack of translational or rotational invariance, see, e.g., refs. $^{56–58}$. Using COT, one might think to explore $E_{xc}^{\text{approx}} \equiv \int d\mathbf{r} n(\mathbf{r}) \epsilon_{xc}^h(n_r^{c, \text{approx}})$ with $\epsilon_{xc}^h$ the energy density per particle of the HEG. Again, $v_{xc}^h(n_r^{c, \text{approx}})$ will in general not be the functional derivative of this $E_{xc}^{\text{approx}}$. Moreover, the exact connector for $\epsilon_{xc}$ is not the same as the exact connector for $v_{xc}$: the connector is in general different for every object of interest (see also Eq. (11) below). Hence, it is not obvious that a $n_r^{c, \text{approx}}$ which yields a good approximation for $v_{xc}$ also yields a good approximation for $E_{xc}$. Exploring total energies using COT is therefore a topic on its own, which goes beyond the scope of the present work.

Let us now come back to $v_{xc}$ and formulate a concrete proposal for a connector approximation. A potentially useful approximate connector functional for $v_{xc}$ involves an approximation for which both $v_{xc}^h$ and $v_{xc}^{h, \text{approx}}$ are known. Here we explore the choice of a first-order expansion around a given homogeneous density$^{4,59}$ $n_0$ as approximation in Eq. (4). The approximated potentials in the real and in the homogeneous system read, respectively:

$$\begin{aligned} v_{xc}^{\text{approx}}(\mathbf{r}; [n]) &= v_{xc}^h(n_0) + \int d\mathbf{r}' (n(\mathbf{r}') - n_0)f_{xc}(|\mathbf{r} - \mathbf{r}'|; n_0) \\ v_{xc}^{h, \text{approx}}(n^h) &= v_{xc}^h(n_0) + (n^h - n_0)f_{xc}^h(n_0), \end{aligned} \qquad (6)$$

where $f_{xc}(|\mathbf{r} - \mathbf{r}'|; n_0) = \delta v_{xc}(\mathbf{r}, [n]) / \delta n(\mathbf{r}')|_{n_0=n_0}$ is the static non-local xc kernel of the HEG with density $n_0$, and $f_{xc}^h(n_0) = \frac{d v_{xc}^h(n_h)}{d n_h}|_{n_h=n_0}$ is its limit of zero wavevector, which corresponds to the case where variations are restricted such that the density remains homogeneous, i.e., we remain within the parameter space given by the model. The approximate connector of Eq. (4) is obtained by equating the two expressions, and solving for $n^h$. The solution is

$$n_r^{c, \text{approx}}([n]) = \frac{1}{f_{xc}^h(n_0)} \int d\mathbf{r}' n(\mathbf{r}') f_{xc}(|\mathbf{r} - \mathbf{r}'|; n_0) \qquad (7)$$

This is then used to obtain $v_{xc}^c$ according to the prescription of Eq. (5). For a density of the real system that varies slowly on the scale of spatial decay of $f_{xc}(|\mathbf{r} - \mathbf{r}'|)$ the connector tends to $n_r^{c, \text{approx}}([n]) = n(\mathbf{r})$, the LDA, which is exact in the limit of slowly varying density$^4$. This is therefore a systematic way to derive the LDA. For a very quickly varying periodic density the connector $n_r^{c, \text{approx}}$ tends to the mean density, as one would expect. This limit is missed by the LDA. The approximate connector interpolates between the two limits: $n_r^c$ displays the degree of nearsightedness of the xc potential.

For the $f_{xc}$ of the HEG, parametrized data are available$^{60,61}$. Equation (7) is one of our major results: $v_{xc}^c(\mathbf{r}; [n]) = v_{xc}^h(n_r^{c, \text{approx}}[n])$ is a truly non-local density functional. It benefits from the knowledge of both $v_{xc}$ and $f_{xc}$ in the HEG, i.e., from high-level calculations that were performed once and for all in this model. It is therefore perfectly in line with our goal to build functionals containing pre-calculated complex ingredients, similarly to constructions using complex Lego pieces instead of simple bricks.

The linear approximation depends on the homogeneous density $n_0$ around which we expand. This density may be chosen
<figure><img src="image_3.png" /><figcaption>**Fig. 1** Target WDA xc potential, and approximations, for a system with periodic density. Target $v_{xc}^{WDA}(\mathbf{r}:|n|)$ (red line). Coulomb cutoff at short-range (s.-r.): direct approximation (dotted green) and used via the connector (dotted green with filled circles); linear expansion: direct approximation (blue dashed) and used via the connector (blue dashed with filled circles); LDA (yellow line). Minimum and maximum densities are $0.0402 a_0^{-3}$ and $0.3776 a_0^{-3}$, reciprocal lattice vector $a = 0.93 a_0^{-1}$.</figcaption></figure>

to be a different one for every point **r** where we calculate the potential. To focus on the improvement with respect to the LDA, in the following we choose for $n_0$ the local density $n(\mathbf{r})$, i.e., the direct approximation is a first-order expansion around the LDA. In principle, $n_0$ can be further optimized, but this simple choice suits the purpose of the present paper.

We will now examine to which extent our functional can correctly describe non-local effects. The exact xc potential is of course not known, and the search for a simple but reliable KS exchange-correlation potential $v_{xc}(\mathbf{r}:|n|)$ beyond the LDA is still a subject of intense research (see e.g., 11-22,62-66). This makes a direct benchmarking of the improvement of our functional with respect to the LDA difficult. We therefore take an established non-local functional as target, and we will do all approximations and calculations consistently with respect to this functional. It is important to note that the aim is not to elucidate the quality of the target functional, but to use it as benchmark for the connector approach. In particular, we will show how the connector yields the LDA in the simplest approximation, and how well it can capture non-local effects beyond the LDA in a systematic way.

We choose as target functional an expression based on the WDA of the xc hole $n_{xc}^{11-14}$, with the weight function proposed in ref. 15. The xc energy reads

$$E_{xc}^{WDA}[n] = \int d\mathbf{r} d\mathbf{r}' \frac{\mathbf{n}(\mathbf{r})\mathbf{n}(\mathbf{r}')}{2|\mathbf{r}-\mathbf{r}'|} C(\mathbf{n}(\mathbf{r}, \mathbf{r}')) \left(1 - e^{-\frac{\lambda(n(\mathbf{r}, \mathbf{r}'))}{|\mathbf{r}-\mathbf{r}'|}}\right), \quad (8)$$

with $\tilde{n}(\mathbf{r}, \mathbf{r}') = [n(\mathbf{r}) + n(\mathbf{r}')]/2$ as in ref. 49 and the Coulomb interaction $1/|\mathbf{r}-\mathbf{r}'|$ appearing at two places, as factor in the integral and in the exponent to the fifth power. The functions C and $\lambda$ are set by the sum rule $\int d\mathbf{r}' n_{xc}(\mathbf{r}, \mathbf{r}' - \mathbf{r}) = -1$, and by making $E_{xc}$ exact in the HEG. The functional derivative of $E_{xc}^{WDA}$ with respect to the density yields the exchange-correlation potential $v_{xc}^{WDA}$ that is given in the Supplementary Note 1, together with the functions C and $\lambda$. Our aim is to approximate this potential for a given density.

We take as density of the 'real system' the periodic density $n(\mathbf{r}) = A \cos(\mathbf{a} \cdot \mathbf{r}) + B$, with reciprocal lattice vector **a** and parameters A and B. Here **a** and the maximum density correspond to the case of solid argon. This yields the target potential $v_{xc}^{WDA}$ shown in Fig. 1. It is negative for all systems examined in our work, so it can in principle be reproduced by $v_{xc}^h$. We suppose now that this target potential is unknown (as it is the case for the exact xc potential), but that we are able to evaluate it in some approximation.

Before we come to the approximation proposed in Eq. (7), let us make a more drastic approximation, namely, we cut the Coulomb

<figure><img src="image_4.png" /><figcaption>**Fig. 2** Comparison of connector densities. Exact WDA connector $n_{xc}^{c, WDA}$ (red line), connector based on a linear expansion in the density as given by Eq. (7) (blue line), and the density itself, corresponding to the local density approximation connector (yellow line), for the periodic system of Fig. 1.</figcaption></figure>

potential $1/|\mathbf{r}-\mathbf{r}'|$ in Eq. (8) to zero beyond a distance $r_c$. This cutoff now appears as limit of the integral boundaries in Eq. (8) and in the corresponding $v_{xc}^{WDA}$. For $r_c \to 0$ the integral vanishes. For illustration we take $r_c = 0.1 a_0$, $<2\%$ of the unit cell length. This $r_c$ yields an almost vanishing $v_{xc}^{approx}$, which is of course very different from the exact result. Now we follow instead the connector scheme, using the same approximation for both $v_{xc}^{approx}$ and $v_{xc}^{h,approx}$ in Eq. (4). The resulting connector density $n_{xc}^{c,approx}$ is very close to the local density and the connector result for the xc potential, $v_{xc}^c$ obtained from Eq. (5) and shown in Fig. 1, tends to the LDA. This is a huge gain. The physical reason is that we do not apply the approximation to the potential, but only to the way the potential in a given point 'sees' the environment, limiting it, for $r_c \to 0$, to the environment close to the point **r** where the potential is calculated. We therefore obtain a much more meaningful result. The huge improvement of the final connector result with respect to the approximation applied directly to $v_{xc}$ makes the LDA a prototype illustration for the power of the connector approach.

Still, the LDA has significant errors especially in regions of low density, because the approximation is too crude. In principle one could remedy by increasing the range of the Coulomb interaction, going systematically toward the exact result. However, this approximation would be of limited practical interest. Instead, we will now test our approximation Eq. (7). Although the numerically exact static $f_{xc}$ is known in the HEG, in order to be consistent within our benchmark framework, here we use the WDA $f_{xc}^{WDA}$ for homogeneous densities$^{67}$, which is derived from $v_{xc}^{WDA}$ and given in the Supplementary Note 1.

Let us first look at the performance of the linear approximation itself, used directly on the potential (first line of Eq. (6)). The comparison in Fig. 1 shows that the WDA potential is well described by the direct linear approximation $v_{xc}^{approx}$ in regions of high density (large $|v_{xc}|$), but not where the density is low. We now move on to the connector scheme, and first examine the connector density $n_r^c$ given by Eq. (7) and shown in Fig. 2 for the same periodic system as above. The connector density that yields the LDA is simply $n_r^c = n(\mathbf{r})$, the density itself, which has its minimum in the middle of the unit cell. The exact WDA connector $n_r^{c, WDA} = (v_{xc}^{h, WDA})^{-1}(v_{xc}^{WDA}(\mathbf{r};|n|))$ spans a smaller range of values than the local density, confirming that it represents an effective density that is suitably averaged over a range around the local density. It is far from trivial, even in this simple system: where the density is very low, the exact connector WDA shows a bump, which is a feature that would not be easy to guess. One may explain it with the fact that in regions of low density the system is more far-sighted, which, in the present system, mixes in more of the higher densities, and with the non-monotonic distance dependence of effective interactions, such as $f_{xc}^{WDA}$. The approximate connector density, evaluated according to Eq. (7) with WDA
<table><caption>**Table 1.** Summary of the general COT approach and its declinations.</caption><thead><tr><th></th><th>Kohn-Sham</th><th>General</th><th>1D potential</th><th>Band structure</th></tr></thead><tbody><tr><td>Object of interest</td><td>v<sub>xc</sub>(r; [n])</td><td>O(x; [Q])</td><td>E(j; ω<sub>0</sub>, L)</td><td>G<sub>KK</sub>(k, ω; [V])</td></tr><tr><td>Model</td><td>HEG</td><td>t.b. chosen</td><td>1D square well</td><td>HEG</td></tr><tr><td>Object in model</td><td>v<sup>h</sup><sub>xc</sub>(n<sup>h</sup>)</td><td>O<sub>x</sub>(Q)</td><td>E<sub>j</sub>(L) = π<sup>2</sup>j<sup>2</sup>/(2L<sup>2</sup>)</td><td>G<sub>kωK</sub>(V)</td></tr><tr><td>Connector</td><td>n<sup>c</sup><sub>r</sub>[n]</td><td>Q<sup>c</sup><sub>x</sub>[Q]</td><td>L<sup>c</sup><sub>ω<sub>0</sub>L</sub> = <sup>nj</sup>&frasl;<sub>&radic;2E(j; ω<sub>0</sub>, L)</sub></td><td>V<sup>c</sup><sub>kωK</sub></td></tr><tr><td>Approximation</td><td>1st order in density<sup>a</sup></td><td>t.b. chosen</td><td>1<sup>st</sup> order in curvature</td><td>transferability</td></tr><tr><td>Appr. real</td><td>v<sup>h</sup><sub>xc</sub>(n<sub>0</sub>) + ∫dr'(n(r') - n<sub>0</sub>)f<sub>xc</sub>(|r - r'|; n<sub>0</sub>)</td><td>O<sup>approx</sup>(x; [Q])</td><td>E<sup>approx</sup>(j; ω<sub>0</sub>, L)</td><td>G(k) ≈ G(k<sub>0</sub>)</td></tr><tr><td>Appr. model</td><td>v<sup>h</sup><sub>xc</sub>(n<sub>0</sub>) + (n<sup>h</sup> - n<sub>0</sub>)f<sup>h</sup><sub>xc</sub>(n<sub>0</sub>)</td><td>O<sup>approx</sup>(Q)</td><td>E<sup>approx</sup>(L̄)</td><td>G<sub>k</sub> ≈ G<sub>k<sub>0</sub></sub></td></tr><tr><td>Appr. connector</td><td>n<sup>c,approx</sup>[n] = <sup>1</sup>&frasl;<sub>f<sup>c</sup><sub>x</sub>(n<sub>0</sub>)</sub> ∫dr' n(r')f<sub>xc</sub>(|r - r'|; n<sub>0</sub>)</td><td>Q<sup>c,approx</sup><sub>x</sub></td><td>L<sup>c,approx</sup><sub>ω<sub>0</sub>L</sub></td><td>V<sup>c,approx</sup><sub>kωK</sub> = V<sup>c</sup><sub>k<sub>0</sub>ωK</sub></td></tr><tr><td>Appr. result</td><td>v<sup>h</sup><sub>xc</sub>(n<sup>c,approx</sup>[n])</td><td>O<sub>x</sub>(Q<sup>c,approx</sup><sub>x</sub>)</td><td>E<sub>j</sub>(L<sup>c,approx</sup><sub>ω<sub>0</sub>L</sub>)</td><td>G<sub>kωK</sub>(L<sup>c,approx</sup><sub>kωK</sub>)</td></tr></tbody></table>

The general COT approach (third column) is compared to its declination for the illustrations discussed in the present paper: the derivation of a particular Kohn-Sham xc potential beyond the LDA (second column), the calculation of energy levels in a box (fourth column), and the calculation of band structures of crystals (last column). Equation numbers refer to the text and are given when adding useful information.

<sup>a</sup>Or cutoff Coulomb.

ingredients, captures this effect very well, with a remaining discrepancy that is much smaller than the one of the local density.

Finally, we use the approximate connector density in Eq. (5) together with the exact WDA xc potential $v_{xc}^{h, WDA}$ of the HEG to obtain the approximate connector xc potential $v_{xc}^c$. Figure 1 shows that it gives by far the best result of all approximations, illustrating the fact that the connector Eq. (7) takes into account a significant amount of non-locality. It demonstrates that, by using the very same linear expansion through the connector instead of applying it directly, strong improvement is obtained, without additional cost.

This benchmark shows that the connector strategy is very promising. Note that also in the case of the true many-body problem, the connector defined in Eq. (7) can be used to construct an approximate density functional for $v_{xc}$. In this case, the xc kernel, $f_{xc}(|r - r'|; n_0)$, should be the one of the HEG obtained from a QMC calculation$^{60,61}$. The implementation of this $v_{xc}$ will be left to future work. Our aim in the present work is to elucidate to which extent the approach can be formulated and applied as a very general concept. In the following, we will propose the corresponding formalism, which we term COT.

## Generalization

The general idea can be summarized as follows: suppose one wishes to calculate an observable or quantity $O$ that is a functional of a function $Q$, and that can depend on additional arguments $x$, so $O = O(x; [Q])$. Above, $O$ was the xc potential $v_{xc}(r; [n])$, the argument $x$ was the spatial coordinate $r$ and $Q$ a function, the density $n(\bar{r})$, but there are many other possibilities. For clarity, Table 1 summarizes the general approach in strict parallel to the specific realization of the KS potential, as well as the additional examples given later.

In most cases $O(x; [Q])$ is difficult or impossible to calculate in a real material without approximations, or even unknown. However, it may be possible to calculate $O(x; [Q])$ for some $Q$ in a restricted domain: this restricted domain defines a model. Above, where $Q$ was the electron density, the restricted domain of homogeneous densities defined the HEG as model. Connector theory (COT) aims at using the model results in order to simulate systems where $Q$ lies outside the model domain. The goal is therefore to find, for a given real system described by $Q$, at each point $x$ another function $Q_x^c$ that lies in the model domain, such that

$$O(x, [\bar{Q}])_{\hat{Q}(\bar{y})=Q(\bar{y})} = O(x, [\bar{Q}])_{\hat{Q}(\bar{y})=Q_x^c(\bar{y})} \quad (9)$$

This is the straightforward generalization of Eq. (3) above. Note also here the subscript $x$ of $Q_x^c$, which indicates that $Q_x^c$ is allowed to be different for every value of the argument $x$. For the sake of

generality, we have kept the explicit argument $x$ on the right side, but as we have seen above, in some cases $O(x, Q_x^c)$ may depend on $x$ only through $Q_x^c$.

To arrive at the generalization of Eq. (1), in the following we suppose that, because the model is simple, it can be described by only one effective parameter $Q$ or, when there are more parameters, we can choose one that will be used to fulfill Eq. (9). This restriction can be dropped, but it is often useful and we keep it here for clarity. In this case, in the model the functional or multi-dimensional function can be represented by a simple function, $O(x; [Q_x^c]) \to O_x(Q_x^c)$. For example, in the HEG the one parameter $Q$ is its number density $n^h$, so $v_{xc}(r; [\bar{n}])_{\bar{n}|\bar{r}} = n^h \to v_{xc}^h(n^h)$, where $v_{xc}^h$ corresponds to $O$ and $n^h$ to $Q$. The equivalent of Eq. (1) reads then

$$O(x; [Q]) = O_x(Q_x^c) \quad (10)$$

Of course, even allowing $Q_x^c$ to be different for every $x$ it could be impossible to fulfill Eq. (10) if one restricts the model domain too severely. However, if the model is flexible enough such that the equation can be satisfied in principle, one can try to find the one or more $Q_x^c$ for which the equality holds. In other words, for the idea to be applicable the following condition must be satisfied:

* [A] On its domain of definition, $O_x(Q_x^c)$ must yield all values that $O(x; [Q])$ can take on its domain, i.e., the functions $Q$ of interest.

The $Q$ which define the domain of interest depend on the range of physical systems one wants to explore; this range does not necessarily include all possible physical systems. The domain of $O$, on the other hand, defines the model system. If for certain $Q$ and/or $x$ Eq. (10) cannot be fulfilled, we have to change model by changing its domain, i.e., the range of allowed $Q_x^c$.

Equation (10) is then formally solved,

$$Q_x^c = O_x^{-1}(O(x; [Q])) \quad (11)$$

this is the exact connector for an observable $O$ in a system described by a function $Q$, the generalization of Eq. (2). This operation requires inversion of $O_x$, which brings us to a second condition. Indeed, [A] is the only necessary condition, but there is also a question of uniqueness in Eq. (11): $O^{-1}$ may require boundary conditions in order to be well defined. This is not a problem of principle, but may create difficulties for the design of approximations. We therefore require:

* [B] When the inverse $O^{-1}$ of $O$ is not unique, it should at least be possible to specify a unique choice among the possible $O_i^{-1}$.
In turn, when $Q_x^c$ is known it can be used to get the observable in the real system using the model, through Eq. (10). As in the case of DFT and the LDA, the general scheme suggests to store $O_x$ as numerical data, interpolated analytic expression or, in some cases, analytic result. Once a connector $Q_x^c$ is given, for any real system one can then simply use these data instead of calculating $O(x; [Q])$, which will make calculations extremely efficient. This concept of re-using data has made the LDA a breakthrough, since numerous calculations could be performed without ever re-evaluating the interaction effects in the HEG, and it would be highly desirable to extend it not only well beyond the LDA, but also beyond DFT itself.

To make the idea useful in practice, we also have to generalize the approximation scheme Eq. (2) and Eq. (5), which straightforwardly yields

$$Q_x^{c, \text{approx}} = (O_x^{\text{approx}})^{-1}(O_x^{\text{approx}}(x; [Q])) \quad (12)$$

The final approximate connector result is obtained as

$$O(x; [Q]) \approx O_x^c \equiv O_x(Q_x^{c, \text{approx}}) \quad (13)$$

Note that the model observable $O$ is supposed to be well known, but it is important to approximate it in Eq. (12) in the same way as $O$ of the real system, whereas the exact model function $O$ is used in Eq. (13). This guarantees that by choosing a model that approaches the real system, the connector potential approaches the exact one, even when a quite rough approximation is used. The exact result is also approached with an increasingly good approximation, for any, even rough, model.

Away from these limits, using the equivalent approximation in $O^{\text{approx}}(x; [Q])$ and $O_x^{\text{approx}}(Q)$ still leads to error cancelling, and the limiting behavior indicates that results can be improved in a controllable way. How far the model system can be chosen from the real system depends on the quality of the approximation, and vice versa, how rough the approximation is that one can tolerate depends on the closeness of the model and the real system. This double dependence is a source of the power of the connector approach. It implies that one can expect the approximate connector result Eq. (13) to be superior to the direct approximation $O^{\text{approx}}(x; [Q])$, for similar computational cost. This benefit will be larger when the model contains important features of the real system, like in the example of the xc potential, the Coulomb interaction. Therefore, in COT the main effort and intuition will go into the choice of a suitable model.

## Illustration

For a simple illustration of COT outside DFT-LDA, we first look at energy levels in a toy system: we take one electron in a one-dimensional potential of shape $V(z) = \frac{1}{2}m\omega_0^2(|z| - \frac{L}{2})^2\theta(|z| - \frac{L}{2})$, with $\omega_0$ and $L$ real positive parameters$^{68}$. For $L \to 0$ this is the oscillator potential, and for $\omega_0 \to \infty$, the infinite potential well $V_\infty(z) = V_0\theta(|z| - \frac{L}{2})$, with $V_0 \to \infty$. These potentials and their energy levels are schematized in panel a of Fig. 3 (see also the Supplementary Note 2 and Supplementary Fig. 1 for further details). The $j^{th}$ energy level $E(j; \omega_0, L)$ is our observable of interest corresponding to $O(x; [Q])$. The third column in Tab. 1 summarizes this and the subsequent steps for this example. The numerically exact $E(j; \omega_0, L)$ are shown in panel b of Fig. 3 as function of $\alpha = 1/(L^2\omega_0)$. This parameter is a measure of the difference between the real system and the infinite potential well, which vanishes for $\alpha \to 0$. Next, we choose an approximation. Here, we take a first-order perturbation expansion around the infinite well, i.e., $\alpha = 0$, with width $L$. The expansion parameter is then $\alpha$. Figure 3 shows the resulting approximate energy levels $E^{\text{approx}}(j; \omega_0, L)$. As expected from perturbation theory, they are close to the exact $E(j; \omega_0, L)$ for small $\alpha$ and deviate for larger values, becoming unphysically negative above

<figure><img src="image_5.png" /><figcaption>Fig. 3 Energy levels in a one-dimensional potential. a In gray, sketch of the potential $V(z)$ (see text), as a function of $z$ for $L=1$, and different values of $\alpha = 1/(L^2\omega_0)$. In red, the lowest energy levels $E(j)$. The first six of these are shown in the bottom (b), as a function of $\alpha$: the continuous red line is the exact result. Blue dashed, $E_j^{\text{approx}}$ of first-order perturbation theory. Blue dashed line with symbols, connector results $\varepsilon_j(L_j^{c, \text{approx}})$. On the left side, the levels $\varepsilon_j(L)$ of an infinite potential well of width $L=1$, which is the $\alpha \to 0$ result.</figcaption></figure>

a critical threshold. To apply COT, we now define the model domain to cover all possible infinite square wells, characterized by a width $\tilde{L}$ and yielding energies $\varepsilon_j(\tilde{L}) = \pi^2 j^2/(2\tilde{L}^2)$. It is intuitive to suppose that the effect of $\alpha$ can be simulated by varying the width $\tilde{L}$ of the model potential, i.e., to suppose that each level sees a surrounding with some effective width. COT tells us to search for the effective width that best represents the real system. Condition [A] is fulfilled for any potential with positive eigenvalues if we accept to have a different connector, i.e., a different effective width, for every energy level, since the energy levels in an infinite potential well can take any positive value. The exact solution would be the connector width $\tilde{L} = L^c$ for which $\varepsilon_j(L_j^c(\omega_0, L)) = E(j; \omega_0, L)$. Here, we have chosen to connect the energy levels one by one. This would be a reasonable choice also to connect, for example, poles of Green's functions.$^{69}$ Since the energies $\varepsilon_j(\tilde{L})$ of an infinite potential well with width $\tilde{L}$ go as $1/\tilde{L}^2$, there is no unique inverse $\varepsilon_j^{-1}(E)$. However, one of the two solutions of the resulting quadratic equation for $L_j^c$ is negative and can be discarded by using positivity as exact constraint, so our example also fulfills condition [B]. Our approximation strategy, which avoids the calculation of $E(j; \omega_0, L)$, is to expand also the model around the infinite square well ($\alpha = 0$) with width $L$. Hence, $L_j^{c, \text{approx}} = (\varepsilon_j^{\text{approx}})^{-1}(E^{\text{approx}}(j))$, and the final result is $E_j^c = \varepsilon_j(L_j^{c, \text{approx}})$. Note that in the last step the exact model function $\varepsilon_j$ is used, as prescribed by Eq. (13). While obtained with a similar computational cost, the connector results $E_j^c$ in Fig. 3 are much better than the direct approximation $E^{\text{approx}}(j)$, and they remain physical over the whole parameter range, which reflects an implicit approximate resummation of perturbation theory to infinite order through the use of the exact model $\varepsilon_j$. The connector $L_j^c$ formalizes the intuitive interpretation of an effective width that determines the energy levels in the real system and shows that this effective width is approximately independent of $j$.
<figure><img src="image_6.png" /><figcaption>Fig. 4 Band structure of cubic helium. The energies are aligned to the Fermi energy. a White lines are the bands resulting from the direct approximation, where the energies results at all k-points equal those at k₀. b Connector result, plain (intensity plot) and constrained (blue dots), following the prescription in the text. c Comparison of first principles results (red line) with constrained connector (blue dots). In white, HEG folded into the Brillouin zone of helium and attached to the second band at Γ. For comparison of the lowest band, which corresponds to a localized state, the lowest HEG band is used.</figcaption></figure>

(see Supplementary Note 2). This result indicates a promising route to obtain quick estimates for energy levels.

Finally, we will look at a more realistic system and, most importantly, at a completely different approximation, since besides the Coulomb cutoff, the above examples used perturbation theory as approximation. The observable will be a band structure obtained from the poles of the KS Green's function G, the real material is solid cubic helium⁷⁰ with given KS potential V(r), and as model system we choose the HEG, as summarized in the last column of Table 1. The KS band structure of cubic He is shown in panel c of Fig. 4: the occupied state is very flat, whereas the empty bands strongly disperse with k in the BZ. Our approximation is to calculate the exact energy levels at Γ but to neglect dispersion, which, if applied directly to the observable, would yield the flat bands in panel a of the figure, obviously far from reality.

In order to apply COT, we connect G to the Green's function of the HEG

$$G_{KK}(\mathbf{k}, \omega; [V]) = G_{k\omega\mathbf{K}}(V^{c}_{k\omega\mathbf{K}}), \quad (14)$$

where K are reciprocal lattice vectors. The Green's function of the HEG is diagonal in K, so we can represent it by $G_{k\omega\mathbf{K}}$, which is a function of $\mathbf{k} + \mathbf{K}$ and of the homogeneous potential $V^c$,

$$G_{k\omega\mathbf{K}}(V^c) = \frac{1}{\omega - |\mathbf{k} + \mathbf{K}|^2 / 2 - V^c}, \quad (15)$$

where the frequency $\omega$ includes an infinitesimal imaginary part. Equation (14) is the equivalent of Eq. (10), and the potential $V^c$ plays the role of the connector. To determine the approximate connector we apply the approximation $G(\mathbf{k}) \approx G(\mathbf{k}_0)$ to both sides of Eq. (14), which is equivalent to supposing $V^c_{k\omega\mathbf{K}} \approx V^c_{k_0\omega\mathbf{K}}$, i.e., transferability of the connector itself. It is interesting to note that this corresponds to a diagonal approximation of the in principle exact Dyson equation that relates $G_{\mathbf{k}}$ and $G_{\mathbf{k}_0}$. The effort required is the calculation of $G_{KK}(\mathbf{k}_0, \omega; [V])$ in only one point $\mathbf{k}_0$. Here, we take $\mathbf{k}_0$ to be the Γ-point. Following Eq. (13), this yields the band structure at all k-points as

$$G_{KK}^{c, \text{approx}}(\mathbf{k}, \omega; [V]) = \frac{1}{-\frac{|\mathbf{k}+\mathbf{K}|^2}{2} + \frac{|\mathbf{k}_0+\mathbf{K}|^2}{2} + \frac{1}{G_{KK}(\mathbf{k}_0, \omega; [V])}}. \quad (16)$$

The result of this COT approximation, shown in panel b of Fig. 4, is clearly much improved with respect to the panel a, thanks to the information imported from the HEG. At the same time it is also better than a simple alignment of the HEG bands at $\mathbf{k}_0$ (which would also require the full calculation at $\mathbf{k}_0$), which can be seen

most clearly, but not only, for the occupied state (HEG bands are white lines in panel c).

In principle, the poles of $G_{KK}$ should not depend on K. Our approximation violates this exact constraint. Therefore, when the spectral function of G is summed over all K the band structure comes out slightly blurred, as one can see in panel b, and even spurious energy levels appear. We can, however, impose the exact constraint by choosing in each group of poles the one with the largest oscillator strength: since in the HEG only one of these poles would have non-zero weight, this reflects the situation where the real system and the HEG are most similar, which means, where COT should work best. Details of how this choice is implemented in practice are given in the Supplementary Note 3. This constraint yields the result in panel c of Fig. 4: the constrained connector makes the bands sharp and eliminates spurious non-dispersing structures. COT therefore leads to a simple approach to get a first, very quick, idea of the band structure of materials.

DISCUSSION

In conclusion, inspired by a historical strategy to approximate density functionals using the HEG, we propose an in principle exact and very general approach. Its aim is to calculate once and for all, and store, a given observable or other object in a model system with high precision. These results are then used to determine the same object in real systems, via a procedure termed connector. The connector is different for every target object, and must be approximated. We suggest a strategy for a systematic connector approach, which, for a given model, makes use of an approximation in a way that leads to strong error cancelling. Indeed, we show that, and why, a given approximation is often much more powerful when used within COT than when directly applied to the object of interest. In the present work we have used three different kinds of approximations, namely, a modification of the Coulomb interaction, perturbation theory, and the hypothesis of transferability, and in all cases obtained significant improvement compared to simply applying the approximation to the observable of interest. Of course, the choice of the model and of the approximation still determine the quality of the results and require care and physical insight. The approach opens the way for fast computational methods, which we have illustrated with a quick estimate of energy levels and bands. It can also be used to design functionals. As example, we have derived an exchange-correlation potential for DFT, using as model system the HEG. By using the WDA as benchmark functional we have
demonstrated that our connector functional is able to capture non-local effects in a very efficient way. Beyond the WDA, the connector approximation to the exact functional only requires data from the HEG that are already available in the literature as interpolated expressions. More complex models may require new calculations to be done, with results that can be either interpolated with modern machine learning algorithms or stored thanks to today's storage capacities. Such more flexible models could potentially further improve the results<sup>71</sup> and are envisaged for future applications. The present work sets the framework, elucidates the fundamentals and suggests directions for practical application, with a potentially huge impact on computational materials design.

## METHODS

The reference band structure of cubic He with experimental lattice parameters<sup>70</sup> has been obtained from the diagonalization of the KS-LDA Hamiltonian of size 5.1 Ha in reciprocal space. The Hamiltonian has been calculated using local Troullier-Martins<sup>72</sup> pseudopotentials in the Abinit code<sup>73</sup> with a Γ-centered 5 × 5 × 5 k-point grid.

## DATA AVAILABILITY

All data are included in the paper or in the Supplementary Information.

## CODE AVAILABILITY

Python codes used to generate the results are available on demand.

Received: 9 November 2021; Accepted: 8 March 2022;

Published online: 02 May 2022

## REFERENCES

1. Curtarolo, S. et al. The high-throughput highway to computational materials design. *Nat. Mater.* **12**, 191 (2013).

2. Saal, J. E., Kirklin, S., Aykol, M., Meredig, B. & Wolverton, C. Materials design and discovery with high-throughput density functional theory: The open quantum materials database (oqmd). *JOM* **65**, 1501–1509 (2013).

3. Marzari, N. The frontiers and the challenges. *Nat. Mater.* **15**, 381– (2016).

4. Kohn, W. & Sham, L. J. Self-consistent equations including exchange and correlation effects. *Phys. Rev.* **140**, A1133–A1138 (1965).

5. Ceperley, D. M. & Alder, B. J. Ground state of the electron gas by a stochastic method. *Phys. Rev. Lett.* **45**, 566–569 (1980).

6. Georges, A., Kotliar, G., Krauth, W. & Rozenberg, M. J. Dynamical mean-field theory of strongly correlated fermion systems and the limit of infinite dimensions. *Rev. Mod. Phys.* **68**, 13–125 (1996).

7. Fermi, E. Application of statistical gas methods to electronic systems. *Rend. Accad. Naz. Lincei* **6**, 602 (1927).

8. Thomas, L. Calculation of atomic fields. *Proc. Cambridge Phil. Soc.* **33**, 542 (1927).

9. Ma, S.-K. & Brueckner, K. A. Correlation energy of an electron gas with a slowly varying high density. *Phys. Rev.* **165**, 18–31 (1968).

10. Vosko, S. H., Wilk, L. & Nusair, M. Accurate spin-dependent electron liquid correlation energies for local spin-density calculations - a critical analysis. *Can. J. Phys.* **58**, 1200–1211 (1980).

11. Gunnarsson, O., Jonson, M. & Lundqvist, B. Exchange and correlation in inhomogeneous electron systems. *Solid State Commun.* **24**, 765–768 (1977).

12. Alonso, J. & Girifalco, L. A non-local approximation to the exchange energy of the non-homogeneous electron gas. *Solid State Commun.* **24**, 135 (1977).

13. Alonso, J. A. & Girifalco, L. A. Nonlocal approximation to the exchange potential and kinetic energy of an inhomogeneous electron gas. *Phys. Rev. B* **17**, 3735–3743 (1978).

14. Gunnarsson, O., Jonson, M. & Lundqvist, B. I. Descriptions of exchange and correlation effects in inhomogeneous electron systems. *Phys. Rev. B* **20**, 3136–3164 (1979).

15. Gunnarsson, O. & Jones, R. Density functional calculations for atoms, molecules and clusters. *Phys. Scr.* **21**, 394 (1980).

16. Cuevas-Saavedra, R., Chakraborty, D., Rabi, S., Cárdenas, C. & Ayers, P. W. Symmetric nonlocal weighted density approximations from the exchange-correlation hole of the uniform electron gas. *J. Chem. Theory Comput.* **8**, 4081–4093 (2012).

17. Langreth, D. C. & Perdew, J. P. Theory of nonuniform electronic systems. I. Analysis of the gradient approximation and a generalization that works. *Phys. Rev. B* **21**, 5469–5493 (1980).

18. Perdew, J. P. & Yue, W. Accurate and simple density functional for the electronic exchange energy: generalized gradient approximation. *Phys. Rev. B* **33**, 8800–8802 (1986).

19. Perdew, J. P., Burke, K. & Ernzerhof, M. Generalized gradient approximation made simple. *Phys. Rev. Lett.* **77**, 3865–3868 (1996).

20. Perdew, J. P., Kurth, S., Zupan, A. & Blaha, P. Accurate density functional with correct formal properties: a step beyond the generalized gradient approximation. *Phys. Rev. Lett.* **82**, 2544–2547 (1999).

21. Perdew, J. P. et al. Restoring the density-gradient expansion for exchange in solids and surfaces. *Phys. Rev. Lett.* **100**, 136406 (2008).

22. Sun, J., Ruzsinszky, A. & Perdew, J. P. Strongly constrained and appropriately normed semilocal density functional. *Phys. Rev. Lett.* **115**, 036402 (2015).

23. Dobson, J. F. Van der Waals functionals via local approximations for susceptibilities. (eds. Dobson, J. F., Vignale, G. & Das, M. P.) *Electronic Density Functional Theory, Recent Progress and New Directions*, 261–284 (Springer,1998).

24. Jung, J., Garcia-González, P., Dobson, J. F. & Godby, R. W. Effects beyond the random-phase approximation in calculating the interaction between metal films. *Phys. Rev. B* **70**, 205107 (2004).

25. García-González, P., Alvarellos, J. E. & Chacón, E. Kinetic-energy density functional: atoms and shell structure. *Phys. Rev. A* **54**, 1897–1905 (1996).

26. Olsen, T. & Thygesen, K. S. Extending the random-phase approximation for electronic correlation energies: the renormalized adiabatic local density approximation. *Phys. Rev. B* **86**, 081103 (2012).

27. Olsen, T. & Thygesen, K. S. Accurate ground-state energies of solids and molecules from time-dependent density-functional theory. *Phys. Rev. Lett.* **112**, 203001 (2014).

28. Patrick, C. E. & Thygesen, K. S. Adiabatic-connection fluctuation-dissipation DFT for the structural properties of solids-the renormalized ALDA and electron gas kernels. *J. Chem. Phys.* **143**, 102802 (2015).

29. Schmidt, P. S., Patrick, C. E. & Thygesen, K. S. Simple vertex correction improves gw band energies of bulk and two-dimensional crystals. *Phys. Rev. B* **96**, 205206 (2017).

30. Lu, D. Evaluation of model exchange-correlation kernels in the adiabatic connection fluctuation-dissipation theorem for inhomogeneous systems. *J. Chem. Phys.* **140**, 18A520 (2014).

31. Vignale, G. & Rasolt, M. Density-functional theory in strong magnetic fields. *Phys. Rev. Lett.* **59**, 2360–2363 (1987).

32. Zangwill, A. & Soven, P. Density-functional approach to local-field effects in finite systems: photoabsorption in the rare gases. *Phys. Rev. A* **21**, 1561–1572 (1980).

33. Gross, E. K. U. & Kohn, W. Local density-functional theory of frequency-dependent linear response. *Phys. Rev. Lett.* **55**, 2850–2852 (1985).

34. Dobson, J. F., Bünner, M. J. & Gross, E. K. U. Time-dependent density functional theory beyond linear response: an exchange-correlation potential with memory. *Phys. Rev. Lett.* **79**, 1905–1908 (1997).

35. Ng, T. K. Transport properties and a current-functional theory in the linear-response regime. *Phys. Rev. Lett.* **62**, 2417–2420 (1989).

36. Vignale, G. & Kohn, W. Current-dependent exchange-correlation potential for dynamical linear response theory. *Phys. Rev. Lett.* **77**, 2037–2040 (1996).

37. Vignale, G., Ullrich, C. A. & Conti, S. Time-dependent density functional theory beyond the adiabatic local density approximation. *Phys. Rev. Lett.* **79**, 4878–4881 (1997).

38. Tokatly, I. V. Time-dependent deformation functional theory. *Phys. Rev. B* **75**, 125105 (2007).

39. Gao, X., Tao, J., Vignale, G. & Tokatly, I. V. Continuum mechanics for quantum many-body systems: linear response regime. *Phys. Rev. B* **81**, 195106 (2010).

40. Nazarov, V. U., Tokatly, I. V., Pittalis, S. & Vignale, G. Antiadiabatic limit of the exchange-correlation kernels of an inhomogeneous electron gas. *Phys. Rev. B* **81**, 245101 (2010).

41. Trevisanutto, P. E., Terentjevs, A., Constantin, L. A., Olevano, V. & Sala, F. D. Optical spectra of solids obtained by time-dependent density functional theory with the jellium-with-gap-model exchange-correlation kernel. *Phys. Rev. B* **87**, 205143 (2013).

42. Panholzer, M., Gatti, M. & Reining, L. Nonlocal and nonadiabatic effects in the charge-density response of solids: a time-dependent density-functional approach. *Phys. Rev. Lett.* **120**, 166402 (2018).

43. Giuliani, G. & Vignale, G. *Quantum Theory of the Electron Liquid* (Cambridge University Press, 2005).

44. Martin, R. M. *Electronic Structure: Basic Theory and Practical Methods* (Cambridge University Press, 2004).

45. Kohn, W. Density functional and density matrix method scaling linearly with the number of atoms. *Phys. Rev. Lett.* **76**, 3168–3171 (1996).

46. Prodan, E. & Kohn, W. Nearsightedness of electronic matter. *Proc. Natl Acad. Sci.* **102**, 11635–11638 (2005).
47. Becke, A. D. Density-functional exchange-energy approximation with correct asymptotic behavior. *Phys. Rev. A* **38**, 3098–3100 (1988).

48. Lee, C., Yang, W. & Parr, R. G. Development of the Colle-Salvetti correlation-energy formula into a functional of the electron density. *Phys. Rev. B* **37**, 785–789 (1988).

49. García-González, P., Alvarellos, J. E., Chacón, E. & Tarazona, P. Image potential and the exchange-correlation weighted density approximation functional. *Phys. Rev. B* **62**, 16063–16068 (2000).

50. Perdew, J. P. What do the Kohn-Sham Orbital Energies Mean? How do Atoms Dissociate? In *Density Functional Methods In Physics*, 265–308 (Plenum, 1985).

51. Buijse, M. A., Baerends, E. J. & Snijders, J. G. Analysis of correlation in terms of exact local potentials: applications to two-electron systems. *Phys. Rev. A* **40**, 4190–4202 (1989).

52. Baerends, E. J. & Gritsenko, O. V. A quantum chemical view of density functional theory. *J. Phys. Chem. A* **101**, 5383–5403 (1997).

53. Tempel, D. G., Martínez, T. J. & Maitra, N. T. Revisiting molecular dissociation in density functional theory: a simple model. *J. Chem. Theory Comput.* **5**, 770–780 (2009).

54. Helbig, N., Tokatly, I. V. & Rubio, A. Exact Kohn-Sham potential of strongly correlated finite systems. *J. Chem. Phys.* **131**, 224105 (2009).

55. Wetherell, J., Hodgson, M. J. P., Talirz, L. & Godby, R. W. Advantageous near-sightedness of many-body perturbation theory contrasted with Kohn-Sham density functional theory. *Phys. Rev. B* **99**, 045129 (2019).

56. van Leeuwen, R. & Baerends, E. J. Energy expressions in density-functional theory using line integrals. *Phys. Rev. A* **51**, 170–178 (1995).

57. Gaiduk, A. P. & Staroverov, V. N. A generalized gradient approximation for exchange derived from the model potential of van Leeuwen and Baerends. *J. Chem. Phys.* **136**, 064116 (2012).

58. Karolewski, A., Armiento, R. & Kümmel, S. Electronic excitations and the Becke-Johnson potential: the need for and the problem of transforming model potentials to functional derivatives. *Phys. Rev. A* **88**, 052519 (2013).

59. Palummo, M., Onida, G., Del Sole, R., Corradini, M. & Reining, L. Nonlocal density scheme for electronic-structure calculations. *Phys. Rev. B* **60**, 11329–11335 (1999).

60. Corradini, M., Del Sole, R., Onida, G. & Palummo, M. Analytical expressions for the local-field factor G(q) and the exchange-correlation kernel $K_{xc}(r)$ of the homogeneous electron gas. *Phys. Rev. B* **57**, 14569–14571 (1998).

61. Moroni, S., Ceperley, D. M. & Senatore, G. Static Response and Local Field Factor of the Electron Gas. *Phys. Rev. Lett.* **75**, 6–9 (1995).

62. Burke, K. Perspective: density functional theory. *J. Chem. Phys.* **136**, 150901 (2012).

63. Cohen, A. J., Mori-Sánchez, P. & Yang, W. Challenges for density functional theory. *Chem. Rev.* **112**, 289–320 (2012).

64. Becke, A. D. Perspective: fifty years of density-functional theory in chemical physics. *J. Chem. Phys.* **140**, 18A301 (2014).

65. Pribram-Jones, A., Gross, D. A. & Burke, K. DFT: a theory full of holes? *Ann. Rev. Phys. Chem.* **66**, 283–304 (2015).

66. Jones, R. O. Density functional theory: Its origins, rise to prominence, and future. *Rev. Mod. Phys.* **87**, 897–923 (2015).

67. Mazin, I. I. & Singh, D. J. Nonlocal density functionals and the linear response of the homogeneous electron gas. *Phys. Rev. B* **57**, 6879–6883 (1998).

68. Balestri, F. *Alcuni aspetti della quantizzazione dell'oscillatore armonico*. Master thesis (Università di Bologna, 2013).

69. Vanzini, M., Reining, L. & Gatti, M. Spectroscopy of the Hubbard dimer: the spectral potential. *Eur. Phys. J. B.* **91**, 192 (2018).

70. Schuch, A. F. & Mills, R. L. New allotropic form of He³, *Phys. Rev. Lett.* **6**, 596–597 (1961).

71. Auina, A., Gatti, M. & Reining, L. Strategies to build functionals of the density, or functionals of Green's functions: what can we learn? *Faraday Discuss.* **224**, 27–55 (2020).

72. Troullier, N. & Martins, J. L. Efficient pseudopotentials for plane-wave calculations. *Phys. Rev. B.* **43**, 1993–2006 (1991).

73. Gonze, X. et al. A brief introduction to the Abinit software package. *Z. Kristallogr* **220**, 558–562 (2005).

## ACKNOWLEDGEMENTS

Stimulating discussions with many members of the Palaiseau Theoretical Spectroscopy Group, and with Hardy Gross, John Perdew, Ilya Tokatly and Sergio Ciuchi are gratefully acknowledged. This research was supported by a Marie Curie FP7 Integration Grant within the 7th European Union Framework Programme, the European Research Council under the EU FP7 framework program (ERC grant No. 320971), and by the Austrian science Fund FWF under Project No. J 3855-N27.

## AUTHOR CONTRIBUTIONS

M.V., A.A., M.G., and L.R. have formulated the conceptual approach. A.A. has worked out the xc functionals. M.V. has worked out the examples of the energy levels. M.P. has helped with the use of the xc kernel. All authors have contributed to writing the paper. M.V. and A.A are first authors on equal footing.

## COMPETING INTERESTS

The authors declare no competing interests.

## ADDITIONAL INFORMATION

**Supplementary information** The online version contains supplementary material available at https://doi.org/10.1038/s41524-022-00762-2.

**Correspondence** and requests for materials should be addressed to Lucia Reining.

**Reprints and permission information** is available at http://www.nature.com/reprints

**Publisher's note** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

<figure><img src="image_7.png" /></figure>

**Open Access** This article is licensed under a Creative Commons

Attribution 4.0 International License, which permits use, sharing,

adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.

© The Author(s) 2022