Superconducting pairing mediated by spin-fluctuations from first principles

We present the derivation of an ab-initio and parameter free effective electron-electron interaction that goes beyond the screened RPA and accounts for superconducting pairing driven by spin-fluctuations. The construction is based on many body perturbation theory and relies on the approximation of the exchange-correlation part of the electronic self-energy within time dependent density functional theory. This effective interaction is included in an exchange correlation kernel for superconducting density functional theory, in order to achieve a completely parameter free superconducting gap equation. First results from applying the new functional to a simplified two-band electron gas model are consistent with experiments.


I. INTRODUCTION
In the last 30 years the field of superconductivity has been revolutionized by the discovery of high-temperature (hi-T c ) superconductivity (SC). First the Cuprates were found in the 80s 1,2 and then iron based compounds in the 2000s [3][4][5] . Numerous empirical/semi-empirical theoretical models have been developed in order to grasp the essential physics of these materials [6][7][8] and still the community is far from a general consensus on the origin of the pairing mechanism. In our opinion consensus can only be achieved in one single way: By developing a universal predictive theory of (hi-T c ) SC that is fully parameter free and is able to reproduce the essential properties of the SC (including its critical temperature, complex gap function and excitation spectrum), under the only knowledge of the atomic constituents and chemical structure.
In this work we carefully reconsider this functional and it's construction, in particular the treatment of the electronic component of the pairing. We aim to reach two goals in this work: The first is very general and not bound to SCDFT applications. We want to formulate a screened effective electron-electron interaction that goes beyond the GW form and includes additional physical effects not present in the random phase approximation (RPA) type of screening. In particular we aim to include the effect of low energy spin-fluctuations, in a computationally feasible way and completely ab-initio (i.e. without the use of parameters -like a Stoner exchange splitting). We focus on the spin-fluctuations because they are one of the prime candidates responsible for SC pairing in iron SC 24 ; The second goal we aim for is to cast this effective interaction along the standard Coulomb and phonon contribution 10 in a functional that can be used within the ab-initio SCDFT framework.
The paper has the following outline: In the next section (Sec. II) we discuss briefly the existing functionals of SCDFT. Then we propose the set of relevant diagrams for representing the spin-fluctuations (Sec. III A) and the corresponding self-energy contribution are constructed in the Nambu formalism (Sec. III B). After some additional approximation (Sec. III C) the final form of the self-energy taking the spin-fluctuations into account is presented in Sec. IV. This self-energy may be used also in many-body theory but the focus of this work lies on SCDFT and hence in Sec. V a functional is derived using the Sham-Schlüter connection. In the last part of the present work (Sec. VI) the functional is applied to a two band model system and the trends with respect to the Coulomb, phonon and spin-fluctuations (SF) contributions are investigated.

