Title: ETH_Sem5 / AdvQC / 15_SpinDFT

Q: How are the electron density and the wavefunction related? What is the spin-density?
A: \[\hat{H}_\mathrm{el} \Psi_0=E_\mathrm{el} \Psi_0 \quad \text { with } \quad \Psi_0=\Psi_0\left(\bm{r}_1, s_1, \bm{r}_2, s_2, \ldots, \bm{r}_N, s_N\right)\]
electron density:
\[\begin{aligned} \rho(\bm{r})= & N \int\left|\Psi_0\left(\bm{r}, s_1, \bm{r}_2, s_2, \ldots, \bm{r}_N, s_N\right)\right|^2 \mathrm{~d} s_1 \mathrm{~d}^3 r_2 \mathrm{~d} s_2 \cdots \mathrm{d}^3 r_N \mathrm{~d} s_N \\ = & N \int\left|\Psi_0\left(\bm{r},+\frac{1}{2}, \bm{r}_2, s_2, \ldots, \bm{r}_N, s_N\right)\right|^2 \mathrm{~d}^3 r_2 \mathrm{~d} s_2 \cdots \mathrm{d}^3 r_N \mathrm{~d} s_N \\ & +N \int\left|\Psi_0\left(\bm{r},-\frac{1}{2}, \bm{r}_2, s_2, \ldots, \bm{r}_N, s_N\right)\right|^2 \mathrm{~d}^3 r_2 \mathrm{~d} s_2 \cdots \mathrm{d}^3 r_N \mathrm{~d} s_N \\ = & \rho_\alpha(\bm{r})+\rho_\beta(\bm{r}) \end{aligned}\]
spin density:
\[Q(\bm{r})=\rho_\alpha(\bm{r})-\rho_\beta(\bm{r})\]

Q: What are the eigenfunctions of the \(\hat{S}^2\) and \(\hat{S}_z\) operator? What are the eigenvalues and what is the consequence?
A: Non-relativistic Hamiltonian does not contain spin-dependent terms:
\[\left[\hat{H}_\mathrm{el}, \hat{S}^2\right]=\left[\hat{H}_\mathrm{el}, \hat{S}_z\right]=\left[\hat{S}^2, \hat{S}_z\right]=0\]
\(\Rightarrow\) ground-state \(\Psi_0\) can be chosen as eigenfunction of \(\hat{S}^2\) and \(\hat{S}_z\)
\(\Psi_0 \rightarrow \Psi_0^S, \Psi_0^{M_S}\)
\[\hat{S}^2 \Psi_0^S=S(S+1) \Psi_0^S \quad \text { and } \quad \hat{S}_z \Psi_0^{M_S}=M_s \Psi_0^{M_S}\]
\(\rightarrow\) the ground-state is \((2 S+1)\)-fold degenerate \(\left(M_s=-S, \ldots,+S\right)\)
Electron density and spin density:
\[\begin{aligned} \rho^{M_s}(\bm{r}) & =\rho^{M_s=S}(\bm{r}) \quad \text { with } \quad \int \rho(\bm{r}) \mathrm{d}^3 r=N \\Q^{M_s}(\bm{r}) & =\frac{M_s}{S} Q^{M_s=S}(\bm{r}) \quad \text { with } \quad \frac{1}{2} \int Q^{M_s}(\bm{r}) \mathrm{d}^3 r=M_s \end{aligned}\]

Q: Which are the 3 important implications of the Hohenberg-Kohn theorems?
A: 1. Unique mapping from the electron density to the wave function \[ \rho(\bm{r}) \stackrel{\mathrm{HK}}{\longrightarrow} v(\bm{r}) \longrightarrow \hat{H}_\mathrm{el} \stackrel{\mathrm{SE}}{\longrightarrow} \Psi_0[\rho]\left(\bm{r}_1, s_1, \ldots, \bm{r}_N, s_N\right) \longrightarrow E_\mathrm{el}[\rho]\]
2. Existence of an energy density functional (IMPORTANT: HK theorems only prove that their exists one, but do not give the analytic solution!) \[ E_\mathrm{el}[\rho]=\int \rho(\bm{r}) v_{\mathrm{nuc}}(\bm{r}) \mathrm{d}^3 r+F_{\mathrm{HK}}[\rho]\]
3. \(F_{\mathrm{HK}}[\rho]=\left\langle\Psi_0[\rho]\left|\hat{T}+\hat{V}_{\mathrm{ee}}\right| \Psi_0[\rho]\right\rangle\) : universal Hohenberg-Kohn functional that does NOT depend on the structure! Existence of a variational principle \[ E_0=\min _\rho E_\mathrm{el}[\rho] \quad \text { under the constraint } \quad \int \rho(\bm{r}) \mathrm{d}^3 r=N\]
4. \(\rightarrow\) the minimizing density \(\rho(\bm{r})\) is the ground-state electron density

