Ionic potentials, which are spherically symmteric, suggest to treat each angular momentum $l,m$ separately leading to $l$-dependent non-local (NL) model potentials $V_l(r)$ and a total potential
\begin{equation}
-V=\sum_{l,m}\ket{lm}V_l(r)\bra{lm} \text{ .}
+V=\sum_{l,m}\ket{lm}V_l(\vec{r})\bra{lm} \text{ .}
\end{equation}
In fact, applied to a function, the potential turns out to be non-local in the angular coordinates but local in the radial variable, which suggests to call it asemilocal (SL) potential.
A local potential can always be separated from the potential \ldots
\begin{equation}
-V=\ldots=V_{\text{local}}(r)+\ldots
+V=\ldots=V_{\text{local}}(\vec{r})+\ldots
\end{equation}
\subsubsection{Norm conserving pseudopotentials}
This is advantageous since \ldots
With the solutions of the all-electron Dirac equations, the new pseudopotential reads
\begin{equation}
-V(r)=\sum_{l,m}\left[
-\ket{l+\frac{1}{2},m+{\frac{1}{2}}}V_{l,l+\frac{1}{2}}(r)
+V(\vec{r})=\sum_{l,m}\left[
+\ket{l+\frac{1}{2},m+{\frac{1}{2}}}V_{l,l+\frac{1}{2}}(\vec{r})
\bra{l+\frac{1}{2},m+{\frac{1}{2}}} +
-\ket{l-\frac{1}{2},m-{\frac{1}{2}}}V_{l,l-\frac{1}{2}}(r)
+\ket{l-\frac{1}{2},m-{\frac{1}{2}}}V_{l,l-\frac{1}{2}}(\vec{r})
\bra{l-\frac{1}{2},m-{\frac{1}{2}}}
\right] \text{ .}
\end{equation}
By defining an averaged potential weighted by the different $j$ degeneracies of the $\ket{l\pm\frac{1}{2}}$ states
\begin{equation}
\bar{V}_l(r)=\frac{1}{2l+1}\left(
-l V_{l,l-\frac{1}{2}}(r)+(l+1)V_{l,l+\frac{1}{2}}(r)\right)
+l V_{l,l-\frac{1}{2}}(\vec{r})+(l+1)V_{l,l+\frac{1}{2}}(\vec{r})\right)
\end{equation}
and a potential describing the difference in the potential with respect to the spin
\begin{equation}
-V^{\text{SO}}_l(r)=\frac{2}{2l+1}\left(
-V_{l,l+\frac{1}{2}}(r)-V_{l,l-\frac{1}{2}}(r)\right)
+V^{\text{SO}}_l(\vec{r})=\frac{2}{2l+1}\left(
+V_{l,l+\frac{1}{2}}(\vec{r})-V_{l,l-\frac{1}{2}}(\vec{r})\right)
\end{equation}
the total potential can be expressed as
\begin{equation}
-V(r)=\sum_l \ket{l}\left[\bar{V}_l(r)+V^{\text{SO}}_l(r)LS\right]\bra{l}
+V(\vec{r})=\sum_l
+\ket{l}\left[\bar{V}_l(\vec{r})+V^{\text{SO}}_l(\vec{r})LS\right]\bra{l}
\text{ ,}
\end{equation}
where the first term correpsonds to the mass velocity and Darwin relativistic corrections and the latter is associated with the spin-orbit (SO) coupling.
-\subsubsection{Excursus: real space representation suitable for an iterative treatment}
+\subsubsection{Excursus: Real space representation within an iterative treatment}
In the following, the spin-orbit part is evaluated in real space.
Since spin is treated in another subspace, it can be treated separately.
-The matrix elements of the orbital angular momentum part of the potential in KB form for orbital angular momentum $l$ read
+The matrix elements of the orbital angular momentum part of the potential in KB form read
\begin{equation}
-\bra{r'}(r\times p)\ket{\chi_{lm}}E^{\text{SO,KB}}_l\braket{\chi_{lm}}{r''}
+\sum_{lm}
+\bra{\vec{r}'}(r\times p)\ket{\chi_{lm}}E^{\text{SO,KB}}_l
+\braket{\chi_{lm}}{\vec{r}''}
\text{ .}
\end{equation}
With
\begin{eqnarray}
-\bra{r'}p\ket{\chi_{lm}} & = & -i\hbar\nabla_{r'} \braket{r'}{\chi_{lm}}
-=-i\hbar\nabla_{r'}\,\chi_{lm}(r') \\
-r\ket{r'} & = & r'\ket{r'}
+\bra{\vec{r}'}r\ket{\chi_{lm}} & = & \vec{r}'\braket{\vec{r}'}{\chi_{lm}}\\
+\bra{\vec{r}'}p\ket{\chi_{lm}} & = & -i\hbar\nabla_{\vec{r}'}
+\braket{\vec{r}'}{\chi_{lm}}
\end{eqnarray}
we get
\begin{equation}
--i\hbar(r'\times \nabla_{r'})\braket{r'}{\chi_{lm}}E^{\text{SO,KB}}_l
-\braket{\chi_{lm}}{r''}
+-i\hbar\sum_{lm}(\vec{r}'\times \nabla_{\vec{r}'})\braket{\vec{r}'}{\chi_{lm}}
+E^{\text{SO,KB}}_l\braket{\chi_{lm}}{\vec{r}''}
\text{ .}
+\label{eq:solid:so_me}
\end{equation}
To further evaluate this expression, the KB projectors
\begin{equation}
-\chi_{lm}=\frac{\ket{\delta V_l^{\text{SO}}\Phi_{lm}}}
+\ket{\chi_{lm}}=\frac{\ket{\delta V_l^{\text{SO}}\Phi_{lm}}}
{\braket{\delta V_l^{\text{SO}}\Phi_{lm}}
{\Phi_{lm}\delta V_l^{\text{SO}}}^{1/2}}
\end{equation}
-must be known in real space (with respect to $r$).
+must be known in real space (with respect to $\vec{r}'$).
\begin{equation}
-\braket{r'}{\chi_{lm}}=
-\frac{\braket{r'}{\delta V_l^{\text{SO}}\Phi_{lm}}}{
+\braket{\vec{r}'}{\chi_{lm}}=
+\frac{\braket{\vec{r}'}{\delta V_l^{\text{SO}}\Phi_{lm}}}{
\braket{\delta V_l^{\text{SO}}\Phi_{lm}}{\Phi_{lm}\delta V_l^{\text{SO}}}
^{1/2}}
\end{equation}
and
\begin{equation}
-\braket{r'}{\delta V_l^{\text{SO}}\Phi_{lm}}=
-\delta V_l^{\text{SO}}(r')\frac{u_l(r')}{r'}Y_{lm}(\Omega_{r'})
+\braket{\vec{r}'}{\delta V_l^{\text{SO}}\Phi_{lm}}=
+\delta V_l^{\text{SO}}(r')\frac{u_l(r')}{r'}Y_{lm}(\Omega_{\vec{r}'})
\text{ .}
+\label{eq:solid:so_r1}
\end{equation}
In this expression, only the spherical harmonics are complex functions.
-Thus, the complex conjugate with respect to $r''$ is given by
+Thus, the complex conjugate with respect to $\vec{r}''$ is given by
\begin{equation}
-\braket{\Phi_{lm}\delta V_l^{\text{SO}}}{r''}=
-\delta V_l^{\text{SO}}(r'')\frac{u_l(r'')}{r''}Y^*_{lm}(\Omega_{r''})
+\braket{\Phi_{lm}\delta V_l^{\text{SO}}}{\vec{r}''}=
+\delta V_l^{\text{SO}}(r'')\frac{u_l(r'')}{r''}Y^*_{lm}(\Omega_{\vec{r}''})
\text{ .}
+\label{eq:solid:so_r2}
\end{equation}
Using the orthonormality property
\begin{equation}
\int Y^*_{l'm'}(\Omega_r)Y_{lm}(\Omega_r) d\Omega_r = \delta_{ll'}\delta_{mm'}
\label{eq:solid:y_ortho}
\end{equation}
-of the spherical harmonics, the norm of the $\chi_{lm}$ reduces to
+of the spherical harmonics, the squared norm of the $\chi_{lm}$ reduces to
\begin{eqnarray}
\braket{\delta V_l^{\text{SO}}\Phi_{lm}}{\Phi_{lm}\delta V_l^{\text{SO}}} &=&
\int \braket{\delta V_l^{\text{SO}}\Phi_{lm}}{\vec{r}'}
-\braket{\vec{r}'}{\Phi_{lm}\delta V_l^{\text{SO}}} d\vec{r'}'\\
+\braket{\vec{r}'}{\Phi_{lm}\delta V_l^{\text{SO}}} d\vec{r}'\\
&=&\int
-{\delta V_l^{\text{SO}}}^2(r')\frac{u_l^2(r')}{r'^2}Y^*_{lm}(\Omega_{r'})
-Y_{lm}(\Omega_{r'})
-r'^2 dr' d\Omega_{r'} \\
+{\delta V_l^{\text{SO}}}^2(r')\frac{u_l^2(r')}{r'^2}Y^*_{lm}(\Omega_{\vec{r}'})
+Y_{lm}(\Omega_{\vec{r}'})
+r'^2 dr' d\Omega_{\vec{r}'} \\
&=&\int_{r'}
{\delta V_l^{\text{SO}}}^2(r') u_l^2(r') dr'
-\int_{\Omega_{r'}}Y^*_{lm}(\Omega_{r'})Y_{lm}(\Omega_{r'}) d\Omega_{r'}\\
-&=&\int_{r'}{\delta V_l^{\text{SO}}}^2(r') u_l^2(r') dr' \text{ .}
+\int_{\Omega_{\vec{r}'}}Y^*_{lm}(\Omega_{\vec{r}'})Y_{lm}(\Omega_{\vec{r}'}) d\Omega_{\vec{r}'}\\
+&=&\int_{r'}{\delta V_l^{\text{SO}}}^2(r') u_l^2(r') dr' \text{ .}\\
+&=&\braket{\delta V_l^{\text{SO}}u_l}{u_l\delta V_l^{\text{SO}}}
+\end{eqnarray}
+To obtain a final expression for the matrix elements \eqref{eq:solid:so_me}, the sum of the products of \eqref{eq:solid:so_r1} and \eqref{eq:solid:so_r2} must be further evaluated.
+\begin{eqnarray}
+\sum_{lm}
+\braket{\vec{r}'}{\delta V_l^{\text{SO}}\Phi_{lm}}
+\braket{\Phi_{lm}\delta V_l^{\text{SO}}}{\vec{r}''}&=&\sum_{lm}
+\delta V_l^{\text{SO}}(r')\frac{u_l(r')}{r'}Y_{lm}(\Omega_{\vec{r}'})
+\delta V_l^{\text{SO}}(r'')\frac{u_l(r'')}{r''}Y^*_{lm}(\Omega_{\vec{r}''})\nonumber\\
+&=&\sum_l
+\delta V_l^{\text{SO}}(r')\frac{u_l(r')}{r'}
+\delta V_l^{\text{SO}}(r'')\frac{u_l(r'')}{r''}\sum_m
+Y^*_{lm}(\Omega_{\vec{r}''})Y_{lm}(\Omega_{\vec{r}'})\nonumber\\
+&=&\sum_l
+\delta V_l^{\text{SO}}(r')\frac{u_l(r')}{r'}
+\delta V_l^{\text{SO}}(r'')\frac{u_l(r'')}{r''}
+P_l\left(\frac{\vec{r}'\vec{r}''}{r'r''}\right)\frac{2l+1}{4\pi}\nonumber\\
+\end{eqnarray}
+due to the vector addition theorem
+\begin{equation}
+P_l\left(\frac{\vec{r}'\vec{r}''}{r'r''}\right)=
+\frac{4\pi}{2l+1}\sum_mY^*_{lm}(\Omega_{\vec{r}''})Y_{lm}(\Omega_{\vec{r}'})
+\text{ .}
+\end{equation}
+In total, the matrix elements of the SO potential can be calculated by
+\begin{eqnarray}
+&&-i\hbar\sum_{lm}(\vec{r}'\times \nabla_{\vec{r}'})\braket{\vec{r}'}{\chi_{lm}}
+E^{\text{SO,KB}}_l\braket{\chi_{lm}}{\vec{r}''}=\nonumber\\
+&=&-i\hbar\sum_l(\vec{r}'\times \nabla_{\vec{r}'})
+\delta V_l^{\text{SO}}(r')\frac{u_l(r')}{r'}
+P_l\left(\frac{\vec{r}'\vec{r}''}{r'r''}\right)\cdot
+\frac{E^{\text{SO,KB}}_l\delta V_l^{\text{SO}}(r'')\frac{u_l(r'')}{r''}}
+ {\int_{r}{\delta V_l^{\text{SO}}}^2(r) u_l^2(r) dr} \cdot
+\frac{2l+1}{4\pi}\nonumber\\
+&=&
+-i\hbar\sum_l
+\delta V_l^{\text{SO}}(r')\frac{u_l(r')}{r'}
+P'_l\left(\frac{\vec{r}'\vec{r}''}{r'r''}\right)\cdot
+\left(\frac{\vec{r}'\times\vec{r}''}{r'r''}\right)\cdot
+\frac{E^{\text{SO,KB}}_l\delta V_l^{\text{SO}}(r'')\frac{u_l(r'')}{r''}}
+ {\int_{r}{\delta V_l^{\text{SO}}}^2(r) u_l^2(r) dr} \,
+\frac{2l+1}{4\pi}\text{ ,}\nonumber\\
+\label{eq:solid:so_fin}
+\end{eqnarray}
+since derivatives of functions that depend on the absolute value of $\vec{r}'$ do not contribute due to the cross product as is illustrated below (equations \eqref{eq:solid:rxp1} and \eqref{eq:solid:rxp2}).
+\begin{eqnarray}
+\left(\vec{r}\times\nabla_{\vec{r}}\right)f(r)&=&
+\left(\begin{array}{l}
+r_y\frac{\partial}{\partial r_z}f(r)-r_z\frac{\partial}{\partial r_y}f(r)\\
+r_z\frac{\partial}{\partial r_x}f(r)-r_x\frac{\partial}{\partial r_z}f(r)\\
+r_x\frac{\partial}{\partial r_y}f(r)-r_y\frac{\partial}{\partial r_x}f(r)
+\end{array}\right)
+\label{eq:solid:rxp1}
+\end{eqnarray}
+\begin{eqnarray}
+r_i\frac{\partial}{\partial r_j}f(r)-r_j\frac{\partial}{\partial r_i}f(r)&=&
+r_if'(r)\frac{\partial}{\partial r_j}(r_x^2+r_y^2+r_z^2)^{1/2}-
+r_jf'(r)\frac{\partial}{\partial r_i}(r_x^2+r_y^2+r_z^2)^{1/2}\nonumber\\
+&=&
+r_if'(r)\frac{1}{2r}2r_j-r_jf'(r)\frac{1}{2r}2r_i=0
+\label{eq:solid:rxp2}
\end{eqnarray}
-Finally, to evaluate $V^{\text{SO}}_l\ket{\Psi}$, the integral \ldots
+If these projectors are considered to be centered around atom positions $\vec{\tau}_{\alpha n}$ of atoms $n$ of species $\alpha$, the variable $\vec{r}'$ in the previous equations is changed to $\vec{r}'_{\alpha n}=\vec{r}'-\vec{\tau}_{\alpha n}$, which implies
+\begin{eqnarray}
+r'&\rightarrow&r_{\alpha n}=|\vec{r}'-\vec{\tau}_{\alpha n}|\\
+\Omega_{\vec{r}'}&\rightarrow&\Omega_{\vec{r'}-\vec{\tau}_{\alpha n}}\\
+\delta V_l(r')&\rightarrow&\delta V_l(|\vec{r}'-\vec{\tau}_{\alpha n}|)\\
+u_l(r')&\rightarrow&u_l(|\vec{r}'-\vec{\tau}_{\alpha n}|)\\
+Y_{lm}(\Omega_{\vec{r}'})&\rightarrow&
+Y_{lm}(\Omega_{\vec{r}'-\vec{\tau}_{\alpha n}})
+\text{ .}
+\end{eqnarray}
+Within an iterative treatment on a real space grid consisting of $n_{\text{g}}$ grid points, the sum
\begin{equation}
+\sum_{\vec{r}''_{\alpha n}}
+\sum_{lm}-i\hbar(\vec{r}'_{\alpha n}\times \nabla_{\vec{r}'_{\alpha n}})
+\braket{\vec{r}'_{\alpha n}}{\chi^{\text{SO}}_{lm}}
+E^{\text{SO,KB}}_l\braket{\chi^{\text{SO}}_{lm}}{\vec{r}''_{\alpha n}}
+\braket{\vec{r}''_{\alpha n}}{\Psi}
+\qquad\forall\,\bra{\vec{r}'_{\alpha n}}
\end{equation}
+to obtain all elements $\bra{\vec{r}'_{\alpha n}}$, involves $n_{\text{g}}^2$ evaluations of equation~\eqref{eq:solid:so_fin} for eeach atom, if the projectors are short-ranged, i.e.\ $\delta V_l=0$ outside a certain cut-off radius.
+Thus, this method scales linearly with the number of atoms.
+
+The $E_l^{\text{SO,KB}}$ are given by
+\begin{equation}
+E_l^{\text{SO,KB}}=
+\frac{\braket{\delta V_lu_l}{u_l\delta V_l}}
+ {\bra{u_l}\delta V_l\ket{u_l}}=
+\frac{\int_{r}\delta V^2_l(r)u^2_l(r)}r^2dr
+ {\int_{r'}\int_{r''}\braket{u_l}{r'}\bra{r'}\delta V_l
+\ket{r''}\braket{r''}{u_l}}=
+\end{equation}
+