Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

SCF optimization

The derivation of the Kohn–Sham equation follows closely the Hartree–Fock counterpart and the orbitals that minimize the DFT energy under the contraint of being orthogonal are eigenfuctions to the Kohn–Sham operator that closely resembles the Fock operator from Hartree–Fock theory. The Kohn–Sham operator takes the form

f^=h^+v^xc+∑j=1N(J^j+cxK^j)\hat{f} = \hat{h} + \hat{v}_\mathrm{xc} + \sum_{j=1}^N \big( \hat{J}_j + c_{\text{x}} \hat{K}_j \big)

where we note that the exchange term in the Fock operator has been at least partially replaced by the exchange–correlation potential

vxc(r)=δExcδn(r)v_\mathrm{xc}(\mathbf{r}) = \frac{\delta E_\mathrm{xc}}{\delta n(\mathbf{r})}

For pure functionals, cx=0c_{\text{x}} = 0 whereas for hybrid functionals, we have 0<cx<10 < c_{\text{x}} < 1.

So an existing module for the SCF optimization of a Hartree–Fock state is made capable to optimize a Kohn–Sham state by modifying the Fock operator accordingly. Let us do just that under the assumption that the exchange–correlation functional merely includes Slater exchange

εxc(n(r))=−34(3π)1/3[n(r)]1/3\varepsilon_\mathrm{xc}(n(\mathbf{r})) = -\frac{3}{4} \Big(\frac{3}{\pi}\Big)^{1/3} \big[n(\mathbf{r})\big]^{1/3}

In the LDA, we have

vxc(r)=εxc(n(r))+n(r)∂εxc∂nv_\mathrm{xc}(\mathbf{r}) = \varepsilon_\mathrm{xc}(n(\mathbf{r})) + n(\mathbf{r}) \frac{\partial \varepsilon_\mathrm{xc}}{\partial n}

and, in our particular case, we get

vxc(r)=43εxc(n(r))v_\mathrm{xc}(\mathbf{r}) = \frac{4}{3} \varepsilon_\mathrm{xc}(n(\mathbf{r}))

where

n(r)=2×∑i=1N/2∣ϕi(r)∣2n(\mathbf{r}) = 2 \times \sum_{i=1}^{N/2} \left|\phi_i(\mathbf{r})\right|^2

Setting up the system

Loading...
Number of orbitals: 24
Number of doubly occupied molecular orbitals: 5
Nuclear repulsion energy (in a.u.):  9.34363816

Reference calculation

Let us first perform an reference calculation using the restricted closed-shell SCF driver in VeloxChem.

Final DFT energy: -75.1874344 Hartree
Notebook Cell

XC contribution to Fock matrix

The contrbutions from v^xc\hat{v}_\mathrm{xc} to the Fock operator in the AO matrix representation will be obtained by means of numerical integration.

Fαβxc=(χα∣v^xc∣χβ)≈∑g=1Pwg χα∗(rg)vxc(rg)χβ(rg)F^\mathrm{xc}_{\alpha\beta} = ( \chi_\alpha | \hat{v}_\mathrm{xc} | \chi_\beta ) \approx \sum_{g=1}^P w_g \, \chi_\alpha^\ast(\mathbf{r}_g) v_\mathrm{xc}(\mathbf{r}_g) \chi_\beta(\mathbf{r}_g)

We start by defining a molecular grid with grid points and weights. The number of grid points, PP, will depend on the chosen grid level accuracy. The default level in VeloxChem is equal to 4.

In order to carry out the numerical integration, we need the values of the atomic orbitals, χα(rg)\chi_\alpha(\mathbf{r}_g), on the grid points.

SCF procedure

Let us merely modify the Fock matrix in the existing module for the SCF optimization of a Hartree–Fock state and instead converge the Kohn–Sham state.

iter       SCF energy   LDA exchange   Exact exchange   Error norm
 0       -67.80508830   -10.89381306     -11.93847705     3.14e+00
 1       -66.26792219    -6.28078058      -7.13537283     4.19e+00
 2       -74.99359878    -7.76615742      -8.60690061     8.13e-01
 3       -75.12110246    -7.90554682      -8.73394901     5.65e-01
 4       -75.13715465    -7.92293008      -8.75103380     4.94e-01
 5       -75.16585462    -7.99147909      -8.82023741     3.22e-01
 6       -75.18739992    -8.11598421      -8.94844153     1.24e-02
 7       -75.18742612    -8.11619778      -8.94863105     6.35e-03
 8       -75.18743428    -8.11849075      -8.95101979     7.61e-04
 9       -75.18743440    -8.11879444      -8.95133716     1.63e-06
10       -75.18743440    -8.11879427      -8.95133701     7.68e-08
SCF iterations converged!

We note that the final SCF energy equals the one above as obtained in the reference calculation. It is also seen that the LDA exchange energy is some 0.83 Hartree higher than the corresponding exact Hartree–Fock exchange energy.

Self-interaction error

In Hartee–Fock, the exchange energy equals

ExHF=−∑i=1N/2Kii;Kii=∑j=1N/2(ϕiϕj∣ϕjϕi)E_{\mathrm{x}}^\mathrm{HF} = - \sum_{i=1}^{N/2} K_{ii} ; \qquad K_{ii} = \sum_{j=1}^{N/2} ( \phi_i \phi_j | \phi_j \phi_i )

The term in KiiK_{ii} with j=ij = i cancels the self-interaction in the classical Coulomb electron repulsion energy. In DFT, with an approximate form of the exchange–correlation energy functional, this cancelation is no longer guaranteed.

In our case, the DFT exchange energy equals

ExLDA=2∑i=1N/2(ϕi∣ε^xc∣ϕi)=32∑i=1N/2(ϕi∣v^xc∣ϕi)=32∑i=1N/2FiixcE_{\mathrm{x}}^\mathrm{LDA} = 2 \sum_{i=1}^{N/2} ( \phi_i | \hat{\varepsilon}_\mathrm{xc} | \phi_i ) = \frac{3}{2} \sum_{i=1}^{N/2} ( \phi_i | \hat{v}_\mathrm{xc} | \phi_i ) = \frac{3}{2} \sum_{i=1}^{N/2} F^\mathrm{xc}_{ii}

where the factor of 2 stems from the double occupancy of orbitals.

<Figure size 600x400 with 1 Axes>

First, we note that the self-interaction energy (SIE) in terms of the integral (ϕiϕi∣ϕiϕi)(\phi_i\phi_i|\phi_i\phi_i) represents a dominant part of the exchange energy. The percentage contributions exceed 60% for all orbitals and it reaches 97% for the core 1s-orbital.

SIE percentage part of exchange energy
0   97.0%
1   62.8%
2   73.1%
3   76.5%
4   76.7%

Second, we note that the LDA exchange energy is closely equal to the exact Hartree–Fock exchange energy for the outer valence orbitals but substantially less so for the core and inner valence orbitals. For the core 1s-orbital, the two results differ by some 0.66 Hartree.

Comparison of LDA and HF exchange energies
0   86.4%   0.66 a.u.
1   87.5%   0.15 a.u.
2   99.4%   0.01 a.u.
3   98.9%   0.01 a.u.
4   99.7%   0.00 a.u.