Q: What is the Levy constraint-search formulation?
A: The HK proof is only valid for densities originating from a potential \(v(\bm{r})\), i.e., only if the electron density \(\rho(\pos)\) is \(v\)-representable (i.e., densities that
are obtained from a ground state wavefunction).
\(\rightarrow\) Extension to \(N\)-representable densities (i.e., densities that are obtained from any wavefunction. One can produce any mathematical function which after integration yields the total number of particles \(N\) but may not be a solution of the Schrödinger equation.)
In the ground state, the energy is obtained by:
\[E_0 = \min _{\rho}E_v[\rho]\]
A generalization of the HK theorem which does not require \(\rho(\pos)\) to be \(v\)-representable is the Levy constraint-search functional (for \(N\)-representable densities):
\[F_{\mathrm{HK}}[\rho]=\min _{\Psi_0 \rightarrow \rho}\left\langle\Psi_0\left|\hat{T}+\hat{V}_{\mathrm{ee}}\right| \Psi_0\right\rangle\]
HK theorem for \(N\)-representable densities
\[\rho(\bm{r}) \stackrel{\text { constrained search }}{\longrightarrow} \Psi_0[\rho]\left(\bm{r}_1, s_1, \ldots, \bm{r}_N, s_N\right) \longrightarrow E_\mathrm{el}[\rho]\]

Q: How to deal with spin-degenerate ground states in the context of the HK theorems?
A: \(\rightarrow\) Extension to degenerate ground states is easily possible.
Degeneracies due to spin
For states with \(S>0\), there are \(2 S+1\) degenerate wave functions:
\[ \Psi_0^{M_s} \quad \text { with } \quad M_s=-S, \ldots,+S\]
\(\rightarrow\) these different wave functions share the same electron density \(\rho(\bm{r})\)
HK theorem in case of spin degeneracies
\[\begin{array}{*5{>{\displaystyle}c}} & & \Psi_0^{M_S=+S}[\rho](\pos_1,s_1,\ldots,\pos_N,s_N) & & \\ & \nearrow & & \searrow & \\ \rho(\pos) & & \vdots & & E_\mathrm{el}[\rho] \\ & \searrow & & \nearrow & \\ & & \Psi_0^{M_S=-S}[\rho](\pos_1,s_1,\ldots,\pos_N,s_N) & & \end{array}\]

Q: The total electron density determines everything in Hohenberg-Kohn DFT. The spin density (i.e., the \(\alpha\)- and \(\beta\)-densities) does not appear! So how can the spin density be determined in the Hohenberg-Kohn DFT?
A: For a chosen value of \(M_s\), the density uniquely defines the wave function:
\[\rho(\bm{r}) \longrightarrow \Psi_0^{M_s}[\rho]\left(\bm{r}_1, s_1, \ldots, \bm{r}_N, s_N\right)\]
From \(\Psi_0^{M_s}[\rho]\), the \(\alpha\)- and \(\beta\)-electron densities can be calculated
\[\begin{aligned} & \rho_\alpha^{M_s}[\rho](\bm{r})=N \int\left|\Psi_0^{M_s}[\rho]\left(\bm{r},+\frac{1}{2}, \bm{r}_2, s_2, \ldots\right)\right|^2 \mathrm{~d}^3 r_2 \mathrm{~d} s_2 \cdots \mathrm{d}^3 r_N \mathrm{~d} s_N \\ & \rho_\beta^{M_s}[\rho](\bm{r})=N \int\left|\Psi_0^{M_s}[\rho]\left(\bm{r},-\frac{1}{2}, \bm{r}_2, s_2, \ldots\right)\right|^2 \mathrm{~d}^3 r_2 \mathrm{~d} s_2 \cdots \mathrm{d}^3 r_N \mathrm{~d} s_N \end{aligned}\]
One then obtains the spin density as
\[Q^{M_s}[\rho](\bm{r})=\rho_\alpha^{M_s}[\rho](\bm{r})-\rho_\beta^{M_s}[\rho](\bm{r})\]

Q: According to the Hohenberg-Kohn theorem, only the total electron density is required to predict the electronic energy as well as all other molecular observables. In principle, the spin density is not needed. So why should one use a formalism which includes the spin density as well?
A: For open-shell molecules, one usually introduces the spin density as an additional variable, resulting in a spin-DFT formalism. This allows one to construct better approximations for the exchange-correlation energy functional, since the additional information on the spin density is available and can be exploited. Within such a spin-DFT formalism, the exact spindependent exchange-correlation functional will (in addition to the exact electron density) also yield the exact spin density, provided an unrestricted Kohn-Sham formalism is used. Therefore, the spin density is one of the fundamental quantities in spin-DFT, and it is crucial to know which of the approximate exchange-correlation functionals yield accurate spin densities. (J. Chem. Theory Comput. 2011, 7, 9, 2740-2752)
Consider for example a biradical, a breaking bond or an anti-ferromagnetically coupled cluster. In such a system the ground state is actually a superposition of two degenerate determinants
\[\frac{1}{\sqrt{2}}\left(\abs{\phi_1\alpha,\phi_2\beta} + \abs{\phi_1\beta,\phi_2\alpha}\right)\]
However, restricted KS or HF calculations only return one of the two determinants for which the spin-density is non-vanishing in contrast to the true spin density!

