1 Introduction

The computation of electron binding energies based on Kohn–Sham [1] orbital energies has been clearly documented [2, 3] as a qualitative but not quantitative method. A linear correlation was found [3] with a slope that reflects that orbital energies are off by 30% or more. For example, one can find on the literature reports on Green’s function calculations that explicitly show improvement of DFT single orbital energies [4]. The underestimation of band gaps by density functional theory (DFT) is a closely related issue [5,6,7,8].

On the other hand, one can find reports which state that good ionization energies are obtained using different exchange-correlation functionals. There is no contradiction on those reports. Since the first set refers to the use of orbital energies and the second to ionization energies obtained from subtraction of total energies obtained from two Kohn–Sham calculations, one for the neutral and the other for the cation. The last method is frequently refered as \(\varDelta \)SCF calculation. However, certainly there is some sort unfair reference to DFT capacity to compute accurate ionization potentials when it is identified with the method using the negative value of the orbital energy. McKechnie et al. published a very valuable analysis where different exchange-correlation functionals are employed and the accuracy of the two mentioned approaches is considered for the calculation of vertical ionization energies [9]. They found that while the \(\varDelta \)SCF produce average errors of a few tenths of electronvolt the use of orbital energies can produce errors of a few electronvolts.

In view of the high accuracy that some exchange-correlation functionals present in \(\varDelta \)SCF method. This work proposes the use of analytic derivatives with respect to the total number of electrons, as they come out of auxiliary density perturbation theory (ADPT) [10,11,12,13], as an alternative for the direct computation of electron binding energies. Being direct it offers the advantages of orbital energy approach but includes higher-order corrections that take care of relaxation and correlation effects. This is a spirit similar to the one found in Green’s function methods [14, 15] under the quasi-particle approximation where the orbital energy is just the first-order approximation.

In Sect. 2 the approach proposed in this work is described and discussed with emphasis in two aspects: accuracy of auxiliary density functional theory (ADFT) [16] on the calculation of ionization energies and the connection to fractional charge calculations. Section 3 describes the derivation of density linear response and higher-order energy derivatives with respect to the total number of electrons on the system. Subtle aspects of the formulation and the related computation of electronic Fukui functions are explained for the first time here. In Sect. 4, numerical results obtained with the approach proposed are presented for electronic ionizations and double ionizations. Concluding remarks are given in Sect. 5.

2 Proposed approach

Overall the approach proposed here rests on the idea that the \(\varDelta \)SCF computation of ionization energy is accurate enough. Although there may be cases when computing the non-neutral system could pose some technical difficulaties like SCF convergence issues. For this reason, this section first discusses how accurate are \(\varDelta \)SCF calculations when ADFT is employed. The rest of the section describes the basic idea and its connection to Slater’s transition state method and the energy discontinuity issue.

2.1 Calculation of ionization energies with auxiliary density functional theory

Table 1 lists calculated first ionization energies for atoms ranging from lithium to argon. Table 2 lists calculated first ionization energies for a few small molecules. These and all calculations discussed in this work were performed using a modified version of the deMon2k program [17, 18]. Both sets were previously calculated using electron propagator methods [14], using the same basis set and geometries for the case of molecules. The interested reader may wish to compare the accuracy of methodologies. Vertical ionization energies were computed taking the negative value of orbital energies and from \(\varDelta \)SCF approach where two self-consistent field (SCF) calculations are performed, one for the neutral, one for the cation but keeping fixed the molecular geometry. In order to get a taste of the functional dependence VWN [19] and PBE [20, 21] functionals were employed in combination with cc-pVTZ [22] primary basis and GEN-A2* [23,24,25] auxiliary function sets. Exploration of the performance of different functionals has been given recently by McKechnie et al. [9]. The purpose here is only to provide the reader with numerical support for the ideas that will be exposed below. For the case of PBE functional calculations include auxiliary density functional theory (ADFT) [16] calculations and the corresponding density fitted DFT (DF-DFT) calculations in order to test the accuracy of ADFT approximation for the calculation of ionization energies. DF-DFT calculations use the variational fitting of the Coulomb potential (VFCP) [26,27,28] and compute exchange-correlation energy using reference density.

From the results listed in Tables 1 and 2 one can conclude that the use of ADFT for the calculation of ionization energies does not represent any sacrifice in accuracy. One can also note that the results obtained from the negative value of orbital energies present large errors when compared to experimental values. On the other hand \(\varDelta \)SCF results are very accurate, comparable to P3 [29] and OVGF [30] propagator results in accuracy [14]. Then, one can expect from ADFT ionization energies of accuracy on the same quality as from the reference DF-DFT calculations, comparable in accuracy to electron propagator results. The following sections aim to correct ionization energies computed from orbital energies using linear response. Given the excellent accuracy of \(\varDelta \)SCF an approximate correction of \(-\epsilon \) toward \(\varDelta \)SCF is promising.

Table 1 First ionization energies of atoms (eV), calculated with DFT methods using both the orbital energy and the \(\varDelta \)SCF approach
Table 2 First ionization energies of molecules (eV), calculated with DFT methods using both the orbital energy and the \(\varDelta \)SCF approach

2.2 Approximation of ionization energies

A Taylor series expansion is proposed to obtain an approximate correction of \(I^1 = -\epsilon \). Ionization energy is approximated as

$$\begin{aligned} I = E(N - 1) - E(N) \approx - E^{(1)}(N) + \frac{1}{2!}E^{(2)}(N) - \frac{1}{3!}E^{(3)}(N) + \ldots \end{aligned}$$
(1)

The method can also be applied to electron affinities, however discussion is limited here to ionization energies in order to simplify the exposition. Here the superindex in parenthesis identifies the order of derivative with respect to N. In fact these are left derivatives due to the discontinuity of E(N) for integer values of N [33]. For example

$$\begin{aligned} E^{(1)} = \left( \frac{\partial E}{\partial N}\right) _{v}^{-} = \lim _{\varDelta N \rightarrow 0^{-}} \frac{E(N+\varDelta N)-E(N)}{\varDelta N} . \end{aligned}$$
(2)

For non-integer values of N the function E(N) is a straight line. However, it should be taken into account that such straight lines correspond to transitions between ground states [33]. Molecular ionization is frequently not leading to the cationic ground state, especially if electron is not taken from HOMO. Furthermore, in practice only approximate exchange-correlation functionals are used [8, 34]. Therefore, this work assumes that there will be corrections arising from higher orders and will compute them up to third order.