II. A BRIEF REVIEW OF SCDFT
Before engaging in the task of constructing the effective interaction and the corresponding functional, we briefly review the SCDFT framework and the available functionals. SCDFT is based on a theorem of Oliveira, Gross and Kohn 9 , that extends the Hohenberg-Kohn proof 25 of the 1-1 correspondence between density and external potential to the SC density χ (r,r ) = Ψ ↓ (r)Ψ ↑ (r ) whereΨ σ (r) are the usual electronic field operators and is the thermal average. The modern version of the theory has been re-formulated by Lüders, Marques and coworkers 10,18 . This formulation includes an explicit ionic density and a further extension of the Hohenberg-Kohn proof in the spirit of the multicomponent DFT introduced by Kreibich and Gross 26 .
In their work, Lüders, Marques and coworkers 10,18 proposed an exchange-correlation functional derived from many-body perturbation theory and presented solutions of the SC Kohn-Sham (KS) system for real SC. The starting point is an approximation for the self-energy. In their work they use: whereḠ KS k (ω n ) is the Green's function of the SC Kohn-Sham system, in Nambu notation 27 , W kk (ω n ) is the screened Coulomb interaction and Λ Ph kk is the interaction mediated by phonons. We will indicate objects in Nambu notation with a bar (for exampleḠ). The components of the Green's function read: The ω n are the fermionic Matsubara frequencies, k is a combined index k = {nk} containing the band index and the momentum of the KS electron and τ z is the third Pauli matrix. The normal (G k ) and anomalous (F k ) part of the Nambu Green's function are given by: whereâ k (τ ) andâ † k are the usual creation and annihilation operators in the Heisenberg picture,T is the time ordering operator and denotes the thermal average. The electronic part of the interaction, in the work of Marques and Lüders, is assumed to be given by the classical (testcharge to test-charge) screened Coulomb interaction 28 , therefore it can be expressed in terms of the dielectric function −1 : where v k1k2 is the bare Coulomb interaction. The interaction mediate by phonons Λ Ph kk (ω n ) depends on the electron-phonon coupling matrix elements g kk λq and the phonon frequencies Ω λq : A Feynman diagram schematic form for this approximation is shown in Eq. II. For the two terms we use the namesΣ GW andΣ Ph , respectively.
Exact expresion : Once an approximation for the self-energy is fixed, it is possible to construct the corresponding exchangecorrelation (xc) potential using the Sham-Schlüter connection (see Sec. V for details). A key approximation in order to reduce the numerical complexity of SCDFT is the so-called decoupling approximation 29 i.e. ∆ xc kk ≈ δ kk ∆ xc k that can be interpreted as the exclusion of hybridization effects between the non SC Kohn-Sham orbitals by the effect of the SC condensation. In this approximation the electronic KS system can be diagonalized analytically leading to a self-consistent expression for the pairing potential ∆ xc k known as the SCDFT gap equation: that has the BCS form 30 . The kernels Z D k and K C kk depend on the temperature, the interaction matrix elements (w k1k2 , Λ Ph kk ), the single particle KS energies k and E k : The critical temperatures predicted within this equation agree extremely well with the experimentally observed ones within the class of phononic SC [12][13][14][15]18,21,31,32 . However, Eq. 6 fails to describe high temperature SC 5,33 , where the SC mechanism is believed to be related to magnetic interactions.
In the next sections we will see that this fact is actually not surprising. One assumption in using a dielectric type of electron-electron interaction is that all vertex corrections in the Coulomb part of the self-energy are completely neglected. As one can see in Eq. II, by comparing the approximation with its exact counterpart obtained from Hedin's equations 34 . Vertex corrections can be safely disregarded in the phonon related part of the self-energy (at least within the domain of validity of Migdal's theorem 35 ), but are crucial to account for magnetic fluctuation effects which will be discussed in the next sections.

III. EXTENSION OF THE SELF-ENERGY
In this section we will construct a form of the selfenergy containing the relevant processes involved in a spin-fluctuation-mediated pairing. The effective interaction will be evaluated in the parent metallic system in which SC takes place (i.e. we will ignore the feedback effect of the SC condensation). This approximation may not be valid at low temperature where the condensation strongly affects the screening of magnetic fluctuations 6,36,37 . However this assumption is exact near the critical point since the SC phase transition is of the continuous, second order type. Therefore the approximation will not affect the estimation of a critical temperature.
Note, that the same approximation was applied to the phononic part of the interaction, entering the gap equation (Eq. 6). In this case the effect of the condensation on the pairing strength is most likely negligible even at low temperature 38,39 .

