3.23 D3 Dispersion Correction

Warning: This functionality was introduced in FHI-aims version 240920, but has not yet undergone extensive testing. If you intend to use this functionality, please ensure that literature results obtained using this feature are reproducible using the implementation presented here. You could, for example, compare the results with the D3 dispersion correction to those of another dispersion correction implemented in FHI-aims such as vdw_ts, many_body_dispersion or xdm. Please be aware that some keywords/defaults may be subject to change as this is further developed. Furthermore, the D3 code part only runs in serial at present (this does not stop you running a parallel FHI-aims job as normal though).

The D3 dispersion correction by Grimme et. al. [116, 117] is implemented in FHI-aims via the simple-DFTD3 library (https://github.com/dftd3/simple-dftd3)[85]. It is capable of computing energies, forces and stresses.

Nvidia HPC compilers: For users compiling FHI-aims with nvfortran (in particular versions <=22.9), there may be issues with compilation of the simple-dftd3 library and its dependency mctc-lib due to compiler bugs. If you experience such problems during the building of FHI-aims, you can switch off compilation of D3 by adding the following line to your FHI-aims CMake file:
set(USE_DFTD3 OFF CACHE BOOL "" FORCE)

The D3 dispersion correction for DFT is computed in a post-SCF step, and adds a contribution to the Kohn-Sham energy

EDFTD3=EDFT+ED3 (3.70)

with EDFT being the Kohn-Sham DFT energy, and ED3 being the energy of the D3 dispersion correction. This contains two-body and optional three-body contributions:

ED3=ED3(2)+ED3(3). (3.71)

The two-body contribution can contain different damping functions:

  1. 1.

    Rational or Becke-Johnson damping function:

    ED3(2)=12ABn=6,8snCnABrABn+f(R0AB) (3.72)

    with

    f(R0AB)=a1R0AB+a2 (3.73)
  2. 2.

    Zero-damping (dispersion at short distances is damped to zero):

    ED3(2)=12ABn=6,8snCnABrABn+fd,n(rAB) (3.74)

    with

    fd,n=11+6(rAB/(sr,nR0AB))αn (3.75)

By default FHI-aims will use the rational/Becke-Johnson damping (see below for keywords), as this is typically more accurate. In this case, the method is sometimes referred to as DFT-D3(BJ).[117]

The parameters for the D3 correction are tailored to different functionals, with the parameters s6 and s8 being functional specific, as well as the damping parameters a1 and a2 (for rational/Becke-Johnson damping), and sr,6 and α6 (for zero damping). The remaining parameters are typically fixed based on these parameters, or given default values. In FHI-aims, the correct parameters should automatically be selected via the simple-DFTD3 library, if they are available. The initial implementation in FHI-aims version 240920 had this automatic parameter recognition only for internal xc functionals. As of version 241216, automatic parameter recognition is also possible for LibXC functionals, provided that the same functional is used for the exchange and correlation part.

The full list of functionals with D3 parameters in simple-DFTD3 are given below. Note that not all of these functionals may be implemented internally in FHI-aims, or via LibXC. This list comes from the source code of the simple-DFTD3 library, and may contain slightly different names to the internal xc names in FHI-aims (e.g. lacking dashes). However the code should be able to convert between the internal xc used by FHI-aims, and that given in simple-DFTD3 as shown in the list below. Please check the output carefully in this case though. The parameter source can be found inside the external libraries folder of your FHI-aims installation
external_libraries/s-dftd3/src/dftd3/param.f90.
The routine get_rational_damping contains parameters for rational/Becke-Johnson damping, and the routine get_zero_damping contains parameters for zero damping. General defaults may be found in the d3_param type.

b1b95, b88b95, b1lyp, b1p, b1p86, b2gpplyp, b2plyp, b3lyp, b3lyp5, b3lypg, b3lyp3, b3p, b3p86, b3pw91, b971, b972, b97d, b973c, b97m (only for rational damping), b98, bhlyp, bhandhlyp, blyp, bmk, bop, bp, bp86, bpbe, camb3lyp, dftb3 (only for rational damping), dm21, dm21m, dm21mc, dm21mu, dsdblyp (only for rational damping), dsdblypfc (only for rational damping), dsdpbe (only for rational damping), dsdpbep86 (only for rational damping), dsdpbeb95 (only for rational damping), dodscan66 (only for rational damping), hcth120, hcth407, hcth/407 hf, hiss, hse03, hse06, hsesol (only for rational damping), lcwhpbe (only for rational damping), lcwpbe, m05 (only for zero damping), m052x (only for zero damping), m06 (only for zero damping), m062x (only for zero damping), m06hf (only for zero damping), m06l (only for zero damping), m08hx (only for zero damping), m11 (only for rational damping), m11l (only for zero damping), mn12sx (only for rational damping), mn15 (only for rational damping), mn15l (only for zero damping), mpw1b95, mpw1kcis, mpw1pw, mpw1pw91, mpw2plyp, mpwb1k, mpwlyp, mpwpw, mpwpw91, mpw1lyp (only for zero damping), mpwkcis1k (only for zero damping), n12 (only for zero damping), n12sx (only for rational damping), o3lyp, olyp, opbe, otpss, pbe, pbe0, pbeh, pbe1kcis, pbe38 (only for zero damping), pbeh1pbe, pbeh3c (only for rational damping), pbehpbe, pbesol, pkzb (only for zero damping), ptpss, pwp (only for zero damping), pw91p86 (only for zero damping), pw1pw, pw6b95, pwb6k, pwgga (only for rational damping), pwpb95, r2scan (only for rational damping), r2scanh (only for rational damping), r2scan0 (only for rational damping), r2scan50 (only for rational damping), revdodblyp (only for rational damping), revdodpbe (only for rational damping), revdodpbep86 (only for rational damping), revdodpbeb95 (only for rational damping), revdsdblyp (only for rational damping), revdsdpbe (only for rational damping), revdsdpbep86 (only for rational damping), revdsdpbeb95 (only for rational damping), revpbe, revpbe0, revpbe38, revssb, revtpss, revtpss0, revtpssh, rpbe, rpw86pbe, rscan (only for rational damping), scan, sogga11x (only for rational damping), ssb, tauhcth, tauhcthhyb, tpss, tpss0, tpss1kcis, tpssh, wb97m (only for rational damping), wb97xd3*, x3lyp, xlyp.

* The parameters for the ωB97X-D3 functional in the zero (ωB97X-D3(0)) and rational/Becke-Johnson (ωB97X-D3(BJ)) damping cases actually come from two different base functionals in the s-dftd3 library.

  • ωB97X-D3(0) is the combination of the ωB97X-D3 functional from Ref. [198] (functional HYB_GGA_XC_WB97X_D3 in LibXC) with zero damping. The parameters are shown in Table 1 of this reference.

  • ωB97X-D3(BJ) is the combination of the ωB97X-V functional without VV10 contribution from Ref. [227] (functional HYB_GGA_XC_WB97X_V in LibXC) with rational/Becke-Johnson damping. The parameters are shown in the Supplementary Information, Section SI.6. of this reference.

Further information about this may be seen on the issue in the s-dftd3 repository: https://github.com/dftd3/simple-dftd3/issues/143. Please see the examples following the FHI-aims D3 keywords on the following pages to see how to request these functionals.

If you are using a functional not in the above list, then you must manually set parameters (if parameters for your functional exist in the literature, or you have a reliable way of obtaining them).

Tags for general section of control.in:

 

Tag: d3(control.in)

Usage: d3 [option=value…]
Purpose: activates the calculation of the D3 dispersion energy and its derivatives (if compute_forces and/or compute_analytical_stress are selected). If the parameters for a given xc are known to the s-dftd3 library, typically this is the only specification that is required. However, if parameters are not known, or the user wishes to tune something, then optional arguments are possible, as specified below.

  • damping=<string> [default: bj] Controls whether rational/Becke-Johnson damping is used (value=bj or value=rational, both do the same thing) or zero damping (value=zero)

  • s9=<real> [default: 1.0] Coefficient for the three-body contribution to D3 dispersion correction. The three-body contribution can be turned off by setting this to 0.0.

  • s6=<real> [default: depends on the XC functional] Coefficient for two-body contribution to D3 dispersion correction. If an XC is not found by the s-dftd3 library, a value must be provided for both the rational and zero damping cases. For many functionals, the value of this is simply 1.0 (although this should be checked).

  • s8=<real> [default: depends on the XC functional] Coefficient for two-body contribution to D3 dispersion correction. If an XC is not found by the s-dftd3 library, a value must be provided for both the rational and zero damping cases.

  • a1=<real> [default: depends on the XC functional] Coefficient for two-body contribution to D3 dispersion correction in the rational/Becke-Johnson damping case. If an XC is not found by the s-dftd3 library, a value must be provided.

  • a2=<real> [default: depends on the XC functional] Coefficient for two-body contribution to D3 dispersion correction in the rational/Becke-Johnson damping case. If an XC is not found by the s-dftd3 library, a value must be provided.

  • sr6=<real> [default: depends on the XC functional] Coefficient for two-body contribution to D3 dispersion correction in the zero damping case. If an XC is not found by the s-dftd3 library, a value must be provided.

  • sr8=<real> [default: 1.0] Coefficient for two-body contribution to D3 dispersion correction in the zero damping case. Usually kept at 1.0.

  • alpha=<real> [default: 14.0] Exponent in the zero damping function for the two-body contribution to D3 dispersion correction (α6 in Eq. 3.75)

  • cut_2b=<real> [default: 60.0] Cutoff distance for 2-body dispersion interactions, with atom-pairs further away from this ignored. Distance in Bohr.

  • cut_3b=<real> [default: 40.0] Cutoff distance for 3-body dispersion interactions, with atom-pairs further away from this ignored. Distance in Bohr.

  • cut_cn=<real> [default: 40.0] Cutoff distance for coordination number calculation (i.e. first neighbours count). Distance in Bohr.

Examples:

  • xc pbe
    d3
    D3 dispersion correction with rational/Becke-Johnson damping for the internal PBE functional, with automatic obtaining of parameters.

  • override_warning_libxc
    xc libxc XC_GGA_X_PBE+XC_GGA_C_PBE
    d3 damping=zero
    D3 dispersion correction with zero damping for the LibXC PBE functional, with automatic obtaining of parameters.

  • xc pbe
    d3 damping=zero s9=0.0
    D3 dispersion correction with zero damping for the internal PBE functional, with automatic obtaining of parameters, and switching the three-body contributions off.

  • override_warning_libxc
    xc libxc HYB_GGA_XC_WB97X_D3
    d3 damping=zero
    The ωB97X-D3(0) functional, as defined in Ref. [198].

  • override_warning_libxc
    xc libxc HYB_GGA_XC_WB97X_V
    d3
    The ωB97X-D3(BJ) functional, as defined in Ref. [227].