LibXC library
LibXC project combines all available exchange-correlation potentials, and many big DFT codes use this package. The package has interfaces to Fortran, C++, and Python. You can upgrade your DFT code by installing this package and connect to your code in order to use other XC potentials. To see available potentials look at the list and find the potential (LDA_C_PZ) what you used in this course.
Scalar relativistic ZORA
The radial Kohn-Sham (KS) equation for the H-like atom in non-relativistic case has a form:
- $$\left( { - {1 \over 2}{{{d^2}} \over {d{r^2}}} + {{l\left( {l + 1} \right)} \over {2{r^2}}} + {V^{KS}}\left( r \right)} \right){P_{nl}}\left( r \right) = {\varepsilon _{nl}}{P_{nl}}\left( r \right)$$
where ${P_{nl}}\left( r \right) = r{\Psi _{nl}}\left( r \right)$ is the radial wave function.
In scalar relativistic zeroth-order regular approximation (ZORA) the radial KS equation is
- $$\left( { - {d \over {dr}}{K \over 2}{d \over {dr}} + {{l\left( {l + 1} \right)} \over {{r^2}}}{K \over 2} + {V^{KS}}\left( r \right)} \right){P_{nl}}\left( r \right) = {\varepsilon _{nl}}{P_{nl}}\left( r \right)$$
where K is the relativistic factor
- $$K = {1\over{1-V^{KS}(r)/(2c^2)}}$$
and $c$ is the speed of light, $c = 137.06$ a.u.
Eq. (2) can be used for any atoms and the relativistic effects can be significant for atoms with $Z > 36$.
In oder to upgrade your DFT code to scalar relativistic ZORA level, you need to use other method than Numerov, because Eq. (2) now contains the term $dP(r)/dr$. One of the methods for this, for example, is the eigenvalue problem solver (see next section).
LAPACK solver for eigenvalue problem
In the course we used separate solvers for eigenvalue and eigenvector to find only one lowest energy eigenvalue and the corresponding eigenvector of the KS equation. However, it is possible to use other method, so called eigenvalue problem, and to find all or part of the eigenvalues and eigenfunctions at the same time.
Let us consider the eigenvalue problem
- $${\bf{AZ}} = {E\bf{Z}}$$
for known matrix $\bf{A}$ with size $N \times N$. The task is to find eigenvalues $E_i$ and eigenvectors $\textbf{Z}_i$ for $i=1,...,M$, with $M \leqslant N$, which satisfy Eq. (4). There are developed efficient mathematical algorithms to solve this problem and implemented in different libraries, for example, LAPACK library. The subroutine DSTEVR from this library allows to find all or some eigenvalues and eigenvectors for real symmetric tridiagonal matrix.
You can download this subroutine and replace eigenvalue and eigenvector solvers. This allows to calculate not only the KS ground state, but also some other KS levels.