This commit is contained in:
Pierre-Francois Loos 2019-09-11 19:35:03 +02:00
commit fc67e9c900

View File

@ -198,17 +198,17 @@ where $\hat{n}(\br)$ is the density operator, $n_{\Psi}$ denotes the
density of wavefunction $\Psi$, and density of wavefunction $\Psi$, and
$\bw\equiv\left(w^{(1)},w^{(2)},\ldots\right)$ is the collection of $\bw\equiv\left(w^{(1)},w^{(2)},\ldots\right)$ is the collection of
(decreasing) ensemble weights assigned to the excited states. Note that (decreasing) ensemble weights assigned to the excited states. Note that
$w^{(0)}=1-\sum_{K>0}w^{(K)}\geq 0$.\\ $w^{(0)}=1-\sum_{K>0}w^{(K)}\geq 0$. When $\bw=0$, the
conventional ground-state universal functional is recovered,
Ground-state theory:
\beq \beq
F^{\bw=0}[n]=F[n]=\underset{\Psi\rightarrow n}{\rm min} F^{\bw=0}[n]=F[n]=\underset{\Psi\rightarrow n}{\rm min}
\bra{\Psi}\hat{T}+\hat{W}_{\rm \bra{\Psi}\hat{T}+\hat{W}_{\rm
ee}\ket{\Psi} ee}\ket{\Psi},
\eeq \eeq
where the ensemble reduces to a single wavefunction. In the latter case,
the HF-like expression (or a fraction of it, as usually done in
practical calculations) for the Hx energy can be introduced rigorously
into DFT by considering the following decomposition,
\beq\label{eq:generalized_KS-DFT_decomp} \beq\label{eq:generalized_KS-DFT_decomp}
F[n]&=& F[n]&=&
\underset{\Phi\rightarrow n}{\rm min} \underset{\Phi\rightarrow n}{\rm min}
@ -216,15 +216,17 @@ F[n]&=&
ee}\ket{\Phi}+\overline{E}_{\rm c}[n] ee}\ket{\Phi}+\overline{E}_{\rm c}[n]
\nonumber\\ \nonumber\\
&=& &=&
\underset{\Phi\rightarrow n}{\rm min} \underset{\bmg^\Phi\rightarrow n}{\rm min}
\left\{{\rm \left\{{\rm
Tr}\left[\bmg^\Phi{\bm t}\right]+W_{\rm Tr}\left[\bmg^\Phi{\bm t}\right]+W_{\rm
HF}\left[{\bmg}^{\Phi}\right]\right\}+ HF}\left[{\bmg}^{\Phi}\right]\right\}+
\overline{E}_{\rm c}[n] \overline{E}_{\rm c}[n]
,
\eeq \eeq
where ${\bm t}$ is the matrix representation of the one-electron kinetic where ${\bm t}$ is the matrix representation of the one-electron kinetic
energy operator, $\bmg^\Phi$ is the one-electron reduced density energy operator, $\bmg^\Phi$ is the one-electron reduced density
matrix (just referred to as density matrix in the following) of $\Phi$, matrix (just referred to as density matrix in the following) obtained
from $\Phi$,
and and
\beq \beq
W_{\rm W_{\rm
@ -233,7 +235,7 @@ HF}\left[{\bmg}\right]\equiv\frac{1}{2} \Tr(\bmg \, \bG \, \bmg)
is the conventional density-matrix functional HF Hartree-exchange is the conventional density-matrix functional HF Hartree-exchange
energy. By analogy with Eq.~(\ref{eq:generalized_KS-DFT_decomp}), we energy. By analogy with Eq.~(\ref{eq:generalized_KS-DFT_decomp}), we
decompose the ensemble universal functional as follows: decompose the ensemble universal functional as follows:
\beq \beq\label{eq:generalized_F_w}
F^{\bw}[n]&=& F^{\bw}[n]&=&
\underset{\hat{\Gamma}^{{\bw}}\rightarrow n}{\rm min}\left\{{\rm \underset{\hat{\Gamma}^{{\bw}}\rightarrow n}{\rm min}\left\{{\rm
Tr}\left[\hat{\Gamma}^{{\bw}}\hat{T}\right] Tr}\left[\hat{\Gamma}^{{\bw}}\hat{T}\right]
@ -249,7 +251,7 @@ Hxc}[n]
\left[{\bmg}^{\bw}{\bm t}\right] \left[{\bmg}^{\bw}{\bm t}\right]
+W_{\rm HF}\left[{\bmg}^{\bw}\right] +W_{\rm HF}\left[{\bmg}^{\bw}\right]
\right\}+ \right\}+
\overline{E}^{\bw}_{\rm Hxc}[n] \overline{E}^{\bw}_{\rm Hxc}[n],
\eeq \eeq
where the minimization in Eq.~(\ref{eq:ens_LL_func}) has been restricted where the minimization in Eq.~(\ref{eq:ens_LL_func}) has been restricted
to density matrix operators to density matrix operators
@ -257,203 +259,233 @@ to density matrix operators
\hat{\Gamma}^{{\bw}}=\sum_{K\geq 0}w^{(K)}\vert\Phi^{(K)}\rangle\langle\Phi^{(K)}\vert=\sum_{K\geq 0}w^{(K)}\hat{\Gamma}^{(K)} \hat{\Gamma}^{{\bw}}=\sum_{K\geq 0}w^{(K)}\vert\Phi^{(K)}\rangle\langle\Phi^{(K)}\vert=\sum_{K\geq 0}w^{(K)}\hat{\Gamma}^{(K)}
\eeq \eeq
that are constructed from single Slater that are constructed from single Slater
determinants $\Phi^{(K)}$. determinants $\Phi^{(K)}$. Note that the density matrices
${\bmg}^{(K)}={\bmg}^{\Phi^{(K)}}$ are idempotent and diagonal in the
The complementary ensemble Hx energy removes the ghost-interaction same spin-orbital basis). On the other hand, the ensemble
errors introduced in $W_{\rm density matrix ${\bmg}^{{\bw}}=\sum_{K\geq 0}w^{(K)}{\bmg}^{(K)}$, which is a convex combination of the ${\bmg}^{(K)}$
HF}\left[{\bmg}^{\bw}[n]\right]$: matrices, is {\it not} idempotent, unless ${\bw}=0$. Indeed,
\beq \beq
\overline{E}^{{\bw}}_{\rm \left[{\bmg}^{{\bw}}\right]^2&=&\sum_{K,L\geq
Hx}[n]&=&\sum_{K\geq0}w^{(K)}W_{\rm 0}w^{(K)}w^{(L)}{\bmg}^{(K)}{\bmg}^{(L)}
HF}\left[{\bmg}^{(K)}[n]\right] \nonumber\\
-W_{\rm &=&\sum_{K\geq
HF}\left[{\bmg}^{\bw}[n]\right]. 0}\left(w^{(K)}\right)^2{\bmg}^{(K)}+\sum_{K\neq L\geq
0}w^{(K)}w^{(L)}{\bmg}^{(K)}{\bmg}^{(L)}
\nonumber\\ \nonumber\\
&=& &=&
{\bmg}^{{\bw}}+\sum_{K,L\geq
0}w^{(K)}\left(w^{(L)}-\delta_{KL}\right){\bmg}^{(K)}{\bmg}^{(L)}
\nonumber\\
&=&{\bmg}^{{\bw}}+w^{(0)}{\bmg}^{(0)}\times\sum_{K>0}w^{(K)}\left(2{\bmg}^{(K)}-1\right)
\nonumber\\
&&+\sum_{K, L >0
}w^{(K)}\left(w^{(L)}-\delta_{KL}\right){\bmg}^{(K)}{\bmg}^{(L)}
\nonumber\\
&\neq&{\bmg}^{{\bw}}
.
\eeq
This is of course expected since using an ensemble is, in this context,
analogous to assigning
fractional occupation numbers (which are determined from the ensemble
weights) to the KS orbitals.\\
Another issue with the use of
ensembles in DFT is the introduction of spurious ghost-interaction errors
(i.e. unphysical interactions between different states) into the
ensemble energy when inserting ${\bmg}^{{\bw}}$ into the HF
density-matrix functional Hx energy $W_{\rm
HF}\left[\bmg\right]$. This type of errors is specific to ensembles
which explains why, in constrast to ground-state DFT [see
Eq.~(\ref{eq:generalized_KS-DFT_decomp})], a complementary ensemble Hx
energy is needed to recover a ghost-interaction-free energy:
\beq
\overline{E}^{{\bw}}_{\rm
Hx}[n]&=&
{\rm {\rm
Tr}\left[\hat{\Gamma}^{{\bw}}[n]\hat{W}_{\rm ee}\right]-W_{\rm Tr}\left[\hat{\Gamma}^{{\bw}}[n]\hat{W}_{\rm ee}\right]-W_{\rm
HF}\left[{\bmg}^{\bw}[n]\right] HF}\left[{\bmg}^{\bw}[n]\right]
\nonumber\\
&=&
\sum_{K\geq0}w^{(K)}W_{\rm
HF}\left[{\bmg}^{(K)}[n]\right]
-W_{\rm
HF}\left[{\bmg}^{\bw}[n]\right],
\eeq \eeq
where ${\bmg}^{\bw}[n]$ is the minimizing ensemble density matrix in
Note that $\overline{E}^{{\bw}=0}_{\rm Eq.~(\ref{eq:generalized_F_w}) and, by construction, $\overline{E}^{{\bw}=0}_{\rm
Hx}[n]=0$.\\ Hx}[n]=0$. Consequently, the ensemble correlation functional can be
expressed as follows [see Eq.~(\ref{eq:generalized_F_w})]:
Ensemble correlation energy:
\beq \beq
\overline{E}^{{\bw}}_{\rm \overline{E}^{{\bw}}_{\rm
c}[n]&=& c}[n]&=&
{\rm \overline{E}^{\bw}_{\rm Hxc}[n]-\overline{E}^{{\bw}}_{\rm
Hx}[n]
\nonumber\\
&=&{\rm
Tr}\left[\hat{\gamma}^{{\bw}}[n]\left(\hat{T}+\hat{W}_{\rm Tr}\left[\hat{\gamma}^{{\bw}}[n]\left(\hat{T}+\hat{W}_{\rm
ee}\right)\right] ee}\right)\right]
\nonumber\\ %\nonumber\\
&&- %&&
-
{\rm {\rm
Tr}\left[\hat{\Gamma}^{{\bw}}[n]\left(\hat{T}+\hat{W}_{\rm Tr}\left[\hat{\Gamma}^{{\bw}}[n]\left(\hat{T}+\hat{W}_{\rm
ee}\right)\right] ee}\right)\right]
\nonumber\\
&=&
\sum_{K\geq 0}w^{(K)}\Bigg(\bra{\Psi^{(K)}[n]}\hat{T}+\hat{W}_{\rm
ee}\ket{\Psi^{(K)}[n]}
\nonumber\\
&&-\bra{\Phi^{(K)}[n]}\hat{T}+\hat{W}_{\rm
ee}\ket{\Phi^{(K)}[n]}\Bigg),
\eeq \eeq
where $\hat{\gamma}^{{\bw}}[n]$ and $\hat{\Gamma}^{{\bw}}[n]$ are the minimizing density matrix
operators in Eqs.~(\ref{eq:ens_LL_func}) and
(\ref{eq:generalized_KS-DFT_decomp}), respectively.\\
Variational expression of the ensemble energy:
In eDFT, the ensemble energy $E^{{\bw}}=\sum_{K\geq
0}w^{(K)}E^{(K)}$ is obtained variationally as follows:
\beq \beq
E^{{\bw}}=\underset{{\bmg}^{{\bw}}}{\rm min}\Big\{ E^{{\bw}}=\underset{n}{\rm min}\Big\{
F^{\bw}[n]+\int d\br\,v_{\rm ext}(\br)n(\br)
\Big\}.
\eeq
Combining the latter expression with the decomposition in
Eq.~(\ref{eq:generalized_KS-DFT_decomp}) leads to
\beq
E^{{\bw}}=
\underset{n}{\rm min}\Bigg\{
\underset{{\bmg}^{{\bw}}\rightarrow n}{\rm min}\Big\{
{\rm {\rm
Tr}\left[{\bmg}^{{\bw}}{\bm h}\right]+W_{\rm Tr}\left[{\bmg}^{{\bw}}{\bm h}\right]+W_{\rm
HF}\left[{\bmg}^{\bw}\right] HF}\left[{\bmg}^{\bw}\right]
+ +
\overline{E}^{{\bw}}_{\rm \overline{E}^{{\bw}}_{\rm
Hxc}\left[n_{{\bmg}^{{\bw}}}\right] Hxc}\left[n^{{\bw}}\right]
%+E^{{\bw}}_{\rm c}\left[n_{\hat{\Gamma}^{{\bw}}}\right] %+E^{{\bw}}_{\rm c}\left[n_{\hat{\Gamma}^{{\bw}}}\right]
\Big\} \Big\}
\Bigg\}
\nonumber\\
\eeq \eeq
or, equivalently,
For $K>0$ \beq\label{eq:var_princ_Gamma_ens}
E^{{\bw}}=
\alert{ \underset{{\bmg}^{{\bw}}}{\rm min}\Big\{
{\rm
Tr}\left[{\bmg}^{{\bw}}{\bm h}\right]+W_{\rm
HF}\left[{\bmg}^{\bw}\right]
+
\overline{E}^{{\bw}}_{\rm
Hxc}\left[n^{{\bw}}\right]
%+E^{{\bw}}_{\rm c}\left[n_{\hat{\Gamma}^{{\bw}}}\right]
\Big\}
,
\eeq
where $n^{\bw}$ is the density obtained from the density matrix
${\bmg}^{\bw}$ and ${\bm h}={\bm t}+{\bm v}_{\rm ext}$ is the total one-electron
Hamiltonian matrix representation. When the minimum is reached, the
ensemble energy and its derivatives can be used to extract individual
ground- and excited-state energies as follows:\cite{Deur_2018b}
\beq\label{eq:indiv_ener_from_ens}
E^{(I)}&=&E^{{\bw}}+\sum_{K>0}\left(\delta_{IK}-w^{(K)}\right)\dfrac{\partial
E^{{\bw}}}{\partial w^{(K)}}.
\eeq
Since, according to the Hellmann--Feynman theorem, the ensemble energy
derivative reads
\beq \beq
\dfrac{\partial E^{{\bw}}}{\partial w^{(K)}}&=&{\rm \dfrac{\partial E^{{\bw}}}{\partial w^{(K)}}&=&{\rm
Tr}\left[{\bmg}^{(K)}{\bm h}\right]-{\rm Tr}\left[\left({\bmg}^{(K)}-{\bmg}^{(0)}\right){\bm h}\right]
Tr}\left[{\bmg}^{(0)}{\bm h}\right]
\nonumber\\ \nonumber\\
&&+\Tr(\bmg^{(K)} \, \bG \, \bmg^{\bw}) &&+\Tr\left[\left({\bmg}^{(K)}-{\bmg}^{(0)}\right) \, \bG \, \bmg^{\bw}\right]
-\Tr(\bmg^{(0)} \, \bG \, \bmg^{\bw}) \nonumber\\
+... &&+
\int d\br\,\dfrac{\delta \overline{E}^{{\bw}}_{\rm
Hxc}\left[n^{{\bw}}\right]}{\delta
n({\br})}\left(n^{(K)}(\br)-n^{(0)}(\br)\right)
\nonumber\\
&&+\left. \dfrac{\partial \overline{E}^{{\bw}}_{\rm
Hxc}\left[n\right]}{\partial w^{(K)}}\right|_{n=n^{{\bw}}},
\eeq \eeq
we finally obtain from Eqs.~(\ref{eq:var_princ_Gamma_ens}) and (\ref{eq:indiv_ener_from_ens}) the following in-principle-exact expressions for the
energy levels within the ensemble:
\beq \beq
E^{(I)}&=&E^{{\bw}}+\sum_{K>0}\left(\delta_{IK}-w^{(K)}\right)\dfrac{\partial E^{{\bw}}}{\partial w^{(K)}} &&E^{(I)}=
\nonumber\\ {\rm
&=& Tr}\left[{\bmg}^{(I)}{\bm h}\right]+
...+\Tr(\bmg^{(I)} \, \bG \, \bmg^{\bw})
-\dfrac{1}{2}\Tr(\bmg^{\bw} \, \bG \, \bmg^{\bw})+...
\nonumber\\
&=&...+
\Tr\left[\left(\bmg^{(I)}-\dfrac{1}{2}\bmg^{\bw}\right) \, \bG \, \bmg^{\bw}\right] \Tr\left[\left(\bmg^{(I)}-\dfrac{1}{2}\bmg^{\bw}\right) \, \bG \, \bmg^{\bw}\right]
+... \nonumber\\
\eeq &&+\overline{E}^{{\bw}}_{\rm
} Hxc}\left[n^{{\bw}}\right]
+\int d\br\,\dfrac{\delta \overline{E}^{{\bw}}_{\rm
Note that, if we use orbital rotations, the gradient of the DFT energy
contributions can be expressed as follows,
\beq
\left.\dfrac{\partial
\overline{E}^{{\bw}}_{\rm Hxc}\left[n^{{\bw}}({\bmk})\right]
}{\partial \kappa_{lm}}
\right|_{{\bmk}=0}=\int d{\br}\dfrac{\delta \overline{E}^{{\bw}}_{\rm
Hxc}\left[n^{{\bw}}\right]}{\delta Hxc}\left[n^{{\bw}}\right]}{\delta
n({\br})}\left.\dfrac{\partial n^{{\bw}}({\bmk},{\br})}{\partial \kappa_{lm}} n({\br})}\left(n^{(I)}(\br)-n^{\bw}(\br)\right)
\right|_{{\bmk}=0},
\eeq
where
\beq
n^{{\bw}}({\bmk},{\br})=\sum_\sigma\sum_{pq}\varphi_p({\bmk},{\bfx})\varphi_q({\bmk},{\bfx})\Gamma_{pq}^{\bw}
\eeq
thus leading to
\beq
&&\left.\dfrac{\partial
\overline{E}^{{\bw}}_{\rm Hxc}\left[n^{{\bw}}({\bmk})\right]
}{\partial \kappa_{lm}}
\right|_{{\bmk}=0}=
\sum_{pq}\Gamma_{pq}^{\bw}
\nonumber\\
&&\times\left.\dfrac{\partial}
{\partial \kappa_{lm}}
\Big[\left\langle\varphi_p(\bmk)\middle\vert\hat{\overline{v}}^{{\bw}}_{\rm
Hxc}
\middle\vert \varphi_q(\bmk)\right\rangle
\Big]
\right|_{{\bmk}=0}.
\eeq
In conclusion, the minimizing canonical orbitals fulfill the following
hybrid HF/GOK-DFT equation,
\beq
&&\left(-\frac{\nabla_{\bfr}^2}{2}+v_{\rm
ext}({\bfr})+\hat{u}_{\rm HF}\left[\Gamma^{\bw}\right]
+\dfrac{\delta \overline{E}^{{\bw}}_{\rm Hxc}\left[n^{{\bw}}\right]}{\delta
n({\br})}\right)\varphi^{{\bw}}_p({\bfx})
\nonumber
\\
&&=\varepsilon^{{\bw}}_p\varphi^{{\bw}}_p({\bfx}).
\eeq
Since $\partial \Gamma_{pq}^{\bw}/\partial
w^{(I)}=\Gamma_{pq}^{(I)}-\Gamma_{pq}^{(0)}$, it comes
\manu{just for me ...
\beq
&&+\dfrac{1}{2}
\sum_{pqrs}\langle \varphi_p\varphi_q\vert\vert
\varphi_r\varphi_s\rangle
%\times
\left(\Gamma_{pr}^{(I)}-\Gamma_{pr}^{(0)}\right)\Gamma^{\bw}_{qs}
\nonumber\\
&&+\dfrac{1}{2}\sum_{pqrs}\langle \varphi_q\varphi_p\vert\vert
\varphi_s\varphi_r\rangle
%\times
\Gamma^{\bw}_{pr}\left(\Gamma_{qs}^{(I)}-\Gamma_{qs}^{(0)}\right)
\nonumber\\
&&=
\sum_{pqrs}\langle \varphi_p\varphi_q\vert\vert
\varphi_r\varphi_s\rangle
%\times
\left(\Gamma_{pr}^{(I)}-\Gamma_{pr}^{(0)}\right)\Gamma^{\bw}_{qs}
\nonumber\\
&&=
\sum_{pr}\left[\hat{u}_{\rm HF}\left[\Gamma^{\bw}\right]\right]_{pr}\left(\Gamma_{pr}^{(I)}-\Gamma_{pr}^{(0)}\right)
\nonumber\\
&&=
\sum_p\left[\hat{u}_{\rm
HF}\left[\Gamma^{\bw}\right]\right]_{pp}\left(\nu_p^{(I)}-\nu_p^{(0)}\right)
\eeq
}
\beq
\dfrac{dE^{\bw}}{dw^{(I)}}=\sum_p\varepsilon^{{\bw}}_p\left(\nu_p^{(I)}-\nu_p^{(0)}\right)+\left.\dfrac{\partial \overline{E}^{{\bw}}_{\rm
Hxc}\left[n\right]}{\partial w^{(I)}}\right|_{n=n^{{\bw}}}.
\eeq
LZ shift in this context: $\varepsilon^{{\bw}}_p\rightarrow
\overline{\varepsilon}^{{\bw}}_p=\varepsilon^{{\bw}}_p+\overline{\Delta}_{\rm
LZ}^{{\bw}}$ where
\beq
N\overline{\Delta}_{\rm
LZ}^{{\bw}}&=&\overline{E}^{{\bw}}_{\rm Hxc}\left[n^{{\bw}}\right]
-\int d{\br}\dfrac{\delta \overline{E}^{{\bw}}_{\rm
Hxc}\left[n^{{\bw}}\right]}{\delta
n({\br})}n^{{\bw}}({\bfr})
\nonumber\\ \nonumber\\
&& &&
-W_{\rm +\sum_{K>0}\left(\delta_{IK}-w^{(K)}\right)\left. \dfrac{\partial \overline{E}^{{\bw}}_{\rm
HF}\left[{\bmg}^{\bw}\right] Hxc}\left[n\right]}{\partial w^{(K)}}\right|_{n=n^{{\bw}}}.
\eeq \eeq
%+\Tr(\bmg^{(I)} \, \bG \, \bmg^{\bw})
%-\dfrac{1}{2}\Tr(\bmg^{\bw} \, \bG \, \bmg^{\bw})+...
such that At the eLDA level:
\beq
E^{{\bw}}=\sum^M_{K=0}w^{(K)}\sum_p\nu_p^{(K)}\overline{\varepsilon}^{{\bw}}_p.
\eeq
Thus we conclude that individual energies can be expressed in principle
exactly as follows,
\beq \beq
E^{(K)}=\sum_p\nu_p^{(K)}\overline{\varepsilon}^{{\bw}}_p+\sum^M_{I>0}\left(\delta_{IK}-w^{(I)}\right)\left.\dfrac{\partial \overline{E}^{{\bw}}_{\rm \overline{E}^{{\bw}}_{\rm
Hxc}\left[n\right]}{\partial w^{(I)}}\right|_{n=n^{{\bw}}}. Hxc}\left[n\right]\rightarrow\int d\br\,n(\br)\overline{\epsilon}^{{\bw}}_{\rm
Hxc}(n(\br))
\eeq
\beq
\dfrac{\delta \overline{E}^{{\bw}}_{\rm
Hxc}\left[n\right]}{\delta
n({\br})}\rightarrow \overline{\epsilon}^{{\bw}}_{\rm
Hxc}(n(\br))+n(\br)\left.\dfrac{\partial \overline{\epsilon}^{{\bw}}_{\rm
Hxc}(n)}{\partial n}\right|_{n=n(\br)}
\eeq \eeq
%In eDFT, the ensemble energy \beq
%\begin{equation} &&E^{(I)}\rightarrow
% \E{}{\bw} = \qty(1-\sum_{I>0}\ew{I})\E{}{(0)}+\sum_{I>0} \ew{I} \E{}{(I)} {\rm
%\end{equation} Tr}\left[{\bmg}^{(I)}{\bm h}\right]+
%is obtained variationally as follows, \Tr\left[\left(\bmg^{(I)}-\dfrac{1}{2}\bmg^{\bw}\right) \, \bG \, \bmg^{\bw}\right]
%\begin{equation} \nonumber\\
% \E{}{\bw} = \qty(1-\sum_{I>0}\ew{I})\E{}{(0)}+\sum_{I>0} \ew{I} \E{}{(I)} &&
%\end{equation} +\int d\br\,
% \overline{\epsilon}^{{\bw}}_{\rm
%In analogy with ground-state generalized KS-DFT, we consider the following partitioning of the ensemble Levy-Lieb functional Hxc}(n^{\bw}(\br))\,n^{(I)}(\br)
%\begin{equation} \nonumber\\
% F^{\bw}[n]=\underset{\hat{\Gamma}^{{w}}\rightarrow n}{\rm min}\left\{{\rm Tr}\left[\hat{\Gamma}^{{w}}(\hat{T}+\hat{W}_{ee})\right]\right\} &&
%\end{equation} +\int d\br\,\left.\dfrac{\partial \overline{\epsilon}^{{\bw}}_{\rm
Hxc}(n)}{\partial n}\right|_{n=n^{\bw}(\br)}n^{\bw}(\br)\left(n^{(I)}(\br)-n^{\bw}(\br)\right)
\nonumber\\
&&
+\int d\br\,\sum_{K>0}\left(\delta_{IK}-w^{(K)}\right)n^{{\bw}}(\br)\left.
\dfrac{\partial \overline{\epsilon}^{{\bw}}_{\rm
Hxc}(n)}{\partial w^{(K)}}\right|_{n=n^{{\bw}}(\br)}.
\eeq
\alert{
or, equivalently,
\beq
&&E^{(I)}\rightarrow
{\rm
Tr}\left[{\bmg}^{(I)}{\bm h}\right]+
\Tr\left[\left(\bmg^{(I)}-\dfrac{1}{2}\bmg^{\bw}\right) \, \bG \, \bmg^{\bw}\right]
\nonumber\\
&&
+\int d\br\,
\dfrac{\delta \overline{E}^{{\bw}}_{\rm
Hxc}\left[n^{\bw}\right]}{\delta
n({\br})}\,n^{(I)}(\br)
\nonumber\\
&&
-\int d\br\,\left.\dfrac{\partial \overline{\epsilon}^{{\bw}}_{\rm
Hxc}(n)}{\partial n}\right|_{n=n^{\bw}(\br)}\Big(n^{\bw}(\br)\Big)^2
\nonumber\\
&&
+\int d\br\,\sum_{K>0}\left(\delta_{IK}-w^{(K)}\right)n^{{\bw}}(\br)\left.
\dfrac{\partial \overline{\epsilon}^{{\bw}}_{\rm
Hxc}(n)}{\partial w^{(K)}}\right|_{n=n^{{\bw}}(\br)}.
\eeq
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{KS-eDFT for excited states} \subsection{KS-eDFT for excited states}