Yang and coworkers have published a number of interesting works analyzing relevance of the discontinuity and the closely related concept of localization [35]. They describe how in Hartree-Fock case the variation of orbital energy has negative curvature and in DFT it has positive curvature for most exchange-correlation functionals [36]. A very interesing analysis can be found in the work of Johnson et al. [35]. As will become evident from the formulation the positive curvature predicts that second-order correction to orbital energy is a positive contribution that corrects underestimated ionization energies obtained from orbital energies. If a given exchange-correlation functional present curvature the here proposed approach will provide a path to an improved direct computation of ionization energy.

2.3 Connection to transition state method

Slater’s transition state method [37, 38] produces good estimates of ionization energies using orbital occupation of 1/2,

$$\begin{aligned} I \equiv E(N-1) - E(N) \approx -\epsilon (1/2). \end{aligned}$$
(3)

It can be taken as a mean value approximation to Janak’s integral [39],

$$\begin{aligned} I \equiv E(N-1) - E(N) = -\int _0^1 \epsilon (n){\rm d}n. \end{aligned}$$
(4)

Taylor series expansion of \(\epsilon \) around \(n = n_0\) yields for the integral

$$\begin{aligned} I = - \epsilon (n_0) - \frac{(1-2n_0)}{2!} \epsilon ^{(1)}(n_0) - \frac{1 - 3n_0 + 3n_0^2}{3!}\epsilon ^{(2)}(n_0) + \ldots . \end{aligned}$$
(5)

where one can see that Slater’s choice of \(n_0 = 1/2\) is the best because it is exact up to linear response of orbital energies, i.e., second order in total energy. Chong and coworkers have applied an improved version of the transition state method on the calculation electron binding energies [40, 41].

Transition state method then recovers the linear variation of orbital energy without linear response but needs a special calculation where a specific orbital occupation is set to 1/2 [14]. Perturbation theory calculations on the response to orbital occupation although more expensive provide an alternative to recover the second-order energy correction while keeping the regular SCF for the neutral system. Furthermore, take into account that linear response do not face SCF convergence issues and a single linear response calculation can be used to compute all ionization energies of a given molecule for almost the same computational cost. It will be shown that double ionizations can be obtained also. For the perturbation theory calculations considered in this contribution the starting point is the neutral system, which corresponds to taking \(n_0 = 1\) in equation (5). The resulting relation is

$$\begin{aligned} I = - \epsilon + \frac{\epsilon ^{(1)}}{2!} - \frac{\epsilon ^{(2)}}{3!} + \ldots . \end{aligned}$$
(6)

In the next section, this result is derived without use of Janak’s theorem and expressions are found for the calculation of orbital energy derivatives on the context of ADFT.

3 ADFT response to ionization

3.1 Calculation of corrections in auxiliary density functional theory

The derivation here starts from the self–consistent field energy expression of ADFT [16],

$$\begin{aligned} E_{SCF} = \sum _{\mu ,\nu } P_{\mu \nu } H_{\mu \nu } + \sum _{\mu ,\nu } \sum _{k} P_{\mu \nu } \langle \mu \nu ||k\rangle x_k - \frac{1}{2} \sum _{k,l} G_{kl} x_k x_l + E_{xc}[\tilde{\rho }^{\alpha },\tilde{\rho }^{\beta }], \end{aligned}$$
(7)

where \(P_{\mu \nu }\) is an element of the density matrix, \(x_k\) is an element of the auxiliary density vector containing the linear expansion coefficients for the auxiliary density,

$$\begin{aligned} \tilde{\rho } = \sum _k x_k k(\mathbf{r}), \end{aligned}$$
(8)

\(H_{\mu \nu }\) is the usual mono–electronic matrix, \(\langle \mu \nu ||k\rangle \) and \(G_{kl} \equiv \langle k||l\rangle \) are three and two index electron repulsion integrals in Köster’s notation [42]. \(E_{xc}\) is the exchange–correlation energy functional which here takes auxiliary spin densities, \(\tilde{\rho }^{\alpha }\) and \(\tilde{\rho }^{\beta }\), as arguments. Functions of the atomic primary basis are labeled by greek letters \(\mu \), \(\nu \), etc. Auxiliary functions are labeled by k, l, etc.

The optimal coefficients for VFCP are given by [26,27,28]

$$\begin{aligned} x_k^{\sigma } = \sum _{l} G_{kl}^{-1} \sum _{\mu ,\nu } P_{\mu \nu }^{\sigma }\langle \mu \nu ||l\rangle . \end{aligned}$$
(9)

Here \(\sigma \) is a spin identification label whose values can be only \(\alpha \) or \(\beta \). Total auxiliary density is the sum of spin densities, \(\tilde{\rho } = \tilde{\rho }^{\alpha } + \tilde{\rho }^{\beta }\), and therefore \(x_k = x_k^{\alpha } + x_k^{\beta }\). Notice that there will be a fitting equation for each spin component of the auxiliary density. However, the primary and auxiliary function sets are spin independent. The spin polarized Kohn–Sham matrix is given by [16]

$$\begin{aligned} K_{\mu \nu }^{\sigma } = H_{\mu \nu } + \sum _k (x_k + z_k^{\sigma }) \langle \mu \nu ||k\rangle , \end{aligned}$$
(10)

with the exchange–correlation fitting coefficients

$$\begin{aligned} z_k^{\sigma } = \sum _{l} G_{kl}^{-1} \langle l|v_{xc}^{\sigma }\rangle . \end{aligned}$$
(11)

Direct differentiation of equation (7) with respect to N yields

$$\begin{aligned} E_{SCF}^{(1)} = \sum _{\mu ,\nu } P_{\mu \nu } H_{\mu \nu }^{(1)} + \sum _{\mu ,\nu } P_{\mu \nu }^{(1)} \left( H_{\mu \nu } + \sum _{k} x_k \langle \mu \nu ||k\rangle \right) + \sum _{\sigma } \sum _k x_k^{\sigma ,(1)} \langle k|v_{xc}^{\sigma }\rangle . \end{aligned}$$
(12)

