We use (Hartree) atomic units in this whole section about DFT.
We use the Born-Oppenheimer approximation, which says that the nuclei of the
treated atoms are seen as fixed. A stationary electronic state (for
electrons) is then described by a wave function
fulfilling the many-body Schrödinger equation

where

is the kinetic term,

is the electron-electron interaction term and

is the interaction term between electrons and nuclei, where
are positions
of nuclei and
the number of nucleons in each nucleus (we are using atomic
units). So for one atomic calculation with the atom nucleus in the origin, we
have just
.
gives the probability density of measuring the first
electron at the position
, the second at
, dots and the Nth
electron at the position
. The normalization is such that
. The
is antisymmetric,
i.e.
etc.
Integrating
over the first
electrons is the probability
density that the
-th electron is at the position
. Thus the
probability density
that any of the N electrons (i.e the first, or
the second, or the third, dots, or the
-th) is at the position
is
called the particle (or number) density and is therefore given by:

(1)
Thus
gives the number of particles
in the region of integration
. Obviously
.
Note that the number density
and potential
in the
Schroedinger equation is related to the electron charge density
and electrostatic potential energy
by:

where
is the particle elementary charge,
which for electrons is
in atomic units.
The amount of electronic charge in the region
is given by:

The energy of the system is given by
(2)
where

(3)![=\int v({\bf r}) n({\bf r})\d^3 r=V[n]](../../_images/math/ab3224ab67e8761cad72af62ddad6b4be027156f.png)
It needs to be stressed, that
generally is not a functional of
alone, only the
is. In the next section we show however, that if the
is a ground state (of any system), then
becomes a functional
of
.
The Schrödinger equation gives the map

where
is the ground state. C is bijective (one-to-one correspondence),
because to every
we can compute the corresponding
from Schrödinger
equation and two different
and
(differing by more than a constant)
give two different
, because if
and
gave the same
, then
by substracting

from

we would get
, which is a contradiction with the assumption that
and
differ by more than a constant.
Similarly, from the ground state wavefunction
we can compute the charge
density
giving rise to the map

which is also bijective, because to every
we can compute
from
(1) and two different
and
give two different
and
, because different
and
give

adding these two inequalities together gives

which for
gives
, which is nonsense, so
.
So we have proved that for a given ground state density
(generated by a potential
) it is possible to calculate the
corresponding ground state wavefunction
, in other words,
is a unique functional of
:
![\Psi_0=\Psi_0[n_0]](../../_images/math/d513351119846bcfbfef0b06bf7299fe171b1316.png)
so the ground state energy
is also a functional of 
![E_0=\braket{\Psi_0[n_0]|\hat T+\hat U+\hat V_0|\Psi_0[n_0]}=E[n_0]](../../_images/math/3015b7db8b726114da0443f09a6f60016286a7c9.png)
We define an energy functional
(4)![E_{v_0}[n]=\braket{\Psi[n]|\hat T+\hat U+\hat V_0|\Psi[n]}= \braket{\Psi[n]|\hat T+\hat U|\Psi[n]}+\int v_0({\bf r})n({\bf r})\d^3r](../../_images/math/61b41d1cf813b23e22676f0ab98d7acf6b1eb454.png)
where
is any ground state wavefunction (generated by an
arbitrary potential), that is,
is a ground state density belonging to an
arbitrary system.
which is generated by the potential
can then be
expressed as
![E_0=E_{v_0}[n_0]](../../_images/math/28023b70413372b01ab4feee2c6247f41ba0882a.png)
and for
we have (from the Ritz principle)
![E_0<E_{v_0}[n]](../../_images/math/f7f2ffc1b18f5dfceb000bc8b8f57d3301d8b201.png)
and one has to minimize the functional
:
(5)![E_0=\min_n E_{v_0}[n]](../../_images/math/9b2915822a7e828e9a1435e974d44d7af558ae01.png)
The term
![\braket{\Psi[n]|\hat T+\hat U|\Psi[n]}\equiv F[n]](../../_images/math/5850c3641742dce4892098438e9cc2eaf6966ddf.png)
in (4) is universal in the sense that it doesn’t depend on
. It can be proven [DFT], that
is a functional of
for
degenerated ground states too, so (5) stays true as well.
The ground state densities in (4) and (5) are called
pure-state v-representable because they are the densities of (possible
degenerate) ground state of the Hamiltonian with some local potential
. One may ask a question if all possible functions are v-representable
(this is called the v-representability problem). The question is relevant,
because we need to know which functions to take into account in the
minimization process (5). Even though not every function is
v-representable [DFT], every density defined on a grid (finite of
infinite) which is strictly positive, normalized and consistent with the Pauli
principle is ensemble v-representable. Ensemble v-representation is just a
simple generalization of the above, for details see [DFT].
The functional
in (5) depends on the particle number
,
so in order to get
, we need to solve the variational formulation
![{\delta\over\delta n}\left(E_v[n]-\mu(N)\int n(\bf r)\d^3r\right)=0](../../_images/math/bf9759f23547ecee1d36365462b366df3e75867b.png)
so
(6)![{\delta E_v[n]\over\delta n}=\mu(N)](../../_images/math/3844cfaf15ad66ccbcbdbef366be754ad37952f4.png)
Let the
be the solution of (6) with a particle number
and the energy
:
![E_N=E_v[n_N]](../../_images/math/5a63ccd8fec01e37e76d1c3ea354013700c7f574.png)
The Lagrangian multiplier
is the exact chemical potential of the system