A. Inclusion of the Relevant Diagrams
To go beyond the GW approximation we consider 40 the T -matrix 41,42 , that is given by a Bethe-Salpeter equation (BSE) 43 : The coordinate 1 is a compact notation: 1 = {r 1 ,τ 1 ,σ 1 }, where r 1 is the real space vector, τ 1 the Matsubara time and σ 1 the spin index. The diagrammatic form of this BSE and the self-energy contributionΣ T =ḠT corresponding to the T −matrix are shown in Eq. III A.  Empirically it is well known, that the response function in the T -matrix approximation leads to reasonable results for the magnetic response function 41,42 .Σ T has been used in various studies to account for magnetic fluctuations in non-SC systems [44][45][46][47] .
However, for reasons that we will discuss in Sec. III C, we will not make direct use of the T -matrix and the corresponding self-energy for constructing the effective interaction. Instead we will consider a larger set of diagrams, by starting from the particle-hole propagator Λ P 48-50 . This object contains all proper particle-hole contributions. These are all diagrams which are irreducible with respect to a bare Coulomb interaction and have two incoming and two outgoing open coordinates. The T −matrix is fully contained in Λ P . We use the anal-ogy withΣ T (see Eq. III A), to formulate the self-energy containing magnetic fluctuations as: In Eq. III A we only show a simple diagrammatic form, details will be derived explicitly in the next section. Note that this form of the self-energy contains both Hartree and xc contributions while only the xc parts enter the functional derivative appearing in the vertex part of Hedin's equations. The Hartree contribution will be implicitly removed in Sec. III C when we define the approximation for Λ P . Also double counting problems related to this choice of the self-energy are adressed in Sec. III C. As a general convention in this work we will always refer to the xc (Hartree free) part of the self-energy.

B. Properties of the Particle-Hole Propagator
In this section we will investigate the properties of the particle-hole propagator, which is the key object of our derivation. For simplicity we will restrict ourselves to collinear magnetic systems, i.e. we assume a spindiagonal Green function G (1 ,2 ) = δ σ1σ2 G (1 ,2 ). One of Hedin's equations is a Dyson equation for the vertex Γ (1 ,2 ,3 ): where the kernel of the Dyson equation is given by and is called irreducible particle-hole propagator 50 . The Λ 0 contains all connected diagrams which are irreducible with respect to a bare Coulomb interaction and the particle-hole propagator. The coordinates 1 and 4 are connected to outgoing Green's functions and 2 and 3 to incoming ones. (Eq. III B). The self-energy used in the construction of the kernel will be indicated by Σ V . The kernel Λ 0 also plays the central role in the BSE equation for Λ P which we shall derive now. However, before this can be done it is necessary to classify the two possible contribution present in Λ 0 . The distinction between the two sets is made using the concept of a path. A path is a chain of Green's function lines connecting to coordinates. For example in Eq. III B, we have a path connecting the coordinates 1 and 4: After this definition we can introduce the two possible contribution present in Λ 0 : 1) The crossed contribution Λ c 0 , which has a path connecting the coordinates 1 ↔ 3 and 2 ↔ 4 . The spin contributions in this set are Note, that the contributions to the T -matrix (Eq. III A) are all of this type 41 .
2) The direct contribution Λ d 0 , which has a path connecting the coordinates 1 ↔ 2 and 3 ↔ 4 . The spin contributions in this set are The kernels Λ c 0 and Λ d 0 are created by the functional derivative of the self-energy with respect to G. By the functional derivative If the removed function was part of a loop, the resulting contribution is direct. It is crossed otherwise (Eq. III B). Since a loop was destroyed in the derivative, an extra minus sign is necessary to compensate for this: It is important to keep track for these signs since, while Feynman diagrams have an explicit sign convention, symbolic expressions (like the ones written in terms of the particle hole propagator Eq. III A) do not.
Due to Eqs. 8,11 and 12, the total irreducible particlehole propagator is given by the difference between the crossed and direct contributions: With these preliminary considerations we can start to derive a BSE for Λ P . Note that also within the set Λ P all contributions are either direct or crossed, i.e. Λ P = Λ c + Λ d . If for example two crossed contribution are linked, the resulting one stays crossed.
Any other combination leads to a direct contribution. A special case is the connection of two direct contribution, in which a loop is created: Considering these cases, the BSEs for the direct and crossed contribution of the particle-hole propagator read: where (n) labels the order in the irreducible particle-hole propagator and the zero order Λ c,d (0) is given by the irreducible part Λ c,d 0 . By subtracting Eqs. 14 and 15 we find a combined BSE for Λ c-d containing crossed and direct terms: Not only in the BSE, also for the expression forΣ SF given in Eq. III A the separation in direct and crossed contribution is crucial. Up to now only the normal state Green's function appeared in the equations, because we neglected the feedback effects of SC to the magnetic fluctuations.
However, in the expression for the self-energy (Eq. III A) the normal and anomalous parts appear and double arrow lines For the normal contribution (diagonal component in Nambu space) the situation is a bit more complicated because the loop rule has to be taken into account: If a crossed contribution is inserted inside the self-energy form in Eq. III A, then a loop is created (Fig. III B) leading to a minus sign. While the direct terms do not lead to any additional loop and no sign change. This can be seen in the following graph: crossed : In the short hand notation given in Eq. III A this was not, strictly speaking, taken into account. The rigorous form of this equation instead reads: .
Here it appears explicitly how the direct contribution enters with different sign on the diagonal and off diagonal Nambu component due to the loop rule. The way the four point object is connected to the Green's function is shown in Eq. III B and III B for the 21 and 22 element of the self-energy. In the solution of the gap equation (see Sec. V), this sign difference will turn out to be crucial in order to have a nontrivial solution of the gap equation. Note, that the self-energy derived from the Berk-Schrieffer interaction 51 satisfies the same sign convention as derived here.
Under the assumption of singlet SC pairing and magnetic collinearity, the normal part of the Green's function conserves spin i.e. G (1 ,2 ) = δ σ1σ2 G σ1 (r 1 ,τ 1 ,r 2 ,τ 2 )while the anomalous part flips spin F (1 ,2 ) = δ σ1−σ2 F σ1 (r 1 ,τ 1 ,r 2 ,τ 2 ) . This aspect has no consequences for theΣ GW andΣ Ph parts of the self-energy Eqs. (1) and (2), since the interactions have no spin dependence. However, for the spin-fluctuation part in Eq. 18 the restriction lead to the result that: Furthermore, by comparing with Eq. III B it is clear that Λ c has no (σ,σ,−σ,−σ) component. While Λ d has no component in the channel (σ,−σ,σ,−σ). Therefore the following identities hold: These relations lead to a self-energy containing only Λ c-d and not Λ c±d : This is a convenient result, because we have to solve only one BSE for Λ c−d (Eq. 16) and not the two separate equations for the direct and crossed part. In the previous expression we use a concise notation in which the integrals are not written out (compare with Eq. 18) . We will use this notation in the next section when it does not lead to any ambiguity in the formulae. Unless stated otherwise the coordinates are contracted analogous to a matrix product.