Only the last term requires derivatives of the auxiliary density fitting coefficients. They are readily evaluated by differentiation of equation (9),

$$\begin{aligned} x_k^{\sigma ,(1)} = \sum _{l} G_{kl}^{-1} \sum _{\mu ,\nu } P_{\mu \nu }^{\sigma ,(1)} \langle \mu \nu ||l\rangle . \end{aligned}$$
(13)

Equation (12) is reduced to

$$\begin{aligned} E_{SCF}^{(1)} = \sum _{\sigma } \sum _{\mu ,\nu } P_{\mu \nu }^{\sigma ,(1)} K_{\mu \nu }^{\sigma }. \end{aligned}$$
(14)

Spin density matrix is given by

$$\begin{aligned} \mathbf{P}^{\sigma } = \sum _{p \in \sigma } n_p\mathbf{c}_p\mathbf{c}_p^{\dag }, \end{aligned}$$
(15)

where \(\mathbf{c}_p\) is a vector whose components are the linear expansion coefficients for \(p^{th}\) molecular orbital. The total number of electrons is given by

$$\begin{aligned} N = \sum _p n_p \end{aligned}$$
(16)

then the derivative of a variable X which depends on the total number of electrons can be obtained using the chain rule

$$\begin{aligned} \frac{\partial X}{\partial N} = \sum _p \frac{\partial X}{\partial n_p} \frac{\partial n_p}{\partial N} \end{aligned}$$
(17)

This derivation assumes that the total number of electrons changes due to addition or removal of an electron from a single orbital, here identified with index q. In this case

$$\begin{aligned} \frac{\partial n_p}{\partial N} = \delta _{pq} \,\,\,\,\, \rightarrow \,\,\,\,\, \frac{\partial X}{\partial N} = \frac{\partial X}{\partial n_q} \end{aligned}$$
(18)

and therefore the actual perturbation parameter is \(n_q\). The case of degenerate orbitals is included here. However, different to the case of Fukui function averaging [13] here the density is not averaged. Consider a couple of orbitals i and j that are degenerate by symmetry. The linear combination \(\mathbf{c}_t = a_i \mathbf{c}_i + a_j \mathbf{c}_j\) produces a new orbital with the same eigenvalue. Any linear combination of degenerate orbitals is equally likely to ionize. By changing the combination coefficients the response corrections will change. The linear combination coefficients in the case of degenerate orbitals should correspond to a unitary transformation like those used for example in the localization of molecular orbitals. This transformation is only among the degenerate orbitals and preserves the energy eigenvalue. Thus, once the orbital transformation is applied the formulation described here can be applied and the electron taken from a single new orbital.

The rest of the molecular orbitals do not participate directly, only through the response. Let \(q_i\) be the index of the first orbital that is degenerate with the active one and \(q_f\) is the index for the last of them. Ionization will occur from orbital q which satisfies \(q_i \le q \le q_f\). The response of the density matrix is then

$$\begin{aligned} \frac{\partial \mathbf{P}^{\sigma }}{\partial N} = \frac{\partial \mathbf{P}^{\sigma }}{\partial n_q} = \delta _{\sigma \sigma _0} \mathbf{c}_{q}\mathbf{c}_{q}^{\dag } + \sum _{p \in \sigma } n_p \frac{\partial }{\partial n_q} (\mathbf{c}_p\mathbf{c}_p^{\dag }), \end{aligned}$$
(19)

where \(\sigma _0\) is the spin of the ionized orbital q. Here the derivative of the density matrix includes both the reactive orbital density and relaxation contributions [12, 13]. For the case when the reactive orbital is the HOMO or LUMO the rective orbital density becomes the frontier Fukui function. The reactive orbital matrix is defined by

$$\begin{aligned} \mathbf{Q}^{\sigma } \equiv \delta _{\sigma \sigma _0} \mathbf{c}_{q}{} \mathbf{c}_{q}^{\dag } \end{aligned}$$
(20)

and the relaxation corrections required to complete the density matrix linear response

$$\begin{aligned} \mathbf{R}^{\sigma } \equiv \sum _{p \in \sigma } n_p \frac{\partial }{\partial n_q} (\mathbf{c}_p\mathbf{c}_p^{\dag }). \end{aligned}$$
(21)

Substitution of equations (20) and (21) into equation (14) gives

$$\begin{aligned} E_{SCF}^{(1)} = \sum _{\sigma } \sum _{\mu ,\nu } Q_{\mu \nu }^{\sigma } K_{\mu \nu }^{\sigma }. + \sum _{\sigma } \sum _{\mu ,\nu } R_{\mu \nu }^{\sigma } K_{\mu \nu }^{\sigma }. \end{aligned}$$
(22)

Following Pulay [43, 44] the Kohn–Sham pseudo-eigenvalue equations,

$$\begin{aligned} \mathbf{K}^{\sigma } \mathbf{c}_p^{\sigma } = \epsilon _p^{\sigma } \mathbf{S} \mathbf{c}_p^{\sigma }, \end{aligned}$$
(23)

and the derivative of the orbital normalization condition,

$$\begin{aligned} \sum _{\mu ,\nu } \frac{\partial C_{\mu p}^{\sigma ,*}}{\partial n_q} S_{\mu \nu } C_{\nu p}^{\sigma } + \sum _{\mu ,\nu } C_{\mu p}^{\sigma ,*} S_{\mu \nu } \frac{\partial C_{\nu p}^{\sigma }}{\partial n_q} + \sum _{\mu ,\nu } C_{\mu p}^{\sigma ,*} \frac{\partial S_{\mu \nu }}{\partial n_q} C_{\nu p}^{\sigma } = 0, \end{aligned}$$
(24)

are exploited in the following transformation:

$$\begin{aligned} \sum _{\mu ,\nu } \frac{\partial }{\partial n_q} (C_{\mu p}^{\sigma ,*} C_{\nu p}^{\sigma }) K_{\mu \nu }^{\sigma }= & {} \sum _{\mu ,\nu } \frac{\partial C_{\mu p}^{\sigma ,*}}{\partial n_q} K_{\mu \nu }^{\sigma } C_{\nu p}^{\sigma } + c.c. \nonumber \\= & {} \epsilon _p^{\sigma } \sum _{\mu ,\nu } \frac{\partial C_{\mu p}^{\sigma ,*}}{\partial n_q} S_{\mu \nu } C_{\nu p}^{\sigma } + c.c. \nonumber \\= & {} - \epsilon _p^{\sigma } \sum _{\mu ,\nu } C_{\mu p}^{\sigma ,*} \frac{\partial S_{\mu \nu }^{*}}{\partial n_q} C_{\nu p}^{\sigma } = 0 \end{aligned}$$
(25)