becuase
![E_{N+\epsilon}-E_N=E_v[n_{N+\epsilon}]-E_v[n_N] =\int {\delta E_v\over\delta n} (n_{N+\epsilon}-n_N)\d^3r=
=\int \mu(N) (n_{N+\epsilon}-n_N)\d^3r =\mu(N)(N+\epsilon-N)=\mu(N)\epsilon](../../_images/math/532eeb65834ff7248ec1146d556ce79caf447406.png)
so

Consider an auxiliary system of
noninteracting electrons (noninteracting
gas):

the Schrödinger then becomes:

and the total energy is:
![E_s[n]=T_s[\{\psi_i[n]\}]+V_s[n]](../../_images/math/92667b42a9c110759329eed9dace3d2b1222fb07.png)
where
![T_s[n]=\braket{\Psi[n]|\hat T|\Psi[n]}= \sum_i\braket{\psi_i|-\half\nabla^2|\psi_i}
V_s[n]=\braket{\Psi[n]|\hat V|\Psi[n]}=\int v_s({\bf r})n({\bf r})\d^3r](../../_images/math/f7ce25dfa857e3954fd3c677075e49aa344000a4.png)
So:
![E_s[n] = \sum_i\braket{\psi_i|-\half\nabla^2|\psi_i} +
\int v_s({\bf r})n({\bf r})\d^3r
=
= \sum_i\int \psi_i^* \left(-\half\nabla^2\right)\psi_i\,\d^3 r +
\int v_s({\bf r})\sum_i\psi_i^* \psi_i\, \d^3r
=
= \sum_i\int \psi_i^* \left(-\half\nabla^2 + v_s({\bf r})\right)
\psi_i\,\d^3 r
=
= \sum_i \epsilon_i\int \psi_i^* \psi_i\,\d^3 r =
= \sum_i \epsilon_i](../../_images/math/a80729daa732ae9ec0e7a96d77438e4a60d73a5e.png)
The total energy is the sum of eigenvalues (energies of the individual independent particles) as expected. From the last equation it follows:
![T_s[n] = \sum_i\braket{\psi_i|-\half\nabla^2|\psi_i}
= \sum_i \epsilon_i -\int v_s({\bf r})n({\bf r})\d^3r](../../_images/math/15091c09e66dfa095676d249c264a2d0d95399f7.png)
In other words, the kinetic energy of the noninteracting particles is equal to
the sum of eigenvalues minus the potential energy coming from the total
effective potential
used to construct the single particle orbitals
.
From (6) we get
(7)![\mu={\delta E_s[n]\over\delta n({\bf r})}= {\delta T_s[n]\over\delta n({\bf r})}+{\delta V_s[n]\over\delta n({\bf r})}= {\delta T_s[n]\over\delta n({\bf r})}+v_s({\bf r})](../../_images/math/6513b7dafed08c0a54c7839fbf198f22675bc95d.png)
Solution to this equation gives the density
.
Now we want to express the energy in (2) using
and
for convenience, where
is the classical electrostatic interaction energy
of the charge distribution
, defined using following relations
- we start with a Poisson equation in atomic units