Q: How can the Hohenberg-Kohn functional \(F_\mathrm{HK}\) be generalized to include a dependence on the spin density?
A: Rewrite minimization with densities \(\rho_\alpha\), \(\rho_\beta\)
\[ \begin{aligned} E_0 & =\min _\rho\left\{\int \rho(\bm{r}) v_{\mathrm{nuc}}(\bm{r}) \mathrm{d}^3 r \right. \\ &\hphantom{E_0=\min _\rho()} \left.+\min _{\Psi_0 \rightarrow \rho}\left\langle\Psi_0\left|\hat{T}+\hat{V}_{\mathrm{ee}}\right| \Psi_0\right\rangle\right\} \\ & =\min _{\rho_\alpha, \rho_\beta}\left\{\int\left[\rho_\alpha(\bm{r})+\rho_\beta(\bm{r})\right] v_{\text {nuc }}(\bm{r}) \mathrm{d}^3 r \right. \\ &\hphantom{\min _{\rho_\alpha, \rho_\beta}()} \left.+\min _{\Psi_0 \rightarrow \rho_\alpha, \rho_\beta}\left\langle\Psi_0\left|\hat{T}+\hat{V}_{\text {ee }}\right| \Psi_0\right\rangle\right\} \end{aligned}\]
Generalized Hohenberg-Kohn functional
\[ \begin{aligned} F_{\mathrm{HK}}\left[\rho_\alpha, \rho_\beta\right]=\min _{\Psi_0 \rightarrow \rho_\alpha, \rho_\beta} \\\left\langle\Psi_0\left|\hat{T}+\hat{V}_{\mathrm{ee}}\right| \Psi_0\right\rangle \end{aligned}\]
Generalized spin-resolved energy functional
\[\begin{aligned} E_\mathrm{el}\left[\rho_\alpha, \rho_\beta\right]&=\int\left[\rho_\alpha(\bm{r})+\rho_\beta(\bm{r})\right] v_{\mathrm{nuc}}(\bm{r}) \mathrm{d}^3 r \\ &\hphantom{=\int}+F_{\mathrm{HK}}\left[\rho_\alpha, \rho_\beta\right] \end{aligned}\]
Minimize spin-resolved energy functional
\[ E_0=\min _{\rho_\alpha, \rho_\beta} E_\mathrm{el}\left[\rho_\alpha, \rho_\beta\right] \]
\(\rightarrow\) under the constraint that \(\rho_\alpha\) and \(\rho_\beta\) integrate to \(N_\alpha\) and \(N_\beta\) electrons, with
\[M_s=\left(N_\alpha-N_\beta\right)/2 \]
Total density and spin density as fundamental variables
\(\rightarrow\) switch to total density \(\rho=\rho_\alpha+\rho_\beta\) and spin density \(Q=\rho_\alpha-\rho_\beta\)
\[F_{\mathrm{HK}}[\rho, Q]=\min _{\Psi_0 \rightarrow \rho, Q}\left\langle\Psi_0\left|\hat{T}+\hat{V}_{\mathrm{ee}}\right| \Psi_0\right\rangle\]
\(\rightarrow\) determination of the ground-state spin density \(Q=Q[\rho]\) by minimizing \(F_{\mathrm{HK}}\):
\[ E_0=\min _Q F_{\mathrm{HK}}[\rho, Q] \]
\[\text { under the constraint } \quad \frac{1}{2} \int Q(\bm{r}) \mathrm{d}^3 r=M_s\]

Q: How can one target different spin states in HK DFT and how can a somehow spin-state specific functional be constructed?
A: For \(S>0\), the wave functions \(\Psi_0^{M_s}\) are degenerate, with spin densities
\[ Q^{M_s}(\bm{r})=\frac{M_s}{S} Q^{M_s=S}(\bm{r})\]
All these spin densities must correspond to the same energy, therefore
\[ F_{\mathrm{HK}}\left[\rho, \alpha Q^{M_s=S}[\rho]\right]=\text { const. }\]
for \(-1 \leq \alpha \leq+1\). (This uses the generalization of HK-DFT to ensemble densities)
Spin-independent vs. spin-resolved HK functional
\[ F_{\mathrm{HK}}[\rho]=F_{\mathrm{HK}}[\rho, Q[\rho]]=F_{\mathrm{HK}}[\rho, Q=0]\]
Spin-State Specific HK-DFT
- Hohenberg-Kohn DFT always leads to the ground-state density
- The ground-state wave function can be chosen as eigenfunction of \(\hat{S}^2\)
Targeting different spin states in HK-DFT
Spin-state specific Hohenberg-Kohn functional:
\[F_{\mathrm{HK}}^S[\rho]=\min _{\Psi_0^S \rightarrow \rho}\left\langle\Psi_0^S\left|\hat{T}+\hat{V}_{\mathrm{ee}}\right| \Psi_0^S\right\rangle\]
\[\text{ with } \quad \hat{S}^2 \Psi_0^S=S(S+1) \Psi_0^S\]
\(\rightarrow\) different functional for each value of \(S\)
Constructing a (somehow) spin-state specific functional
\(\rightarrow\) enforce a particular value of \(M_s\)
\[ F_{\mathrm{HK}}^{S \geq M_s}[\rho]=F_{\mathrm{HK}}\left[\rho, Q^{M_s}[\rho]\right]\]
\(\rightarrow\) minimization leads to lowest state with \(S \geq M_s\)