C. Local Approximation
In the last sections we have constructed an approximate form of the electronic Nambu self-energy that we believe contains the relevant contributions to account for a spin-fluctuation mediated pairing. However, even this approximate form is too complex to be used directly in simulations on real materials. The dimensionality of the four-point object Λ c−d in Eqs. 21 to 24 and the resulting integrals are simply too complex to handle. What would make a significant simplification, and bring the computational cost of the method to an affordable level, would be a two-point form of the interaction; meaning an approximate form that can be written as wherew SF is to be understood as an effective interaction between electrons that accounts for the spin fluctuation (SF) pairing and a, b is the index with respect to the Nambu matrix. Of course such a form can be obtained by a formal inversion of the above equation: but this is of no use in practice, because one would need the four-point object Λ c±d in the first place.
To obtain a two-point form we make use of an additional approximation, already common in the context of band structure calculations 47,52,53 , to use the Kohn-Sham potential as a local approximation for Σ V , namely The functional derivative (Eq. 16) leads to the xc-kernel f xc , which is a two-point function in space-time but still a four-point object in spin ( . If Eq. 16 is solved with the xc-kernel and the full G is approximated by the KS one, the well known Dyson equation from linear response density functional theory appears 54 : leading to the proper part of the response function P σ1σ1σ2σ2 . Since the Green's function is diagonal with respect to spin the longitudinal and transverse parts of the response decouple: The proper part P is related to the full response function χ via the Dyson equation: The response function χ σ1σ2σ3σ4 in the spin basis determines the change in the spin resolved charge density induced by external fields and is defined as: The equations for Λ c-d will become more transparent if we rewrite the response quantities on the right hand side of Eqs. (27) and (28) in components of the Pauli matrix i.e.: In this form χ represents the change of the electronic charge ρ or magnetic moment m (ρ i = {ρ, m x , m y, m z }) with respect to physical fields ϕ ext In this work we will label the Pauli index with i and j and it should not be confused with the Nambu index indicated by a and b (used in Eq. 25). The basis transformations between the two representations are simply: where σ i is the four component vector containing the Pauli matrices: Note that the response function is a sparse matrix for the considered collinear system and the proper and full response are equal χ ij = P ij if i, j ∈ {x, y} (Eq. 29). As mentioned above we change the representation of the response function from spin to the Pauli basis in order to achieve a more transparent form of the effective interaction: where the two point functions f iσ and f F σ are given by (z ↑ = +1, z ↓ = −1): In Eq. 30 we have dropped f xc σ1σ1σ2σ2 + f T 0σ1 P 00 f 0σ2 in order to avoid any double counting: This term is in fact already accounted for by the screened Coulomb interaction w in the GW term, that contains an analogous contribution in the form v + vP 00 v + . . . . In addition we neglect the linear order f xc σ−σ−σσ , because in a system featuring magnetic fluctuations it is supposed to be small as compared to the dominant f F σ χ F σ f F σ term. This is because the spin-fluctuations should appear as a large value of the magnetic susceptibility.
The form of Λ c−d in Eq. 31 has now obtained an immediate physical interpretation: The exchange-correlation kernels f xc act as a vertex for the electronic interaction mediated by spin-fluctuations, which are expressed by the magnetic susceptibility χ.
The transverse part allows for a flip of the electronic spin, which can be understood in the following way: 1. The spin-flip of electron 1 corresponds to a local fluctuation in the magnetic moment δm 1 .
2. This in turn creates a magnetic field via the kernel: δB 1 = f xc δm 1 .
3. If the system features magnetic fluctuations the δB 1 leads to fluctuations in the system: δm 2 = χδB 1 .
4. The fluctuation (magnons) couple via the second kernel to another electron δB 2 = f xc δm 2 , whose spin is flipped in the absorption process.
This interpretation is analogous to the one given by Kukkonen and Overhauser for the charge fluctuations 28 and shows that the term Λ c−d in the local form represents an effective interaction between electrons mediated by magnetic fluctuations. The finalΣ SF is constructed by inserting the two-point particle-hole propagators given in Eqs. 30 and 31 in the equation for the self-energy Eqs. 21 to 24. We do this in the next section. Note that by doing so, a separation in direct and crossed contribution is implied for the xc-kernel (see Eqs. 19 and 20). This is an assumption because the xc-kernel is in general not based on a diagrammatic expansion.

IV. FINAL FORM OF THE SELF-ENERGY
So far our formalism has been derived for collinear magnetic systems. We will now simplify it for the case of a non-magnetic system. This means that, by construction, we will not consider the possibility of atomic scale coexistence between magnetism and SC. We believe that this assumption is justified for a large set of hightemperature SC (cuprates and pnictides) where usually (although exceptions have been observed) the antiferromagnetic (AFM) order is completely suppressed in the SC regime 8,55 .
In a non magnetic system the response functions and xc-kernel are diagonal with respect to the Pauli index and the three directions with respect to the magnetic field are degenerate. In this case the effective interaction in Eqs. 30 and 31 reduces to the a simple form (we use here x is a combined variable of space and time x = {rτ }): and we insert this form in Eqs. (21) to (24): The prefactor represents the fact, that the diagonal part enters with the opposite sign due to the effect of the loop rule discussed in Sec. III B. By construction the equation has the GW form, however with an interaction originating from spin-fluctuation and denoted as Λ SF . Note that this effective interaction, in the limit of an homogeneous electron gas, reduces to the form derived by Vignale and Singwi in Ref. 48. Λ SF contains the xc-kernel and the magnetic response function, which can be calculated using TD-DFT 54 . The total self-energy is given by the sum ofΣ GW ,Σ SF andΣ Ph given in Eqs. 1, 33 and 2, respectively.

V. THE FUNCTIONAL
So far we have derived the contribution from the spinfluctuations to the self-energy, and correspondingly a spin-fluctuation pairing that can be used in any theory of SC. In this section we will specialize this result to be used within the framework of SCDFT. To do this we will make use of the Sham-Schlüter connection 56 between a KS and an interacting system, generalized to the SC case by Marques 57 . We will assume that v xc and the diagonal part ofΣ GW act in a similar way as a mass operator on the Hartree states and cancel each other. Then the noninteracting SC-KS is mapped to the interacting system by the following self-energy form: 8 The Sham-Schlüter connection follows by imposing that the total density ρ (r 1 ) = lim r1→r2 2 β ωn G (r 1 ,r 2 ,ω n ) and the anomalous density χ (r 1 ,r 2 ) = ωn F (r 1 ,r 2 ,ω n ) are identical in the KS and interacting system: The connection becomes a closed equation for the superconducting gap by approximating the full Green's function on the right hand side and the one inΣ with the KS one. In addition we neglect all contributions that are explicitly higher than linear in the pairing potential.
Since, as discussed in Sec. III, we are mostly concerned with computing an accurate critical temperature, rather than the full temperature dependence of the superconducting gap. In this approximation, the 12 element of the Sham-Schlüter equation simplifies to: The Matsubara summation may be evaluated analytically because the frequency dependence of the KS Green's function is known and for the response functions and phonons a frequency representation with respect to the anti-Hermitian part of the retarded quantities holds (Eq. 5). The evaluation is done with the help of the residue theorem, which, for the Matsubara summation of an analytic function A (z), leads to: where the contour γ are two infinite half-circle excluding the imaginary axis and f β is the Fermi distribution function. At this point an adiabatic approximation for the xckernel is assumed. This reduces the order of poles in Λ SF and the same residue are found for the Coulomb, Phonon and spin-fluctuation contribution. After the evaluation of the Matsubara sum 10 , the equation is inverted for ∆ xc k , leading to a gap equation very similar to the conventional one in Eq. 6.
b β (ω) is the Bose distribution function and ζ k are the single particle KS energies of the non-SC system relative to the chemical potential ζ k = k − µ. The kernels in this integral equation represent different physical processes introduced by the corresponding self-energy contribution.
2. The w kk (ω) term is the scattering of electrons due to Coulomb interaction. The bare Coulomb interaction is reduced by intermediate scattering processes (screening) w = v −1 (Eq. 4). Plasmonic effects may also enter via this term.
3. The last term Λ SF kk (ω) contains the magnetic response function χ zz and hence becomes important if the system is close to a transition to a magnetic phase. In such a case the response function features sharp excitations, which represent paramagnons.
The two last terms originate both from the Coulomb interaction and are therefore intrinsically repulsive: If these are the strongest terms in the gap equation 36, in order to have a non-trivial solution, a sign change must occur in the gap function. We will show how this mechanism works in the following section where we apply the formalism to a model system and investigate the general structure of the theory.

VI. APPLICATION TO A TWO BAND MODEL SYSTEM
A. Isotropic approximation and the two band model with a SF pairing The function ∆ nk is known to have a strong dependence on the nk 18 . The remaining k-space structure however is often of little importance, especially within topologically connected Fermi surface portions 15 . Therefore it is convenient to define an isotropic (or multi-bandisotropic) approximation, by means of the following averaging operation: where N n (E) is the density of states of band n. This simplification leads to an isotropic gap equation, where all interactions are replaced by energy and band dependent quantities. As an example of how this averaging works, we consider the spin-fluctuation term: We assume the system to be close to an AFM instability with the ordering and nesting vector q c . Then the proximity to the magnetic phase leads to strong fluctuations (paramagnons) at low frequencies and the vector q c in the magnetic response function χ zz (ω,q) 58 . These fluctuations are expected to be weak for other vectors. The portions (bands) of the Fermi surface nested by q c will be labeled as n = + and n = −. The usual TDDFT kernels like the adiabatic local density approximation have no dependence on (ω,q) and the form of Λ SF in frequency and q is determined by χ zz .
In such a situation the isotropic effective interaction is expected to be small for intra-band scattering Λ SF ±± ≈ 0 and peaked for inter-band scattering Λ SF ±∓ . This situation is modeled by a simple parabola centered around a characteristic frequencyω (see Fig. 2 top right -we have also tested a Gaussian and a Lorentzian form and we find that the shape has little effect on the properties of the model): We fix the width c 2 to a value of 0.01 Ryd and the density of states times the peak height c 1 is determined by requiring a value for the effective coupling strength λ SF . The effective coupling strength is given by the integral of Λ SF IJ with respect to ω: Within this simple multiband isotropic model the structure of our spin-fluctuation theory of SC can be made more transparent.

B. Discussion of the SF Contribution
Here and in the next section, we will assume a twoband isotropic approximation discussed in the previous section. In this way we try to investigate the general solution of the SCDFT gap equation for a SF mediated pairing. As a first step we neglect completely Coulomb and phonon contributions, considering only the SF interaction given in Eq. 38.
We modify the SF by acting on the parametersω and λ SF IJ . In Fig. 1 we show the critical temperature as a function ofω and λ SF IJ . From Eliashberg theory for phonon driven superconductors we have knowledge of the following relations between characteristic frequency and average coupling strength 59,60 : T c ∝ω √ λ for large λ.
On the right hand side of Fig. 1 we can recognize the exponential and square root behavior with respect to λ SF .
The transition between small and large coupling takes place at λ SF ∼ 1.5 forω = 0.15 Ryd. For the dependence of T c with respect toω, we find a linear behavior. This result is not accidental, because the sign change of the gap leads effectively to an attractive interaction between the two bands, therefore within this simplified model there is no formal difference between spinfluctuation repulsive pairing and conventional phononic attraction.
Within such a model calculation we can estimate the coupling strength in the iron based superconductors, simply by the experimental knowledge that the characteristic energy of the magnetic fluctuations are of about 20 meV 5 . This implies a coupling λ SF of about 1 (neglecting phononic and Coulomb effects) to reach the critical temperatures of ∼ 10 K found in these compounds.

C. Interplay between Coulomb, Spin-Fluctuation and Phonon Contribution
In the previous section we have observed that the features of the SCDFT gap equation with a SF interaction is relatively simple and similar to the conventional phononic case. Here we add the effect of phonon and Coulomb interactions. This will create a frustration on the SC potential because the three interaction will compete against each other.
We use the same spin-fluctuation spectrum in Eq. (38) and fix λ SF = 1.2 andω = 0.01 Ryd. The Coulomb interaction is very different in nature, compared to the SF. In particular its frequency dependence develops in the plasmonic energy scale (eV). We therefore ignore it, and assume a flat interaction with respect to ω.
It is expected, that this interaction decays like where q TF is the Thomas-Fermi screening vector. Therefore the contribution for small momentum transfer (intraband) should be much larger than the inter-band contribution corresponding to q c ≈ k − k . Similarly for scattering from the Fermi level to high-energy states, the scattering should become momentum independent 61 . We model this picture in the following way: The diagonal part w II (E 1 ,E 1 ) of this interaction is shown in Fig. 2. For the parameters of the Coulomb interaction we choose N J ( F ) U 0 = 0.2, U 1 = U0 2 . The parameter κ is used to control the Coulomb interaction: If κ is large the Coulomb interaction decays very quickly in energy.
Due to the choice of an electron hole symmetric DOS (N + (E) = N − (E)) and interaction, the gap function is also totally symmetric: ∆ I (E) = ∆ I (−E) and ∆ + (E) = −∆ − (E) and hence only the positive branch ∆ + (E) is shown in Fig. 2. Note that within this symmetry a constant coulomb interaction (κ → ∞) cancels out completely from the gap equation 36. In general the gap function shows a typical form, being constant close to the Fermi level, followed by an extremum and a decay for larger energies 18,62 . By decreasing the value of κ the Coulomb contribution starts to influence the results. The critical temperature decreases, due to repulsion within one band and the gap starts to show dips. The dips indicate the regime, where the Coulomb interaction competes with the spin-fluctuation. For κ < 1 the Coulomb contribution are strong enough to flip the sign of the gap function for certain energies. The sign change of the gap function at higher energies reduces the effect related to the repulsive Coulomb term in the gap equation 36.
Effectively, the Coulomb contribution on the full energy scale may be mapped to a reduced effective Coulomb term on a smaller energy scale due to the sign change of the gap function. Hence, the sign change of the gap function is the way Coulomb renormalization happens in SCDFT 18,61 . Note that the sign change of the gap happens far away from the Fermi level.
However, for κ = 4 the Coulomb contribution still decays faster in energy than the spin-fluctuation term, which leads to one more sign change in the large energy regime (dash-dotted blue line in Fig. 2). If we decrease the κ further the Coulomb contribution dominate also in the large energy range and the gap changes sign only once.
Note, that the critical temperature converges quickly with respect to κ. This indicates, that the Coulomb interaction influences the critical temperature only in a small energy window for the symmetric two band system and the renormalization of the gap is not effecting the critical temperature strongly.
To verify this observation, we test different densities of states instead of the constant one used so far: The different functions are step and square root functions which represent a two and three dimensional system, respectively and a Gaussian peak. The different functions are shown in Fig. 3. The non flat functions cut away the long energy tails of the gap function. However, the effect on the critical temperature is rather small.
What has a strong effect on T c is a change of the ratio N+( F ) N−( F ) = 1 (magenta line in Fig. 2). This verifies that in the two band system with a sign changing gap, only a small energy region around the Fermi level matters for the Coulomb repulsion. This is very different from the one band case, where the Coulomb renormalization at large energies is an essential effect. Last we consider the inclusion of the purely attractive phonon contribution. It's behavior is rather straightforward. If a single phonon peak is included ( Eq. 38 ) providing the same coupling between all bands, the critical temperature reduces by increasing λ Ph . Until a the phononic coupling strength reaches the value of λ SF . The phonons dominate the gap equation and the symmetry of the gap changes. The s ± state favored by the repulsive interactions is suppressed and an s ++ state is found. From this point the T c starts to rise again with increasing λ Ph .

VII. SUMMARY AND OUTLOOK
In this work we have derived a fully ab-initio effective electron-electron interaction containing the effect of a pairing mediated by spin-fluctuation. The derivation starts from many-body perturbation theory and the introduction of a self-energy function, containing the relevant diagrams originating from its vertex part, therefore going beyond the GW approximation. The vertex correction enter the expression in the form of the particle-hole propagator, which is a highly non-local object determined by a BSE. The solution of the BSE would be computationally not feasible for realistic systems instead, in Sec. III C, we propose a local approximation for the particlehole propagator. In this limit the equation for the selfenergy becomes very transparent: spin-fluctuations enter via the magnetic response functions, that can be calculated effectively 58,63 within linear response TD-DFT, and the coupling to the electrons is mediated by the exchangecorrelation kernel.
This effective interaction is in principle applicable to any theory of SC, however in this work we cast it into the framework of SCDFT by the construction of an explicit xc kernel (Sec. V). In this way the full gap equation remains completely parameter free.
We show a first application of the new functional (Sec. VI) to a two band electron gas model. Application to real materials will follow, however this further step needs the calculation of the magnetic response function for the real system and will be the subject to further investigation.