where the derivatives of overlap matrix are zero because basis set functions are perturbation independent. Only the reactive orbital matrix contribution remains,

$$\begin{aligned} E^{(1)} = \sum _{\sigma } \sum _{\mu ,\nu } Q_{\mu \nu }^{\sigma } K_{\mu \nu }^{\sigma } = \epsilon _q, \end{aligned}$$
(26)

which corresponds to the differential form of Janak’s approximation [39]. Second-order derivative with respect to N is then the linear response of the orbital energy, i.e., the linear response of the diagonal elements of Kohn–Sham matrix,

$$\begin{aligned} E^{(2)} = \epsilon _q^{(1)} = \sum _{\mu ,\nu } Q_{\mu \nu }^{\sigma _0} K_{\mu \nu }^{\sigma _0,(1)} , \end{aligned}$$
(27)

where derivatives of orbital coefficients are removed using again Pulay’s strategy [43, 44] described in equation (25). Third-order derivative of energy is then

$$\begin{aligned} E^{(3)} = \sum _{\mu ,\nu } Q_{\mu \nu }^{\sigma _0,(1)} K_{\mu \nu }^{\sigma _0,(1)} + \sum _{\mu ,\nu } Q_{\mu \nu }^{\sigma _0} K_{\mu \nu }^{\sigma _0,(2)} . \end{aligned}$$
(28)

At this level Pulay’s relations cannot be employed to remove terms with linear response of reactive orbital matrix because the companion matrix is no longer the reference Kohn–Sham matrix.

3.2 Auxiliary density perturbation theory

For the calculation of linear response auxiliary density perturbation theory (ADPT) is employed [10, 11]. Although ADPT linear response with respect to change in the total number of electrons has been derived before [12] here the derivation is outlined again in order to clarify spin polarization implications that were not described there. Electron removal is a perturbation that has a strong dependence on spin and spin densities react asymmetrically as will be shown below. Furthermore, for the first time quadratic response is considered for perturbation being the change on the total number of electrons.

Derivation of ADPT equations can be started with differentiation of the variational fitting condition (requiring that perturbed system satisfies its own variational fitting) given in equation (9),

$$\begin{aligned} \sum _l G_{kl} x_l^{\sigma ,(1)} = \sum _{\mu ,\nu } Q_{\mu \nu }^{\sigma } \langle \mu \nu ||k\rangle + \sum _{\mu ,\nu } R_{\mu \nu }^{\sigma } \langle \mu \nu ||k\rangle , \end{aligned}$$
(29)

where perturbation independent basis set functions are assumed. McWeeny [45, 46] decomponsed matrices in atomic orbital representation into contributions arising from different molecular orbital blocks. For example \(\mathbf{R}^{\sigma } = \mathbf{R}_{oo}^{\sigma } + \mathbf{R}_{ou}^{\sigma } + \mathbf{R}_{uo}^{\sigma } + \mathbf{R}_{uu}^{\sigma }\) where o denotes occupied and u unnoccupied orbital blocks. For perturbation independent basis functions, granting idempotency of \(\mathbf{R}^{\sigma }\) and conmutator of it with Kohn–Sham matrix in the perturbed system implies that relaxation contributions of density matrix are given by [45]

$$\begin{aligned} \mathbf{R}^{\sigma } = \mathbf{R}_{ou}^{\sigma } + \mathbf{R}_{uo}^{\sigma } = \sum _{i,a \in \sigma } \frac{ \mathcal {K}_{ia}^{\sigma ,(1)}}{\epsilon _i-\epsilon _a} \left( \mathbf{c}_i \mathbf{c}_a^{\dag } + \mathbf{c}_a \mathbf{c}_i^{\dag } \right) \end{aligned}$$
(30)

with

$$\begin{aligned} \mathcal {K}_{ia}^{\sigma ,(n)} \equiv \mathbf{c}_i^{\dag } \mathbf{K}^{\sigma ,(n)} \mathbf{c}_a ,\,\,\,\,\,\,i,a\in \sigma . \end{aligned}$$
(31)

Here, \(\mathbf{K}^{\sigma ,(1)}\) is Kohn–Sham linear response matrix and \(\epsilon _p\) is the \(p^{th}\) orbital energy. Index i is employed for occupied molecular orbitals, while index a is used for virtuals. After equation (30) it follows for the last sum of equation (29)

$$\begin{aligned} \sum _{\mu ,\nu } R_{\mu \nu }^{\sigma } \langle \mu \nu ||k\rangle = 2 \sum _{i,a\in \sigma } \frac{ \mathcal {K}_{ia}^{\sigma ,(1)} }{\epsilon _i-\epsilon _a} \langle ia||k\rangle . \end{aligned}$$
(32)

The factor of two before the sum appears because \(\langle ia||k\rangle = \langle ai||k\rangle \). Differentiation of equation (10), produces the response of the Kohn–Sham matrix,

$$\begin{aligned} K_{\mu \nu }^{\sigma ,(1)} = \sum _{l} ( x_l^{(1)} + z_l^{\sigma ,(1)}) \langle \mu \nu ||l\rangle . \end{aligned}$$
(33)

It has been shown that linear response of exchange–correlation coefficients is given by [10, 11]

$$\begin{aligned} z_l^{\sigma ,(1)} = \sum _{\eta } \sum _{m,n} G_{lm}^{-1} f_{mn}^{\sigma \eta } x_n^{\eta ,(1)} , \end{aligned}$$
(34)

where \(\eta \) is a second spin label and \(f_{mn}^{\sigma \eta }\) is a matrix element in the auxiliary basis representation for one of the exchange–correlation kernels,

