3.24 Calculating nonlocal correlation energy within density functional approach

Warning: This functionality is available in FHI-aims, but has not seen extensive testing by ourselves. It should therefore be treated as experimental. If you intend to use this functionality, by all means ensure that literature results obtained using this functional are reproducible using the implementation presented here.

There are currently two separate working implementations of van der Waals DF in FHI-aims:

  • Sec. 3.24.1: One version that allows post-processing only (i.e., compute the self-consistent density by another XC functional, the evaluate only the vdw-DF energy term again after the fact), using a Monte Carlo integration scheme. This version works for non-periodic as well as periodic systems. The original code was developed in the group of Claudia Ambrosch-Draxl at University of Leoben, Austria.

  • Sec. 3.24.2: A second version that relies on an analytical integration scheme developed by Simiam Ghan, Andris Gulans and Ville Havu at Aalto University in Helsinki. This version allows non-self-consistent and self-consistent usage, as well as gradients (forces). It also has a number of numerical convergence parameters that can be adjusted.

At the time of writing, neither version has been developed for performance and they will seem very slow! They are provided here as proof of concept. Please consider using production versions such as Tkatchenko-Scheffler, D3, many-body dispersion, non-local many-body dispersion, or the XDM, which perform far better and can provide excellent accuracy for dispersion interactions.

3.24.1 Monte Carlo integration based vdW-DF

As a postprocessing step after a self-consistent calculation, the nonlocal part of the correlation energy can be calculated using the van der Waals density functional proposed by M. Dion et al. [76]. This task follows exactly the recipe presented in the original paper [76]. This calculation can be performed by choosing ll_vdwdf as a total_energy_method (please see Section 3.3).

Important acknowledgment: The Langreth-Lundqvist functional and basic Monte Carlo integration scheme used here was made available to us by the group of Claudia Ambrosch-Draxl and coworkers at University of Leoben, Austria. If you use this functionality successfully, please cite their work (currently, Ref. [226] and “unpublished”).

In order to perform the calculation, one should define an even spacing grid (followed by the vdwdf tag explained below), where the total charge densities of a system obtained after the scf cycle are projected.