Q: Summarize some important aspects of spin in Hohenberg-Kohn DFT!
A: Spin or the spin density are not needed in exact HK-DFT
The Hohenberg-Kohn functional \(F_{\text {HK }}\) can be generalized to include a dependence on the spin density \(Q(\bm{r})\)
\[F_{\mathrm{HK}}[\rho, Q]=\min _{\Psi_0 \rightarrow \rho, Q}\left\langle\Psi_0\left|\hat{T}+\hat{V}_{\text {ee }}\right| \Psi_0\right\rangle\]
Spin density can be determined by minimizing \(F_{\mathrm{HK}}[\rho, Q]\) w.r.t. \(Q(\bm{r})\)
Spin states in Hohenberg-Kohn DFT
- Targeting the lowest spin states with a specific value of \(S\) requires a spin-state dependent HK functional \(F_{\mathrm{HK}}^S[\rho]\)
- Enforcing specific value of \(M_s\) only allows for spin states \(S \geq M_s\)

Q: What can you say about the spin and spin density in (restricted) KS-DFT?
A: - By construction, the KS equations lead to the exact density \(\rho(\bm{r})\)
- KS wave function can always be chosen as an eigenfunction of \(\hat{S}^2\)
- but: it may simply be chosen as a singlet, i.e., \(\left\langle\hat{S}^2\right\rangle=0\) \(\Rightarrow\left\langle\hat{S}^2\right\rangle\) of the KS wave function and of the true system need not agree
- By construction, KS equations do not yield exact spin density!
- Spin density requires spin-resolved exchange-correlation functional
\[ E_{\mathrm{xc}}[\rho, Q]=F_{\mathrm{HK}}[\rho, Q]-T_s[\rho]-J[\rho]\]
\(\Rightarrow\) for ground-state \(\rho(\bm{r})\), minimize \(F_{\mathrm{HK}}[\rho, Q]\) with respect to \(Q(\bm{r})\) \[ \left.\frac{\delta E_{\mathrm{xc}}[\rho, Q]}{\delta Q(\bm{r})}\right|_{\rho,Q}=0 \quad \text { under the constraint } \quad \frac{1}{2} \int Q(\bm{r})=M_s\]

