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.

Kernel integration

In DFT, the exchange-correlation (xc) kernel integrations are performed numerically

Exc[n(r)]=∫n(r) εxc(n,∇n,∇2n) d3r≈∑i=1Pwi n(ri) εxc(n,∇n,∇2n) ∣r=riE_\mathrm{xc}[n(\mathbf{r})] = \int n(\mathbf{r}) \, \varepsilon_\mathrm{xc}(n, \nabla n, \nabla^2 n) \, \mathrm{d}^3\mathbf{r} \approx \sum_{i=1}^P w_i \, n(\mathbf{r}_i) \, \varepsilon_\mathrm{xc}(n, \nabla n, \nabla^2 n) \,\Big|_{\mathbf{r} = \mathbf{r}_i}

In VeloxChem, the set of grid points and the associated grid-point weights, wiw_i are constructed using modified versions of the Log3-quadrature Treutler & Ahlrichs (1995) and SSF-partitioning schemes Stratmann et al. (1996). In practical work, the number of grid points, PP, amounts to in the order of 106.

Integration of the density itself results in the number of electrons in the system. Let us explore this simple case to assess the accuracy in the numerical integration scheme. We will use the electron density of the water molecule in our example calculations.

Define the molecular system.

Loading...

Define the method.

Molecular grid points

In the Python layer, VeloxChem provides access to the creation of molecular grids with the GridDriver class.

Number of grid points: 40720

Visualize all grid points outside the sphere of radius 5.0 a0a_0.

Number of grid point outside sphere: 5398
Number of grid point inside sphere: 35322

Not surprisingly, the grid point density is much larger inside the van der Waals volume of the molecule where the electron density is large.

Let us visualize all grid points outside the sphere of radius 5.0 a0a_0.

Loading...

Another important view of the grid points is from the perspective of their atomic radial density. It can be clearly seen that the grid density is much larger in the regions of the density maxima of the atomic shells.

<Figure size 640x480 with 1 Axes>

Density on grid points

Obtain the total density matrix.

We will first study the total ground-state electron density and perform the integration with molecular grids of varying size and thereby quality. The quality of the grid is determined by the grid level and VeloxChem presently offers grid levels ranging from one to eight and for water that amounts to a number of grid points ranging from 4,400 to 1,107,900.

For a given density matrix, the density on grid points can be determined as follows

n(rg)=∑α,βχα∗(rg)Dαβχβ(rg)n(\mathbf{r}_g) = \sum_{\alpha,\beta} \chi^*_\alpha(\mathbf{r}_g) D_{\alpha\beta} \chi_\beta(\mathbf{r}_g)
Number of grid points: [4404, 10536, 20678, 40720, 63844, 147024, 348468, 1107906]

As measure of accuracy in the numerical integration, we will use the absolute value of the difference between the integer number of electron (ten for water) and the value of the integral with varing grid levels. This error measure is illustrated below in the plot.

<Figure size 800x400 with 2 Axes>

It is seen that the error in the numerical integration ranges from 10-2 to 10-9 and the error at the default grid level amounts to 10-6 electrons. These results are rather insensitive to the choice of basis set as the location of radial density maxima for the occupied orbitals do not change much with the choice of basis set, and the numerical grids are optimized to cover well these spatial regoins.

It is less clear, however, how well the grid points cover the important spatial regions of the unoccupied (virtual) orbitals that become important in the calculation of excited states and therefore also in simulations of spectroscopies. To analyze this aspect further, we lock the grid level to four and instead perform numerical integrations of the densities of occupied and unoccupied orbitals. The reference integer number of electrons is in this case equal to two.

We will compare the results for two standard basis sets that are frequently used in DFT spectroscopy calculations namely def2-svpd and aug-cc-pvdz.

<Figure size 800x400 with 1 Axes>

The lowest five orbitals are occupied and for those we note that the largest error is seen in the numerical integration of the core 1s-orbital of oxygen and it is noted that the errors are very much alike for the two basis sets. For the unoccupied orbitals, on the other hand, the two basis sets give very different results. While the errors obtained with use of the def2-svpd basis set remain small for all virtual orbitals , they occationally reach above 10-4 electrons for the aug-cc-pvdz basis set. Somewhat alarmingly, it is the lower virtual orbitals that suffer the largest errors at the same time as these are the most important ones in spectrum simulations.

References
  1. Treutler, O., & Ahlrichs, R. (1995). Efficient molecular numerical integration schemes. J. Chem. Phys., 102, 346–354. 10.1063/1.469408
  2. Stratmann, E. R., Scuseria, G. E., & Frisch, M. J. (1996). Achieving linear scaling in exchange-correlation density functional quadratures. Chem. Phys. Lett., 257, 213–223. 10.1016/0009-2614(96)00600-8