In order to effectively solve the nonlocal correlation energy part, presented in Equation(1) of  [76], the Monte Carlo integration scheme of Divonne integration method of CUBA library (Please visit http://www.feynarts.de/cuba for details).

This means that you should (yourself) compile the CUBA library as an external dependency to FHI-aims. The alternative Makefile Makefile.cuba the contains examples of how to link FHI-aims to the CUBA library, and enable the vdW-LL functional

Parameters for tuning the performance of Monte Carlo integration are defined under the mc_int tag explained below. Also, the kernel values are tabulated in terms of the parameters in the formula of Equation(14) of  [76]. The aims package comes with the tabulated kernel data (a file called kernel.dat) and the name of the file should be included in control.in.

Necessary input file: In your FHI-aims distribution, a version of the kernel.dat file as well as an example control.in file should be located in subdirectory src/ll_vdwdf . For an actual FHI-aims program run, the kernel.dat file (currently, kernel_my.dat is provided) must be copied to your working directory and must be referenced in your control.in file, using the kernel_data sub-keyword of the mc_int keyword (see below).

Tags for general section of control.in:

 

Tag: mc_int(control.in)

Usage: mc_int subkeyword(s)
Purpose: A line that begins with vdwdf is associated with the Monte Carlo integration performed to evaluate the non-local Langreth-Lundqvist functional. The mc_int keyword must be followed on the same line by a subkeyword that indicates the specific setting made here.
subkeyword(s) are one or more subkeywords or data for the Monte Carlo integration.

To use the Monte Carlo integrated Langreth-Lundqvist functional, more than one subkeyword for mc_int must be specified in the control.in file. See below for valid / necessary subkeywords. You may also want to check the documentation for the CUBA Monte Carlo integration library (http://www.feynarts.de/cuba) that you must have built and linked to the FHI-aims code in order to use the Langreth Lundqvist functional.

 

Tag: vdwdf(control.in)

Usage: vdwdf subkeyword(s)
Purpose: A line that begins with vdwdf is associated with the non-local Langreth-Lundqvist functional. The vdwdf keyword must be followed on the same line by a subkeyword that indicates the specific setting made here.
subkeyword(s) are one or more subkeywords or data for the Langreth-Lundqvist functional.

To use the Langreth-Lundqvist functional, more than one subkeyword for vdwdf must be specified in the control.in file. See below for valid / necessary subkeywords.

Subtags for vdwdf tag in control.in:

 

vdwdf sub-tag: cell_origin(control.in)

Usage: cell_origin x y z
x y z indicates the cartesian coordinates (in Å) of the origin of an even-spacing cubic cell. Default: 0.0 0.0 0.0.

This option is only valid for a cluster calculation. For the case of periodic system, a cell origin is automatically determined at the center of a supercell.

 

vdwdf sub-tag: cell_edge_steps(control.in)

Usage: cell_edge_steps Nx Ny Nz
Purpose: the total number of grids in each direction are defined by integer numbers, x y z.

 

vdwdf sub-tag: cell_edge_units(control.in)

Usage: cell_edge_units dx dy dz.
Purpose: The real numbers dx dy dz (in Å) define the length of grid units in each direction. Therefore, the full grid length is (Nxdx,Nydy, Nzdz).

 

vdwdf sub-tag: cell_size(control.in)

Usage: cell_size Lx Ly Lz
Purpose: this defines number of interacting cells in x, y, z directions for van der Waals interactions. This option is meaningful for periodic calculation.
Lx Ly Lz are integer. Default: 0 0 0.

Note: As a temporary restriction, FHI-aims currently supports only grids with vectors aligning along x, y, and z axes.

Calculations for periodic systems: In defining even spacing grid of a periodic system, only information of cell_edge_steps and cell_size (if needed) is necessary and other parameters will be automatically determined from that.

Subtags for mc_int tag in control.in:

 

mc_int sub-tag: kernel_data(control.in)

Usage: kernel_data kernel.dat
Purpose: the name of the tabulated kernel file.

 

mc_int sub-tag: output_flag(control.in)

Usage: output_flag flag
Purpose: this controls output of Monte Carlo integration process, level 0 for no output, level 1 for “reasonable”, and level 3 prints further the subregion results(if applicable). flag is an integer number. Default: 0

 

mc_int sub-tag: number_of_MC(control.in)

Usage: number_of_MC N
Purpose: the total number of Monte-Carlo integration steps.
N is an integer number. Default: 5E5

 

mc_int sub-tag: relative_accuracy(control.in)

Usage: relative_accuracy Eacc
Purpose: control the accuracy of Monte-Carlo integration performed by Cuba library.
Eacc is a real number. Default: 1E-16

 

mc_int sub-tag: absolute_accuracy(control.in)

Usage: absolute_accuracy Eabs
Purpose: control the error bar of nonlocal correlation energy.
Eabs is a real number (in the unit of Hartree). Default: 1E-2

3.24.2 Analytic integration scheme for non-selfconsistent and self-consistent vdW-DF

This method calculates the non-local part of the correlation energy as described in [76] allowing for both non-self-consistent and self-consistent treatment. It works for both cluster and periodic geometries and can be used to compute forces. The implementation as well as the kernel function are from [120]. At each scf-cycle the following steps are performed:

  • An octree is built to interpolate the current electron density to the new integration grid below.

  • To each grid point of the main integration grid another grid of similar form is attached. The non-local correlation is then integrated on this grid using density and its gradient interpolated from the octree. In each node of the tree a tricubic interpolation is used.

The first step of building the octree is not parallel but the second step of integration is MPI-parallel the usual way.

Note: This functionality is available in FHI-aims but it has not been developed for performance at all. It is provided as proof of concept and for reference purpose but unlike the other methods to assess dispersion interactions in FHI-aims, it will seem very slow. Please keep this in mind when using the approach.

One reason that vdW-DF was not pursued for further optimization in FHI-aims is that other methods to include dispersion interactions, including Tkatchenko-Scheffler, many-body dispersion, nonlocal many-body dispersion, the XDM approach and also the D3 approach are available and appear to provide excellent accuracy in the scenarios for which they were developed. Please see the respective chapters for these methods.

Tags for general section of control.in:

 

Tag: nlcorr_nrad(control.in)

Usage: nlcorr_nrad number
Purpose: Sets the number of radial shells used in the integration of the non-local correlation potential and energy. Default: 10

 

Tag: nlcorr_i_leb(control.in)

Usage: nlcorr_i_leb number
Purpose: Sets the index of angular Lebedev grid used in the integration of the non-local correlation potential and energy. Maximum value available is 15. Default: 7

 

Tag: vdw_method(control.in)

Usage: vdw_method type accuracy
Purpose: Sets the method for density interpolation for the integration of the non-local correlation potential and energy.
type is the method selected, either octree, mixed, or multipoles. Default: octree
accuracy applies to methods octree and mixed. It is the targer accuracy of the interpolation. In case of multipoles all available multipoles are used. Default: 1E-6

The point of providing three different options for type is simply that any prospective user should test which one is fastest for a given problem. The difference is simply the style of integration of the non-local part. Ideally, the results should be the same. However, as always, please check in case of doubt.