$$\begin{aligned} f_{mn}^{\sigma \eta } \equiv \int \int m(\mathbf{r}) \frac{ E_{xc}[\tilde{\rho }^{\alpha },\tilde{\rho }^{\beta }] }{ \delta \tilde{\rho }^{\sigma }(\mathbf{r}) \delta \tilde{\rho }^{\eta }(\mathbf{r}') } n(\mathbf{r}') {\rm d}\mathbf{r}{\rm d}\mathbf{r}' . \end{aligned}$$
(35)

Therefore, the linear response of the Kohn–Sham matrix for a given spin is

$$\begin{aligned} K_{\mu \nu }^{\sigma ,(1)} = \sum _{\eta } \sum _{l,m} F^{\sigma \eta }_{lm} x_m^{\eta ,(1)} \langle \mu \nu ||l\rangle \end{aligned}$$
(36)

with the matrix definition \(\mathbf{F}^{\sigma \eta } \equiv \mathbf{1} + \mathbf{G}^{-1}{} \mathbf{f}^{\sigma \eta }\). Substitution into equation (32) yields

$$\begin{aligned} \frac{1}{2}\sum _l G_{kl} x_l^{\sigma ,(1)} - \sum _{\eta } \sum _{k,m} A_{kl}^{\sigma } F^{\sigma \eta }_{lm} x_m^{\eta ,(1)} = b_k^{\sigma } \,\,\,\forall \sigma \end{aligned}$$
(37)

with the following definitions for the \(\mathbf{b}^{\sigma }\) vector elements,

$$\begin{aligned} b_k^{\sigma } \equiv \frac{1}{2} \sum _{\mu ,\nu } Q_{\mu \nu }^{\sigma } \langle \mu \nu ||k\rangle \end{aligned}$$
(38)

as Coulombic interactions between the reactive orbital density and a specific auxiliary function. Notice that it is null if the spin does not correspond to spin of the ionization orbital. The Coulombic coupling matrix is defined as usually [10],

$$\begin{aligned} A_{kl}^{\sigma } \equiv \sum _{i,a\in \sigma } \frac{ \langle k||ia\rangle \langle ai||l\rangle }{\epsilon _i-\epsilon _a}. . \end{aligned}$$
(39)

Therefore for an open–shell calculation under the unrestricted Kohn–Sham (UKS) formalism ADPT equations take the form [11]

$$\begin{aligned} \left( \begin{array}{cc} \frac{1}{2}{} \mathbf{G} -\mathbf{A}^{\alpha }{} \mathbf{F}^{\alpha \alpha } &{} -\mathbf{A}^{\alpha }{} \mathbf{F}^{\alpha \beta } \\ -\mathbf{A}^{\beta }{} \mathbf{F}^{\beta \alpha } &{} \frac{1}{2}{} \mathbf{G} -\mathbf{A}^{\beta }{} \mathbf{F}^{\beta \beta } \end{array} \right) \left( \begin{array}{c} \mathbf{x}^{\alpha ,(1)} \\ \mathbf{x}^{\beta ,(1)} \end{array} \right) = \left( \begin{array}{c} \mathbf{b}^{\alpha } \\ \mathbf{b}^{\beta } \end{array} \right) . \end{aligned}$$
(40)

Notice that the matrix of this linear equation system does not depend on the ionization orbital, it is a general matrix reflecting response capacity of the molecular system. Furthermore, the linear equation system is not symmetric with respect to spin, since one of the perturbation vectors is null. For a closed–shell calculation the two rows are added to obtain

$$\begin{aligned} \Big [ \frac{1}{4}{} \mathbf{G} -\mathbf{A}{} \mathbf{F} \Big ] \mathbf{x}^{(1)} = \mathbf{b} \end{aligned}$$
(41)

with \(\mathbf{x}^{(1)} = \mathbf{x}^{\alpha ,(1)} + \mathbf{x}^{\beta ,(1)} \ne 2 \mathbf{x}^{\alpha ,(1)}\), \(\mathbf{A} = \mathbf{A}^{\alpha }\), \(\mathbf{b} = \frac{1}{2}( \mathbf{b}^{\alpha } + \mathbf{b}^{\beta })\) and \(\mathbf{F} = \frac{1}{2}(\mathbf{F}^{\alpha \alpha } + \mathbf{F}^{\alpha \beta })\). Notice that the construction of ADPT linear response requires that the Kohn–Sham density matrix does not depend explicitly on the molecular orbitals. Therefore, its application to hybrid functionals requires further elaboration of the formulation.

3.2.1 Quadratic response

Second differentiation of the fitting condition yields

$$\begin{aligned} \sum _l G_{kl} x_l^{\sigma ,(2)} = \sum _{\mu ,\nu } Q_{\mu \nu }^{\sigma ,(1)} \langle \mu \nu ||k\rangle + \sum _{\mu ,\nu } R_{\mu \nu }^{\sigma ,(1)} \langle \mu \nu ||k\rangle . \end{aligned}$$
(42)

Linear response of the reactive orbital matrix is derived using McWeeny’s matrix decomposition [45] but separating occupied orbital projector into two sets: one for the reactive orbital and those degenerate with it and a second one for the rest. Only off diagonal contributions are obtained,

$$\begin{aligned} \mathbf{Q}^{\sigma ,(1)} = \delta _{\sigma \sigma _0} \sum _{p\in \sigma } \frac{\mathcal {K}_{pq}^{\sigma ,(1)}}{\epsilon _{q}-\epsilon _p} \left( \mathbf{c}_p \mathbf{c}_q^{\dag } + \mathbf{c}_q \mathbf{c}_p^{\dag } \right) ,\,\,\,\,\,\,\epsilon _p \ne \epsilon _q . \end{aligned}$$
(43)

Notice that runs over orbitals of the same spin, except those that are degenerate with ionized orbital. The matrix \(\mathbf{R}^{\sigma ,(1)}\) is separated into contributions arising from direct differentiation of the number of electrons and response of coefficients: \(\mathbf{R}^{\sigma ,(1)} = \mathbf{Q}^{\sigma ,(1)} + \mathbf{U}^{\sigma }\). McWeeny’s quadratic response gives

$$\begin{aligned} \mathbf{U}_{oo}^{\sigma }= & {} -2\mathbf{R}_{ou}^{\sigma }{} \mathbf{R}_{uo}^{\sigma } \end{aligned}$$
(44)
$$\begin{aligned} \mathbf{U}_{uu}^{\sigma }= & {} 2\mathbf{R}_{uo}^{\sigma }{} \mathbf{R}_{ou}^{\sigma } \end{aligned}$$
(45)
$$\begin{aligned} \mathbf{U}_{ou}^{\sigma }= & {} \sum _{i,a \in \sigma } \frac{ 1 }{\epsilon _i-\epsilon _a} \mathbf{c}_i \mathbf{c}_i^{\dag } \left( \mathbf{K}^{\sigma ,(2)} + 2 \mathbf{R}_{ou}^{\sigma } \mathbf{K}_{uu}^{\sigma ,(1)} - 2 \mathbf{K}_{oo}^{\sigma ,(1)} \mathbf{R}_{ou}^{\sigma } \right) \mathbf{c}_a\mathbf{c}_a^{\dag } \end{aligned}$$
(46)
$$\begin{aligned} \mathbf{U}_{uo}^{\sigma }= & {} \sum _{i,a \in \sigma } \frac{ 1 }{\epsilon _i-\epsilon _a} \mathbf{c}_a \mathbf{c}_a^{\dag } \left( \mathbf{K}^{\sigma ,(2)} - 2 \mathbf{R}_{uo}^{\sigma } \mathbf{K}_{oo}^{\sigma ,(1)} + 2 \mathbf{K}_{uu}^{\sigma ,(1)} \mathbf{R}_{uo}^{\sigma } \right) \mathbf{c}_i\mathbf{c}_i^{\dag } . \end{aligned}$$
(47)

For the sake of compactness the response of \(\mathbf{U}^{\sigma }\) will be expressed as

$$\begin{aligned} \mathbf{U}^{\sigma } = 2 \mathbf{T}^{\sigma } + \sum _{i,a \in \sigma } \frac{ \mathcal {K}_{ia}^{\sigma ,(2)}}{\epsilon _i-\epsilon _a} \left( \mathbf{c}_i \mathbf{c}_a^{\dag } + \mathbf{c}_a \mathbf{c}_i^{\dag } \right) . \end{aligned}$$
(48)

Substitution into equation (42) gives

$$\begin{aligned} \frac{1}{2}\sum _{l}G_{kl} x_{l}^{\sigma ,(2)}= & {} \sum _{i,a \in \sigma } \frac{\mathcal {K}_{ia}^{\sigma ,(2)}}{(\epsilon _i-\epsilon _a)} \langle ia||k\rangle \nonumber \\+ & {} \sum _{\mu ,\nu } Q_{\mu \nu }^{\sigma ,(1)} \langle \mu \nu ||k\rangle + \sum _{p,s \in \sigma } T_{ps}^{\sigma } \langle ps||k\rangle . \end{aligned}$$
(49)

The quadratic response of the Kohn–Sham matrix is obtained by differentiation of equation (36),

$$\begin{aligned} K_{\mu \nu }^{\sigma ,(2)} = \sum _{\eta } \sum _{l,m} F^{\sigma \eta }_{lm} x_m^{\eta ,(2)} \langle \mu \nu ||l\rangle + \sum _{\eta } \sum _{l,m} F^{\sigma \eta ,(1)}_{lm} x_m^{\eta ,(1)} \langle \mu \nu ||l\rangle . \end{aligned}$$
(50)

Therefore, for quadratic response of density fitting coefficients a linear equation system is obtained with a matrix identical to the linear response matrix and independent vectors given by

$$\begin{aligned} d_k^{\sigma } = \sum _{p,s \in \sigma } T_{ps}^{\sigma } \langle ps||k\rangle + \sum _{\mu ,\nu } Q_{\mu \nu }^{\sigma ,(1)} \langle \mu \nu ||k\rangle + \sum _{\eta } \sum _{l,m} A_{kl}^{\sigma } F^{\sigma \eta ,(1)}_{lm} x_m^{\eta ,(1)} . \end{aligned}$$
(51)

3.2.2 Third-order energy derivatives

For third-order energy derivative substitution of equation (50) into equation (28) results in

$$\begin{aligned} E^{(3)} = \sum _{\sigma } \sum _{\mu ,\nu } Q_{\mu \nu }^{\sigma ,(1)} K_{\mu \nu }^{\sigma ,(1)} + 2\sum _{\sigma ,\eta } \sum _{l,m} \Big [ F^{\sigma \eta ,(1)}_{lm} x_m^{\eta ,(1)} + F^{\sigma \eta }_{lm} x_m^{\eta ,(2)} \Big ] b_l^{\sigma } . \end{aligned}$$
(52)

From equation (40)

$$\begin{aligned} b_l^{\sigma } = \frac{1}{2}\sum _n G_{ln} x_n^{\sigma ,(1)} - \sum _{\tau } \sum _{n,o} A_{lo}^{\sigma } F_{on}^{\sigma \tau } x_n^{\tau ,(1)} , \end{aligned}$$
(53)

so that

$$\begin{aligned} \sum _{\sigma ,\eta } \sum _{l,m} F^{\sigma \eta }_{lm} x_m^{\eta ,(2)} b_l^{\sigma }= & {} \frac{1}{2}\sum _{\tau ,\sigma } \sum _{l,m,n} F^{\sigma \tau }_{ln} G_{lm} x_m^{\sigma ,(2)} x_n^{\tau ,(1)} \nonumber \\- & {} \sum _{\sigma ,\eta ,\tau } \sum _{l,m,n,o} A_{ol}^{\sigma } F^{\sigma \eta }_{lm} x_m^{\eta ,(2)} F_{on}^{\sigma \tau } x_n^{\tau ,(1)} \nonumber \\= & {} \sum _{\sigma ,\eta } \sum _{k,l} F^{\sigma \eta }_{kl} d_k^{\sigma } x_l^{\eta ,(1)} , \end{aligned}$$
(54)

where symmetric nature of matrices \(\mathbf{G}\), \(\mathbf{A}^{\sigma }\) and \(\mathbf{f}^{\sigma _0\sigma }\) is exploited. Furthermore \(\mathbf{F}^{\sigma \eta } = \mathbf{F}^{\eta \sigma }\) and

$$\begin{aligned} \mathbf{G}{} \mathbf{F}^{\sigma \eta } = \mathbf{G}(\mathbf{1} + \mathbf{G}^{-1}\mathbf{f}^{\sigma \eta }) = \mathbf{G} + \mathbf{f}^{\sigma \eta } = (\mathbf{1} + \mathbf{f}^{\sigma \eta }{} \mathbf{G}^{-1})\mathbf{G} = \tilde{\mathbf{F}}^{\sigma \eta }\mathbf{G} . \end{aligned}$$
(55)

Substituting \(\mathbf{d}^{\sigma }\)

$$\begin{aligned} E^{(3)}= & {} 3\sum _{\sigma } \sum _{\mu ,\nu } Q_{\mu \nu }^{\sigma ,(1)} K_{\mu \nu }^{\sigma ,(1)} + 2\sum _{\sigma ,\eta } \sum _{l,m} F^{\sigma \eta ,(1)}_{lm} x_m^{\eta ,(1)} b_l^{\sigma } \nonumber \\+ & {} 6\sum _{\sigma }\sum _{i,a,b \in \sigma } \frac{\mathcal {K}_{ai}^{\sigma ,(1)}\mathcal {K}_{ib}^{\sigma ,(1)}\mathcal {K}_{ab}^{\sigma ,(1)}}{(\epsilon _i-\epsilon _a)(\epsilon _i-\epsilon _b)} -6 \sum _{\sigma }\sum _{i,j,a\in \sigma } \frac{\mathcal {K}_{ia}^{\sigma ,(1)}\mathcal {K}_{ja}^{\sigma ,(1)}\mathcal {K}_{ij}^{\sigma ,(1)}}{(\epsilon _i-\epsilon _a)(\epsilon _j-\epsilon _a)} \nonumber \\+ & {} 2 \sum _{\sigma ,\eta ,\tau } \sum _{k,l,m,n} F^{\sigma \eta }_{kl} A_{km}^{\tau } F^{\sigma \tau ,(1)}_{mn} x_l^{\eta ,(1)} x_n^{\tau ,(1)} , \end{aligned}$$
(56)

that can be simplified using the linear response equations and evaluating the derivatives of the exchange-correlation kernel to obtain

$$\begin{aligned} E^{(3)}= & {} 6\sum _{p\in \sigma _0} \sum _{\epsilon _p\ne \epsilon _q} \frac{ ( \mathcal {K}_{qp}^{\sigma _0,(1)} )^2}{\epsilon _q-\epsilon _p} + \sum _{\sigma \eta \tau } \sum _{l,m,n} g_{lmn}^{\sigma \eta \tau } x_l^{\sigma ,(1)}x_m^{\eta ,(1)}x_n^{\tau ,(1)} \nonumber \\- & {} 6\sum _{\sigma }\sum _{ija} \frac{\mathcal {K}_{ia}^{\sigma ,(1)}\mathcal {K}_{ja}^{\sigma ,(1)}\mathcal {K}_{ij}^{\sigma ,(1)}}{(\epsilon _i-\epsilon _a)(\epsilon _j-\epsilon _a)} + 6\sum _{\sigma }\sum _{iab} \frac{\mathcal {K}_{ai}^{\sigma ,(1)}\mathcal {K}_{ib}^{\sigma ,(1)}\mathcal {K}_{ab}^{\sigma ,(1)}}{(\epsilon _i-\epsilon _a)(\epsilon _i-\epsilon _b)} . \end{aligned}$$
(57)

Special care should be taken with the first term because it may run into accidental degeneracies or quasi-degeneracies of orbital energies causing erroneous results. In practice those contributions should not be included into the calculation.

Notice that by increasing the order on the Taylor’s series approximation a new exchange-correlation functional derivative will be required. For this reason the current work is limited up to third-order derivatives in total energy, corresponding to the described formulation.

4 Numerical results

4.1 Ionization energies

Table 3 First ionization energies of molecules (eV) calculated with using ADPT linear response. Exchange-correlation functionals VWN and PBE are employed with the basis set combination cc-pVTZ/GEN-A2*

Table 3 lists ionization energies for the small set of molecules previously treated with transition state method combined with electron propagator [14]. The molecular structures are the same used there and previously by Ortiz [29]. Also the same basis set, cc-pVTZ [22], is employed here. This work results are labeled as \(I^n\) where n is the highest order correction included on the Taylor series expansion for total energy, according to equation (1). In the last row, Table 3 contains the mean absolute deviation (MAD) of each column with respect to experimental values. Table 3 shows that PBE produces results slightly better than those of VWN. With both functionals \(I^2\) and \(I^3\) present good accuracy, comparable to that of P3 [29] in electron propagator theory [14]. First-order results, \(I^1\), correspond to uncorrected orbital energies but they are listed on the purpose that the reader can see the magnitude of the correction performed by ADPT.

Table 4 Ionization energies (eV) for GW100 set of molecules computed with PBE/jorge-TZP/GEN-A2* compared to experimental values. Mean absolute deviations are, respectively, 0.39 and 0.40 for second and third order

A more extensive validation on the accuracy of calculated ionization energies was performed by applying the method to the GW100 set of molecules [15]. Table 4 compares ionization energies of this work calculated using PBE/jorge-TZP/GEN-A2* with experimental values. For these calculation jorge-TZP [47] basis was employed because it covers all the elements up to xenon. Basis set exponents and coefficients for jorge-TZP basis were taken from basis set exchange repository at basissetexchange.org [48,49,50]. In is interesting to see that this work results are comparable in accuracy to our own G\(_0\)W\(_0\) results [51] obtained for the same functional and basis set. Figure 1 compares graphically the results of Table 4, including also first-order results. A dramatic improvement is seen in changing from first to second order. Third order is usually not improving too much over second order. An exceptional case was found for potassium hydride where third order is definitely necessary as shown in Table 4.

Fig. 1
figure 1

Comparison of experimental and calculated ionization energies for GW100 set of molecules. Filled squares correspond to negative orbital energy, \(I^1 = -\epsilon \). Empty circles mark second order, \(I^2\), results nad filled circles are used for \(I^3\). The line with slope equal to one is just a guide for the eye. The closer to the line more exact is the calculated value

4.2 Electron affinities

The formulation described applies to both ionization energies and electron affinities as it is. The only difference is that the change in the total number of electrons is \(-1\) for ionizations and 1 for electron affinities. A single orbital occupation number becomes the perturbation parameter. However, in this case initial reference value for the occupation is zero. If b is the index identifying the virtual orbital that allocates the extra electron then

$$\begin{aligned} A_b = - [E(N+1)-E(N)] = -\epsilon _b - \frac{\epsilon _b^{(1)}}{2!} - \frac{\epsilon _b^{(2)}}{3!} - \ldots \end{aligned}$$
(58)

is the associated electron affinity. However, anionic density is frequently very different to that of the reference neutral system and, therefore, it is more challenging for ADPT static response calculations and in general for DFT calculations. Figure 2 shows a comparison between fractional charge calculations on water molecule and predictions obtained from Taylor series truncated up to third order. Energies relative to the neutral ground state are plotted for a number of electrons ranging from 9 to 11, corresponding to the single charge cationic and anionic limits. The discontinuity at the neutral position is evident. The left side of the plots corresponds to left derivatives with respect to N where charge is taken from the HOMO. Right side corresponds to right derivatives with respect to N where charge is added to the LUMO. For this case both second and third order perform very well on the prediction of ionization energy. For electron affinity accuracy improves with increasing order but third order is still about 1 eV deviated from fractional charge results.

Results of Figure 2 suggest that analytic derivatives are properly computed. Higher-order truncation produces a closer approximation. The capacity to match fractional charge results depends on the convergence of the series. From this and observation of some other cases it seems that it works better for removal of electrons. Electron affinities are very sensitive to the basis set used even for the \(\varDelta \)SCF method. However, is clear the fact that third order is not matching fractional charge calculations for the case of electron addition as well as second and third order do for the case of electron removal. It is also clear that while for electron removal second order is close to convergence for electron addition third or higher order will be required.

Fig. 2
figure 2

Comparison of Taylor series prediction (labeled ADPT) and fractional charge \(\varDelta \)SCF results for water molecule. This calculation corresponds to water entry for PBE exchange-correlation functional on Table 3. Same structure and basis set are employed

Figure 3 shows a comparison of two Taylor series approximations, one with the neutral system as reference (H\(_2\)O/ADPT) and the other with the anionic system as reference (H\(_2\)O\(^-\)/ADPT). It can be seen how the anion is the best choice for accuracy. Then the method is capable of obtaining a good estimate of electron affinity by changing the reference density. However, the reader may find preferable to compute the \(\varDelta \)SCF in this case since the method requires knowledge of the neutral geometry which usually comes with SCF information. Having calculated SCF for both systems \(\varDelta \)SCF is preferable for accuracy. Nevertheless, it is interesting to note that the current approach is accurate when electron removal is the target even if it has to deal with anionic densities.

Fig. 3
figure 3

Comparison of Taylor series with neutral and anionic reference systems (labeled ADPT) and fractional charge \(\varDelta \)SCF results for water molecule

4.3 Double ionization energies

For the calculation of double ionization energies the only modification is that two orbitals participate on the initial perturbation, each one is losing one electron. Therefore multiple perturbations are considered simultaneously. For removal from orbitals q and s the required energy for double ionization, \(D_{qs}\), is given by

$$\begin{aligned} D_{qs} = -\epsilon _q - \epsilon _s + \frac{1}{2}( \epsilon _q^{(1),q} + \epsilon _q^{(1),s} + \epsilon _s^{(1),q} +\epsilon _s^{(1),s} ) + \ldots . \end{aligned}$$
(59)

Here \(\epsilon _q^{(1),s} = \epsilon _s^{(1),q}\) is the change in the q orbital energy as response to the electron removal from s orbital. First-order corresponds to taking the negative orbital energies of both orbitals and adding them. Second order includes second-order ionization energies and a single extra correction that accounts for coupling,

$$\begin{aligned} D_{qs}^{2} = I_q^{2} + I_s^{2} + \epsilon _q^{(1),s} . \end{aligned}$$
(60)

Table 5 lists a few results for double ionization calculated with this approach and compares them to previously reported experimental and theoretical values [52]. The calculated electronic configurations were NH\(_3\)(\(1a_1^2\) \(2a_1^2\) \(1e^4\) \(3a_1^2\)), H\(_2\)O(\(1a_1^2\) \(2a_1^2\) \(1b_2^2\) \(3a_1^2\) \(1b_1^2\)), C\(_2\)H\(_2\)(\(1a_{1g}^2\) \(1a_{2u}^2\) \(2a_{1g}^2\) \(2a_{2u}^2\) \(3a_{1g}^2\) \(1e_{1u}^4\)), C\(_2\)H\(_4\) (\(1a_g^2\) \(1b_{1u}^2\) \(2a_g^2\) \(2b_{1u}^2\) \(1b_{2u}^2\) \(3a_g^2\) \(1b_{3g}^2\) \(1b_{3u}^2\)), CO(\(1a_1^2\) \(2a_1^2\) \(3a_1^2\) \(4a_1^2\) \(1e_1^4\) \(5a_1^2\)) and CH\(_2\)O(\(1a_1^2\) \(2a_1^2\) \(3a_1^2\) \(4a_1^2\) \(1b_2^2\) \(5a_1^2\) \(1b_1^2\) \(2b_2^2\)). This time corrections obtained with second order are of more than 100% of the original value predicted by adding orbital energies. On the authors’ opinion for the cases presented in Table 5\(D^2\) is successful in recovering the energetics of the double ionization. Especially for the case of triplets where the accuracy is comparable to that of propagator methods SD2 [52] and ADC(2) [53].

Table 5 Double ionization energies (eV) calculated with second-order ADPT compared with experimental values and other theoretical methodologies

5 Conclusions

The use of auxiliary density perturbation theory for the direct computation of ionization energies and double ionization energies is proposed here. Linear response with respect to a change in the occupation of a single molecular orbital suffices to provide up to third-order correction to the approximation for energy difference between cationic and neutral systems. Second-order energy correction suffices to produce accurate ionization energies. However, some cases like potassium hydride, KH, will require the inclusion of third-order correction. Unfortunately, the calculation of electron affinities is much less accurate and third-order energy correction may no be enough in many cases. Both one- and two-electron binding energies show accuracy comparable to Green’s function methodologies in the quasi-particle approximation including G\(_0\)W\(_0\), P3 and OVGF for the one-electron case and SD2 and ADC(2) for the two-electron case. Therefore, ADPT approach stands as an alternative reliable method for the direct computation of electron binding energies. Since it depends only on the reference neutral system this approach is suitable for on-the-fly calculations in molecular dynamics for example.