Q: How is the reference system defined for the unrestricted KS-DFT? What are the total density and spin density and the kinetic energy functional?
A: \[\hat{H}=\hat{T}_s+\hat{V}_s^\alpha+\hat{V}_s^\beta=\sum_{i=1}^N-\frac{\Delta_i}{2}+\sum_{i=1}^N\left[v_s^\alpha\left(\bm{r}_i\right) \alpha\left(s_i\right)+v_s^\beta\left(\bm{r}_i\right) \beta\left(s_i\right)\right]\]
\(\rightarrow\) choose potentials such that the total density and the spin density agree with the one of the true, interacting system. The unrestricted Slater determinant reads:
\[\Psi_s^{(u)}\left(\bm{x}_1, \ldots, \bm{x}_N\right)=\left|\phi_1^\alpha \alpha, \phi_1^\beta \beta, \phi_2^\alpha \alpha, \phi_2^\beta \beta, \ldots, \phi_N^\alpha \alpha\right|\]
The wavefunction is no eigenfunction of \(\hat{S}^2\) (`spin contamination')!
One-electron equations for orbitals, electron/spin density and kinetic energy functional:
\[\begin{aligned}\left[-\frac{\Delta}{2}+v_s^\alpha(\bm{r})\right] \phi_i^\alpha(\bm{r})&=\epsilon_i \phi_i^\alpha(\bm{r}) \quad\text { and } \\ \left[-\frac{\Delta}{2}+v_s^\beta(\bm{r})\right] \phi_i^\beta(\bm{r})&=\epsilon_i \phi_i^\beta(\bm{r})\end{aligned}\]
\[\begin{aligned} \rho(\bm{r}) =\sum_i|\phi_i^\alpha(\bm{r})|^2+\sum_i|\phi_i^\beta(\bm{r})|^2 \\ Q(\bm{r}) =\sum_i|\phi_i^\alpha(\bm{r})|^2-\sum_i|\phi_i^\beta(\bm{r})|^2 \end{aligned}\]
\[T_s^{(u)}[\rho, Q]=\min _{\Psi_s^{(u)} \rightarrow \rho, Q}\braket*{\hat{T}}{\Psi_s^{(u)}} \neq T_s[\rho]\]
Note that \(Q(\bm{r})\) can now also become negative (in contrast to restricted KS-DFT)!

Q: How is the exchange-correlation functional defined in unrestricted KS-DFT?
A: Decomposition of the Hohenberg-Kohn functional
\[F_{\mathrm{HK}}[\rho, Q]=T_s^{(u)}[\rho, Q]+J[\rho]+E_{\mathrm{xc}}^{(u)}[\rho, Q]\]
\(\Rightarrow\) definition of \(E_{\mathrm{xc}}\) is different in the unrestricted case because the kinetic energy functional has changed!
Exchange-correlation energy functional
\[\begin{aligned} E_{\mathrm{xc}}[\rho, Q]=F_{\mathrm{HK}}[\rho, Q]-T_s[\rho]-J[\rho] \\ E_{\mathrm{xc}}^{(u)}[\rho, Q]=F_{\mathrm{HK}}[\rho, Q]-T_s^{(u)}[\rho, Q]-J[\rho] \end{aligned}\]
\[\begin{aligned} E_{\mathrm{xc}}^{(u)}[\rho, Q]&=E_{\mathrm{xc}}[\rho, Q]+\left(T_s[\rho]-T_s^{(u)}[\rho, Q]\right) \\ & =E_{\mathrm{xc}}[\rho, Q]+T_u[\rho, Q] \end{aligned}\]
Fractional spins
\[\begin{aligned} & F_{\mathrm{HK}}\left[\rho, \alpha Q^{M_s=S}[\rho]\right]=\mathrm{const} \\ & \text { for } \quad -1 \leq \alpha \leq+1 \end{aligned}\]
\[\begin{aligned} & \Rightarrow E_{\mathrm{xc}}\left[\rho, \alpha Q^{M_s=S}[\rho]\right]=\mathrm{const} \\ & \Rightarrow\quad E_{\mathrm{xc}}^{(u)}\left[\rho, \alpha Q^{M_s=S}[\rho]\right] - T_u\left[\rho, \alpha Q^{M_s=S}[\rho]\right]=\mathrm{const} \end{aligned}\]
\(\Rightarrow\) in unrestricted spin-DFT, the fractional spin constancy condition does no longer hold for the exchange-correlation energy \(E_{\mathrm{xc}}^{(u)}[\rho, Q]\)

Q: Write down the KS equations and the exchange-correlation potential for the unrestricted KS-DFT!
A: Kohn-Sham equations
\[\begin{aligned} & {\left[-\frac{\Delta}{2}+v_{\text {nuc }}(\bm{r})+v_{\text {Coul }}[\rho](\bm{r})+v_{\text {xc }}^\alpha[\rho, Q](\bm{r})\right] \phi_i^\alpha(\bm{r})=\epsilon_i^\alpha \phi_i^\alpha(\bm{r})} \\ & {\left[-\frac{\Delta}{2}+v_{\text {nuc }}(\bm{r})+v_{\text {Coul }}[\rho](\bm{r})+v_{\text {xc }}^\beta[\rho, Q](\bm{r})\right] \phi_i^\beta(\bm{r})=\epsilon_i^\beta \phi_i^\beta(\bm{r})} \end{aligned}\]
Exchange-correlation potential
\[\begin{aligned} v_{\mathrm{xc}}^\alpha[\rho, Q](\bm{r})&=\frac{\delta E_{\mathrm{xc}}^{(u)}[\rho, Q]}{\delta \rho_\alpha(\bm{r})} \\ & \text { and } \\ v_{\mathrm{xc}}^\beta[\rho, Q](\bm{r})&=\frac{\delta E_{\mathrm{xc}}^{(u)}[\rho, Q]}{\delta \rho_\beta(\bm{r})} \\ v_{\mathrm{xc}, \mathrm{tot}}^{(u)}[\rho, Q](\bm{r})&=v_{\mathrm{xc}}^\alpha[\rho, Q](\bm{r})+v_{\mathrm{xc}}^\beta[\rho, Q](\bm{r}) \\&=\frac{\delta E_{\mathrm{xc}}^{(u)}[\rho, Q]}{\delta \rho(\bm{r})} \\ v_{\mathrm{xc}, \mathrm{spin}}^{(u)}[\rho, Q](\bm{r}) &=v_{\mathrm{xc}}^\alpha[\rho, Q](\bm{r})-v_{\mathrm{xc}}^\beta[\rho, Q](\bm{r})\\ &=\frac{\delta E_{\mathrm{xc}}^{(u)}[\rho, Q]}{\delta Q(\bm{r})} \end{aligned}\]

Q: Compare the exchange-correlation potential of the restricted and unrestricted Spin-DFT!
A: Restricted Spin-DFT
\[v_{\mathrm{xc}}[\rho](\bm{r})=\frac{\delta E_{\mathrm{xc}}[\rho, Q]}{\delta \rho(\bm{r})}\]
Unrestricted Spin-DFT
\[\begin{aligned}v_{\mathrm{xc}, \text {spin }}^{(u)}[\rho, Q](\bm{r}) &=\frac{\delta E_{\mathrm{xc}}^{(u)}[\rho, Q]}{\delta Q(\bm{r})} \\ &=\frac{\delta E_{\mathrm{xc}}[\rho, Q]}{\delta Q(\bm{r})}-\frac{\delta T_s^{(u)}[\rho, Q]}{\delta Q(\bm{r})}\end{aligned}\]
The `Spin potential' ensures that the correct spin density is obtained.
\[\begin{aligned} v_{\text {xc,tot }}^{(u)}[\rho, Q](\bm{r}) & =\frac{\delta E_{\mathrm{xc}}^{(u)}[\rho, Q]}{\delta \rho(\bm{r})} \\ &=\frac{\delta E_{\mathrm{xc}}[\rho, Q]}{\delta \rho(\bm{r})}+\frac{\delta T_u[\rho, Q]}{\delta \rho(\bm{r})} \\ & =v_{\mathrm{xc}}[\rho](\bm{r})+v_u[\rho, Q](\bm{r}) \end{aligned}\]
The correction term \(v_u[\rho, Q]\) keeps total density constant \(\rightarrow\) Unrestricted xc potential changes when scaling \(Q\) (fractional spins)

Q: Summarize some important asepects of spin in restricted and unrestricted KS-DFT!
A: - Both, restricted and unrestricted, KS-DFT formulations are possible
Restricted KS-DFT
- KS reference system: correct total density, but wrong spin density
- \(\rightarrow\) spin density has to be determined in a separate step
- KS wave function can be chosen as eigenfunction of \(\hat{S}^2\)
- Exact \(E_{\mathrm{xc}}[\rho, Q]\) fulfills fractional spin constancy condition
Unrestricted KS-DFT
- KS reference system: correct total density and spin density
- KS wave function is no eigenfunction of \(\hat{S}^2\) (i.e., ``spin contaminated'' by construction)
- Exact \(E_{\mathrm{xc}}^{(u)}[\rho, Q]\) does not fulfill fractional spin constancy condition

Q: How is the relativistic total energy functional and the exchange correlation functional defined for the four-component DFT?
A: \[\left[c \bm{\alpha} \cdot\left(\bm{p}-\frac{q_e}{c} \bm{A}_{\mathrm{eff}}(\bm{r})\right)+\beta m_e c^2+q_e \phi_{\mathrm{eff}}(\bm{r})\right] \psi_i(\bm{r})=\epsilon_i \psi_i(\bm{r})\]
\[\begin{aligned} & \phi_{\mathrm{eff}}(\bm{r})=\phi_{\mathrm{ext}}(\bm{r})+\frac{q_e}{c} \int \mathrm{d}^3 r^{\prime} \frac{j^0\left(\bm{r}^{\prime}\right)}{\left|\bm{r}-\bm{r}^{\prime}\right|}+\frac{c}{q_e} \frac{\delta E_{\mathrm{XC}}\left[j^\mu\right]}{\delta j^0(\bm{r})} \\ & \bm{A}_{\mathrm{eff}}(\bm{r})=\bm{A}_{\mathrm{ext}}(\bm{r})+\frac{q_e}{c} \int \mathrm{d}^3 r^{\prime} \frac{\bm{j}\left(\bm{r}^{\prime}\right)}{\left|\bm{r}-\bm{r}^{\prime}\right|}+\frac{c}{q_e} \frac{\delta E_{\mathrm{XC}}\left[j^\mu\right]}{\delta \bm{j}(\bm{r})} \end{aligned}\]
with the functional derivatives defined as
\[E_{\mathrm{XC}}\left[j^\mu+\delta j^\mu\right]=E_{\mathrm{XC}}\left[j^\mu\right]+\int \mathrm{d}^3 r \frac{\delta E_{\mathrm{XC}}\left[j^\mu\right]}{\delta j^\mu} \delta j^\mu+O\left(\left(\delta j^\mu\right)^2\right)\]
(The notation \(\delta E_{\mathrm{XC}}\left[j^\mu\right] / \delta j(r)\) is a composite representation for the three (spatial) components \(\mu=1,2,3\).)
There is no spin at all visible in these equations!
Born-Oppenheimer approximation: With all external sources at rest, the external scalar potential \(\phi_{\text {ext }}(\bm{r})\) is (up to a constant) uniquely determined by the electron density \(\rho(\bm{r})\) alone!
Within such a framework, the relativistic total energy functional becomes
\[E_\mathrm{el}[\rho]=T_s\left[j^\mu[\rho]\right]+V_{\text {nuc }}[\rho]+J\left[j^\mu[\rho]\right]+E_{\mathrm{XC}}\left[j^\mu[\rho]\right]\]
The current density \(\bm{j}(\bm{r})\) is still required, but it is now uniquely determined by the electron density, \(\bm{j}=\bm{j}[\rho]\).

Q: How can one make the relation to the spin density explicit in relativistic DFT?
A: The relation to the spin density can be made explicit by invoking a Gordon decomposition (derived in the exercise!) of the current density to produce expressions for charge- and spin-related currents
\[\begin{aligned} \bm{j}\left(\bm{r}_1\right) & =N \frac{1}{2 m_e} \int\left[\Psi^{\dagger}\left(\bm{r}_1, \bm{r}_2, \ldots, \bm{r}_N\right) \beta_1\left(\bm{p}_1-\frac{q_e}{c} \bm{A}\left(\bm{r}_1\right)\right) \Psi\left(\bm{r}_1, \bm{r}_2, \ldots, \bm{r}_N\right)\right. \\ & \left.+\left(\bm{p}_1^{\star}-\frac{q_e}{c} \bm{A}\left(\bm{r}_1\right)\right) \Psi^{\dagger}\left(\bm{r}_1, \bm{r}_2, \ldots, \bm{r}_N\right) \beta_1 \Psi\left(\bm{r}_1, \bm{r}_2, \ldots, \bm{r}_N\right)\right] \mathrm{d}^3 r_2 \cdots \mathrm{d}^3 r_N \\ & +N \frac{\hbar}{2 m_e} \nabla_1 \times \int \Psi^{\dagger}\left(\bm{r}_1, \bm{r}_2, \ldots, \bm{r}_N\right) \beta_1 \bm{\Sigma}_1 \Psi\left(\bm{r}_1, \bm{r}_2, \ldots, \bm{r}_N\right) \mathrm{d}^3 r_2 \cdots \mathrm{d}^3 r \end{aligned}\]
where
\[\bm{\Sigma}_1=\left(\sigma_{x, 1} \mathbf{1}_2, \sigma_{y, 1} \mathbf{1}_2, \sigma_{z, 1} \mathbf{1}_2\right)^T\]

Q: What does the last term of the decomposed electron density remind you of?
A: The last term collects the electron-spin-dependent terms which suggests the definition of the magnetization,
\[\bm{m}\left(\bm{r}_1\right)=N \int \Psi^{\dagger}\left(\bm{r}_1, \bm{r}_2, \ldots, \bm{r}_N\right) \beta_1 \bm{\Sigma}_1 \Psi\left(\bm{r}_1, \bm{r}_2, \ldots, \bm{r}_N\right) \mathrm{d}^3 r_2 \cdots \mathrm{d}^3 r_N\]
Thus the last term contributes
\[V_{\mathrm{ext}}^{\mathrm{spin}}\left[j^\mu\right]=\frac{q_e \hbar}{2 m_e c} \int(\nabla \times \bm{m}(\bm{r})) \cdot \bm{A}_{\mathrm{ext}}(\bm{r}) \mathrm{d}^3 r=-\mu_B \int \bm{m}(\bm{r}) \cdot \bm{B}_{\mathrm{ext}}(\bm{r}) \mathrm{d}^3 r\]
where \(\bm{B}_{\mathrm{ext}}=\nabla \times \bm{A}_{\text {ext }}\) is the external magnetic field. This expression closely resembles the form of the spin Zeeman interaction,
\[H_Z=\sum_{i=1}^N \bm{B}_{\mathrm{ext}}\left(\bm{r}_i\right) \cdot \bm{\mu}_{s, i}=-\mu_B \sum_{i=1}^N \bm{B}_{\mathrm{ext}}\left(\bm{r}_i\right) \cdot \bm{\sigma}_i\]
with the Zeeman operator \(H_Z\).
It describes the contribution of the electrons' spin magnetic moments \(\bm{\mu}_s\) to the interaction of a molecule with an inhomogenous external magnetic field \(\bm{B}_{\text {ext }}(\bm{r})\).

Q: How does \(V_{\mathrm{ext}}^{\mathrm{spin}}\left[j^\mu\right]\) change upon turning on an inhomogeneous magnetic field in \(z\)-direction?
A: For an inhomogeneous magnetic field in \(z\)-direction, \(\bm{B}_{\text {ext }}(\bm{r})=\left(0,0, B_z(\bm{r})\right)^T\), the expectation value of the spin Zeeman interaction can be evaluated directly from the spin density \(Q(\bm{r})=\rho_\alpha(\bm{r})-\rho_\beta(\bm{r})\) as
\[\left\langle H_Z\right\rangle=-\mu_B \int Q(\bm{r}) B_z(\bm{r}) \mathrm{d}^3 r\]
For such an inhomogeneous magnetic field in \(z\)-direction one can rewrite the potential as
\[V_{\mathrm{ext}}^{\mathrm{spin}}\left[j^\mu\right]=-\mu_B \int m_z(\bm{r}) B_z(\bm{r}) \mathrm{d}^3 r\]

Q: What is relativistic density-only KS-DFT?
A: It is possible to develop a relativistic density-only (`\(d\)') KS-DFT - which will resemble the nonrelativistic spin-restricted KS-DFT formalism - by requiring that the noninteracting reference system possesses only the same density as the interacting system. Then, the total (relativistic) energy functional can be decomposed as,
\[E_\mathrm{el}[\rho]=T_s^{(d)}[\rho]+V_\mathrm{nuc}[\rho]+J[\rho]+E_{\text {XC }}^{(d)}[\rho]\]
where we have neglected all magnetic interactions.
Such a restriction clearly implies a different constrained search in the functional for the kinetic energy, but also a different definition of the exchange-correlation energy.
The resulting \(\mathrm{KS}\) equations then feature a one-component exchange-correlation potential
\[v_\mathrm{xc}^{(d)}=\frac{\delta E_{\mathrm{XC}}^{(d)}[\rho]}{\delta \rho(\bm{r})}\]
It is important to realize that in this density-only formalism the current density \(\bm{j}_s(\bm{r})\) and the magnetization \(\bm{m}_s(\bm{r})\) of the noninteracting reference system do not agree with those of the true interacting system.
Instead, they are again a functional of the density only, just as the spin density is in nonrelativistic restricted KS-DFT.
In between full current-density functional theory and relativistic density-only KS-DFT, different intermediate formulations of relativistic KS-DFT are possible.

Q: Is spin a good quantum number in four-component DFT? What is the collinear and noncollinear approach?
A: In four-component DFT, spin is no longer a good quantum number because of spin-orbit coupling.
If we restrict a relativistic spin-DFT framework to the \(z\)-component of the magnetization, this will imply a fixed external quantization axis for the spin.
It became common to express this fact in the language of solid state physics as \textit{collinear}, which denotes the existence of a global quantization axis to align all electron spins.
However, a spin-operator-dependent Hamiltonian like any of the above mentioned four-component KS Hamiltonians does not commute with spin operators, suggesting that the \textit{collinear} approach should not be applied.
Instead, in a \textit{noncollinear} approach one may define a vectorial spin-dependent density expression whose direction changes with position in space.
Hence, different choices for this spin-dependent density expression are possible and define different KS-DFT schemes.
These different choices for the noninteracting reference system imply different definitions of the noninteracting kinetic energy functionals, \(T_s^{(c o l)}\left[\rho, m_z\right]\) and \(T_s^{(n o n c)}[\rho,|\bm{m}|]\), and therefore also of the exchange-correlation energies, \(E_{\text {XC }}^{(c o l)}\left[\rho, m_z\right]\) and \(E_{\text {XC }}^{(\text {nonc })}[\rho,|\bm{m}|]\).

Q: How can one calculate the magnetization for a relativistic system of noninteracting electrons, whose wave function is exactly described by a single Slater determinant?
A: For a relativistic system of noninteracting electrons, whose wave function is exactly described by a single Slater determinant, the magnetization is given by
\[\begin{aligned} \bm{m}(\bm{r})=\sum_{i=1}^N \psi_i^{\dagger}(\bm{r}) \beta \bm{\Sigma} \psi_i(\bm{r}) \\ \Rightarrow m_z(\bm{r})=\sum_{i=1}^N \psi_i^{\dagger}(\bm{r}) \beta \Sigma_z \psi_i(\bm{r}) \end{aligned}\]
Here, the \(\psi_i(\bm{r})\) are the 4-spinors of
\[\left[c \bm{\alpha} \cdot\left(\bm{p}-\frac{q_e}{c} \bm{A}_{\mathrm{eff}}(\bm{r})\right)+\beta m_e c^2+q_e \phi_{\mathrm{eff}}(\bm{r})\right] \psi_i(\bm{r})=\epsilon_i \psi_i(\bm{r})\]
The noninteracting reference system can then be set up such that, in addition to the electron density, some parts of the magnetization agree with those of the fully interacting system.

Q: How can the nonrelativistic spin density be calculated for the collinear approach?
A: Since SOC is not present in the nonrelativistic limit and the SOC-free Hamiltonian commutes with the spin operators, the KS spinors can be constructed from spatial 2-spinors \(\varphi_i^\sigma\) tensorially multiplied with spin eigenfunctions \(\sigma\) such that four-component spin orbitals \(\psi_{i, \alpha}=\varphi_i^\alpha \otimes \alpha\) and \(\psi_{i, \beta}=\varphi_i^\beta \otimes \beta\) are obtained.
Then, the SOC free (SOfree) \(z\)-component of the magnetization resembles the nonrelativistic spin density,
\[\begin{aligned} m_z^{\text {SOfree }}(\bm{r}) & =\sum_{i, \sigma}^N \psi_{i, \sigma}^{\dagger}(\bm{r}) \beta \Sigma_z \psi_{i, \sigma}(\bm{r}) \\ &=\sum_{i=1}^{N_\alpha} \varphi_i^{\alpha, \dagger}(\bm{r}) \sigma_z \varphi_i^\alpha(\bm{r})-\sum_{i=1}^{N_\beta} \varphi_i^{\beta, \dagger}(\bm{r}) \sigma_z \varphi_i^\beta(\bm{r}) \\ & =\sum_{i=1}^{N_\alpha}\left[\left|\varphi_i^{\alpha,(L)}(\bm{r})\right|^2-\left|\varphi_i^{\alpha,(S)}(\bm{r})\right|^2\right] \\ &- \sum_{i=1}^{N_\beta}\left[\left|\varphi_i^{\beta,(L)}(\bm{r})\right|^2-\left|\varphi_i^{\beta,(S)}(\bm{r})\right|^2\right] \end{aligned}\]
where \(N=N_\alpha+N_\beta\).
The neglect of spin-orbit coupling is, of course, an approximation that yields a scalar-relativistic Hamiltonian (which considers kinematic relativistic effects only) or even a nonrelativistic Hamiltonian if the speed of light is taken to be infinity.
Taking the limit \(c \rightarrow \infty\) yields the nonrelativistic theory and relativistic spin-DFT reduces to nonrelativistic unrestricted KS-DFT, so that the spin density \(Q(\bm{r})\) is obtained
\[m_z^{\text {scalarrel. }}(\bm{r})=\sum_{i=1}^{N_\alpha}\left|\tilde{\varphi}_i^{\alpha,(L)}(\bm{r})\right|^2-\sum_{i=1}^{N_\beta}\left|\tilde{\varphi}_i^{\beta,(L)}(\bm{r})\right|^2=Q(\bm{r})\]