and substitute
,
and we use the fact that
in atomic
units:

or equivalently by expressing
using the Green function:
(8)
and finally
is related to
using:

so we get:
![E_H[n]=\half\int\int {n({\bf r})n({\bf r'})\over|{\bf r}-{\bf r'}|} \d^3r\d^3r'](../../_images/math/a9ad5e5b20d9301dcdce74f135071cfbd6b902c3.png)
Using the rules for functional differentiation, we can check that:

Using the above relations, we can see that
![E_H[n]=\half\int V_H({\bf r}) n({\bf r}) \d^3r](../../_images/math/c9a2a48f4d3c981440303cc74e9f9a8eaeaf3884.png)
So from (4) we get
(9)![E[n]=(T+U)[n]+V[n]=T_s[n]+E_H[n]+(T-T_s+U-E_H)[n]+V[n]=
=T_s[n]+E_H[n]+E_{xc}[n]+V[n]](../../_images/math/db144f4d778508608c4a1fe3768d0575acd3d99d.png)
The rest of the energy is denoted by
and it is called is
the exchange and correlation energy functional. From (6)
![\mu={\delta E[n]\over\delta n({\bf r})}= {\delta T_s[n]\over\delta n({\bf r})}+ {\delta E_H[n]\over\delta n({\bf r})}+ {\delta E_{xc}[n]\over\delta n({\bf r})}+ {\delta V[n]\over\delta n({\bf r})}](../../_images/math/394e4f50434ab42b41b34e44d2683cebc37c3de7.png)
From (8) we have

from (3) we get
![{\delta V[n]\over\delta n({\bf r})}=v({\bf r})](../../_images/math/0c25a474a8beefbfe84b663284a3773c753774a9.png)
we define
(10)![{\delta E_{xc}[n]\over\delta n({\bf r})}=V_{xc}({\bf r})](../../_images/math/94ba6e8ede176e3f58d377155b7cb69fccfd17dd.png)
so we arrive at
(11)![\mu={\delta E[n]\over\delta n({\bf r})}= {\delta T_s[n]\over\delta n({\bf r})}+V_H({\bf r})+V_{xc}({\bf r})+v({\bf r})](../../_images/math/4d2dd770037d98541f91ce3ec1fdfb590d711502.png)
Solution to this equation gives the density
. Comparing (11) to
(7) we see that if we choose
(12)
then
. So we solve the Kohn-Sham equations of
this auxiliary non-interacting system
(13)
which yield the orbitals
that reproduce the density
of the original interacting system
(14)
The sum is taken over the lowest
energies. Some of the
can be
degenerated, but it doesn’t matter - the index
counts every eigenfunction
including all the degenerated. In plain words, the trick is in realizing, that
the ground state energy can be found by minimizing the energy functional
(4) and in rewriting this functional into the form (9),
which shows that the interacting system can be treated as a noninteracting one
with a special potential.
The exchange and correlation functional
![E_{xc}[n]=(T+U)[n]-E_H[n]-T_S[n]](../../_images/math/2558ff623d773bbff23c9a32188e2b057288a8ca.png)
can always be written in the form
![E_{xc}[n]=\int n({\bf r}')\epsilon_{xc}({\bf r}';n)\d^3r'](../../_images/math/9b610ad030c8356ef4cda50540887ff8dd894ad4.png)
where the
is called the XC energy density.
The XC potential is defined as:
![V_{xc}({\bf r};n) = {\delta E_{xc}[n]\over\delta n({\bf r})}
= \epsilon_{xc}({\bf r};n)+ \int n({\bf r}')
{\delta \epsilon_{xc}({\bf r}';n)\over\delta n({\bf r})}\d^3r'](../../_images/math/8008cfcefbeab60ff49a61f0098fd174c898746c.png)
We already derived all the necessary things above, so we just summarize it here. The total energy is given by:
![E[n]=(T+U)[n]+V[n]=T_s[n]+E_H[n]+(T-T_s+U-E_H)[n]+V[n]=
=T_s[n]+E_H[n]+E_{xc}[n]+V[n]](../../_images/math/db144f4d778508608c4a1fe3768d0575acd3d99d.png)
where
![T_s[n] = \sum_i \epsilon_i -\int v_s({\bf r})n({\bf r})\d^3r
E_H[n] = \half\int V_H({\bf r}) n({\bf r}) \d^3r
E_{xc}[n]=\int \epsilon_{xc}({\bf r};n) n({\bf r}) \d^3r
V[n]=\int v({\bf r}) n({\bf r}) \d^3r](../../_images/math/ac5cbab36160ed5ba3df280c117c400b7299af0f.png)
This is the correct, quadratically convergent expression for the total energy.
We use the whole input potential
and its associated
eigenvalues
to calculate the kinetic energy
, this follows
from the derivation of the expression for
. Then we use the calculated
charge density to express
,
and
.
If one is not careful about the potential associated with the eigenvalues,
i.e., confusing
with
, one gets a slowly converging formula
for the total energy. By expanding
using (12):
![\int v_s n({\bf r})\d^3 r
= \int (V_H + V_{xc} + v) n({\bf r})\d^3 r
= 2 \half\int V_H n({\bf r})\d^3 r
+ \int V_{xc} n({\bf r})\d^3 r
+ \int v n({\bf r})\d^3 r =
= 2 E_H[n] + \int V_{xc} n({\bf r})\d^3 r + V[n]](../../_images/math/ddac1a3ec1ccdaad32b74ed6893bbf096b562c3a.png)
So
is equal to:
![T_s[n] = \sum_i \epsilon_i -\int v_s({\bf r})n({\bf r})\d^3r =
= \sum_i \epsilon_i - 2 E_H[n] - \int V_{xc} n({\bf r})\d^3 r - V[n]](../../_images/math/170c36a754485f793ebef6e97ebf03d73e21234b.png)
And then the slowly converging form of total energy is:
![E[n] = T_s[n]+E_H[n]+E_{xc}[n]+V[n]
= \sum_i \epsilon_i - 2 E_H[n] - \int V_{xc} n({\bf r})\d^3 r - V[n]
+E_H[n]+E_{xc}[n]+V[n] =
= \sum_i \epsilon_i - E_H[n] + E_{xc}[n]
-\int V_{xc}({\bf r};n) n({\bf r}) \d^3r](../../_images/math/e3ca4c2178265a7c5fd846458aa1d17e03d04637.png)
The reason it is slowly converging is because the new formula for kinetic
energy is mixing
with
, so it is not as precise (see above)
and converges much slower with SCF iterations. Once self-consistency has been
achieved (i.e.
), the two expressions for total energy are
equivalent.
All the expressions above are exact (no approximation has been made so far).
Unfortunately, no one knows
exactly (yet). As such,
various approximations for it exist.
The most
simple approximation is the local density approximation (LDA), for which the
xc energy density
at
is taken as that of a homogeneous
electron gas (the nuclei are replaced by a uniform positively charged
background, density
) with the same local density:

The xc potential
defined by (10) is then
![V_{xc}({\bf r};n)={\delta E_{xc}[n]\over\delta n({\bf r})}= \epsilon_{xc}({\bf r};n)+ \int n({\bf r}'){\delta \epsilon_{xc}({\bf r}';n)\over\delta n({\bf r})}\d^3r'](../../_images/math/f73aa1ffdd053df6a4ac7ed7a4f169256903e9f3.png)
which in the LDA becomes
(15)
The xc energy density
of the homogeneous gas can be
computed exactly:

where the
is the electron gas exchange term given
by

the rest of
is hidden in
for which
there doesn’t exist an analytic formula, but the correlation energies are known
exactly from quantum Monte Carlo (QMC) calculations by Ceperley and
Alder [pickett]. The energies were fitted by Vosko, Wilkes and Nussair
(VWN) with
and they got accurate results with errors less
than
in
, which means that
is virtually known exactly. VWN result:
![\epsilon_c^{LD}(n)\approx {A\over2}\left\{ \ln\left(y^2\over Y(y)\right)+{2b\over Q}\arctan\left(Q\over 2y+b\right)+ \right.
\left. -{by_0\over Y(y_0)}\left[\ln\left((y-y_0)^2\over Y(y)\right) +{2(b+2y_0)\over Q}\arctan\left(Q\over 2y+b\right) \right] \right\}](../../_images/math/8841ea3eceef33e012a9a9cc1f9436e0706c33a4.png)
where
,
,
,
,
,
(note that the value of
is wrong in
[pickett]),
and
is the electron gas
parameter, which gives the mean distance between electrons (in atomic units):

The xc potential is then computed from (15):
![V_{xc}^{LD}=V_x^{LD}+V_c^{LD}
V_x^{LD}=-{1\over\pi}(3\pi^2 n)^{1\over3} = {4\over 3}\epsilon_x^{LD}
V_c^{LD}={A\over2}\left\{ \ln\left(y^2\over Y(y)\right)+{2b\over Q}\arctan\left(Q\over 2y+b\right)+ \right.
\left. -{by_0\over Y(y_0)}\left[\ln\left((y-y_0)^2\over Y(y)\right) +{2(b+2y_0)\over Q}\arctan\left(Q\over 2y+b\right) \right] \right\}+
-{A\over6}{c(y-y_0)-by_0y\over (y-y_0)Y(y)}](../../_images/math/52483aa71c6d51b8518bd9a411bc1a294a0fff42.png)
Some people also use Perdew and Zunger formulas, but they give essentially the same results. The LDA, although very simple, is surprisingly successful. More sophisticated approximations exist, for example the generalized gradient approximation (GGA), which sometimes gives better results than the LDA, but is not perfect either. Other options include orbital-dependent (implicit) density functionals or a linear response type functionals, but this topic is still evolving. The conclusion is, that the LDA is a good approximation to start with, and only when we are not satisfied, we will have to try some more accurate and modern approximation.
Relativistic corrections to the energy-density functional (RLDA) were proposed by MacDonald and Vosko:

where

We now calculate
:
(16)
where the derivative
can be evaluated as follows:

And
in exactly the same manner:

So we can write

where

where we used the derivative of
, which after a tedious, but
straightforward differentiation is:

Plugging this back in, we get:

For
we get
,
and
as expected, because

Code:
>>> from sympy import limit, var, sqrt, log
>>> var("beta")
beta
>>> limit((beta*sqrt(1+beta**2) - log(beta+sqrt(1+beta**2)))/beta**2, beta, 0)
0
For spherically symmetric potentials, we write all eigenfunctions as:

and we need to solve the following Kohn-Sham equations:

With normalization:

For Schroedinger equation, the charge density is calculated by adding all “(n, l, m)” states together, counting each one twice (for spin up and spin down):

where we have introduced the occupation numbers
by

Normalization of the charge density is:

So we can see, that it must hold:

where
is the atomic number (number of electrons), and as such,
are
indeed the occupation numbers (integers). The factor
is
explicitly factored out, as it cancels with the spherical harmonics:
assuming all
states are occupied, this can be simplified to:

We can also use this machinery to prescribe “chemical occupation numbers”, that
don’t necessarily correspond to the DFT ground state. For example for
atom
we get:

By summing all these
, we get 92 as expected:

But this isn’t the DFT ground state, because some KS energies are skipped, for
example there is only one state for
,
, but there are nine more
states with the same energy — instead two more states are occupied in
,
, but those have higher energy. So this corresponds to excited DFT state,
strictly speaking not physically valid in the DFT formalism, but in practice
this approach is often used. One can also prescribe fractional occupation
numbers (in the Dirac case).
The total energy is given by:
![E[n]= T_s[n]+E_H[n]+E_{xc}[n]+V[n]](../../_images/math/1f6e5d401ffa4d9c41402f3a7e1f8dc8f3b4541f.png)
where
![T_s[n] = \sum_{nl} f_{nl}\epsilon_{nl}
-\int (V_H(r) + V_{xc}(r) + v(r))_{in} n(r) \d^3 r
=
= \sum_{nl} f_{nl}\epsilon_{nl}
-\int \left(V_H(r) + V_{xc}(r) -{Z\over r}\right)_{in} n(r) \d^3 r
E_H[n] = \half\int V_H(r) n(r) \d^3r
E_{xc}[n]=\int \epsilon_{xc}(r;n) n(r) \d^3r
V[n]=\int v(r) n(r) \d^3r = -\int {Z\over r} n(r) \d^3r](../../_images/math/7b0ed3f3f12d5864f72bed4012bf08be06cfffe6.png)
doing the integrals a bit we get:
![T_s[n] = \sum_{nl} f_{nl}\epsilon_{nl}
-4\pi\int \left(V_H(r) + V_{xc}(r) -{Z\over r}\right)_{in} n(r)
r^2\,\d r
E_H[n] = 2\pi\int V_H(r) n(r)r^2\, \d r
E_{xc}[n]=4\pi\int \epsilon_{xc}(r;n) n(r)r^2\, \d r
V[n]=-4\pi \int {Z\over r} n(r)r^2\, \d r
=-4\pi Z \int n(r)r\, \d r](../../_images/math/d5e6c4faf8a8b0efd099154bffa9d3e1c2dfba2c.png)
We can also express everything using the charge density
:
![T_s[n] = \sum_{nl} f_{nl}\epsilon_{nl}
+4\pi\int \left(V_H(r) + V_{xc}(r) -{Z\over r}\right)_{in} \rho(r)
r^2\,\d r
E_H[n] = -2\pi\int V_H(r) \rho(r)r^2\, \d r
E_{xc}[n]=-4\pi\int \epsilon_{xc}(r;n) \rho(r)r^2\, \d r
V[n]=4\pi \int {Z\over r} \rho(r)r^2\, \d r
=4\pi Z \int \rho(r)r\, \d r](../../_images/math/f838e1f3bf417a4c3466a824cdd4ce43d3e84306.png)
The task is to find such a charge density
, so that all the equations below
hold (e.g. are self-consistent):

This is a standard nonlinear problem, except that the Jacobian is dense, as shown below.
Let’s write everything in terms of
explicitly:

Now we can write everything as just one (nonlinear) equation:

The correspondig discrete problem has the form
![\int_\Omega \nabla\phi_n(x)\cdot\nabla v_i(x)+\left[
-{Z\over r}+
\int_\Omega {
\sum_{m=1}^4 \phi_m^2(x')
\over|x' - x|}\d x'
+f\left( \sum_{m=1}^4\phi_m^2(x) \right)
\right]
\phi_n(x) v_i(x) \d x=
=\int_\Omega
\epsilon_n\phi_n(x) v_i(x) \d x,\quad\quad n = 1, 2, \dots, 4;\quad
i = 1, 2, \dots, N](../../_images/math/1c48c4e069f6e50b9092e521b247f96e25d1860b.png)
where

Here
is the vector
of unknown coefficients for the
-th wavefunction
. Our equation
can then be written in the compact form

where
with
![F_i({\bf Y}^{(n)}) =
\int_\Omega \nabla\phi_n(x)\cdot\nabla v_i(x)+\left[
-{Z\over r}+
\int_\Omega {
\sum_{m=1}^4 \phi_m^2(x')
\over|x' - x|}\d x'
+f\left( \sum_{m=1}^4\phi_m^2(x) \right)
\right]
\phi_n(x) v_i(x) \d x-
-\int_\Omega
\epsilon_n\phi_n(x) v_i(x) \d x](../../_images/math/999b49eec72c24179acca7fe1a914c1363b9b992.png)
The Jacobi matrix has the elements:

The only possible dense term is:

Now we can see that we have in there the following term:

which is dense in
, as can be easily seen be fixing
and writing

so for each
there is some contribution from the integral
for such
where
is nonzero, thus
making the Jacobian
dense.
| [DFT] | (1, 2, 3)
|
| [pickett] | (1, 2)
|