Skip to content

Commit

Permalink
Added D4 to main dispersion docs
Browse files Browse the repository at this point in the history
- also added note to say D3 without BJ correction is rarely used.
- Minor formatting tweaks to dispersion tutorial
- Added references for the D4 method.
  • Loading branch information
jkshenton committed Sep 12, 2024
1 parent ad6d798 commit a3b9c14
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 7 deletions.
21 changes: 18 additions & 3 deletions docs/documentation/Groundstate/dftd.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ Finally, the many-body correlated motion of electrons can be, to some extent, ca

Every application will have its own set of important features and it is not possible to say with certainty which density functional approximation will be the most appropriate. With that said, here are some suggestions for different types of materials:

* Molecular crystals: D3/D3-BJ/XDM/MBD in combination with GGA or hybrid functionals (Dolgonos *et al*., 2019[@Dolgonos2019]).
* Molecular crystals: D3-BJ/XDM/MBD in combination with GGA or hybrid functionals (Dolgonos *et al*., 2019[@Dolgonos2019]).
* Metals: vdW-DFs developed with solid state materials in mind (Klimeš *et al*., 2011[@Klimes2011]). <!-- TODO: what about methods available in CASTEP? -->
* Interactions between molecules and surfaces of metals: vdW-DFs or dispersion methods that include screening, e.g. TSSCS
* MOFs: dispersion corrected (e.g. TS, D3, etc.) GGAs
* Layered vdW materials: Beyond pairwise appraches, e.g. D3* or MBD.
* Layered vdW materials: Beyond pairwise approaches, e.g. D3-BJ* or MBD.
<!-- * TODO: others? -->

$^*$ See note below for how to include the three-body terms in the CASTEP D3 correction.
Expand Down Expand Up @@ -85,6 +85,7 @@ In the `.param` file, set:
| [G06](#G06) (= D2) [@GrimmeD2] | Predates 2012 | PBE, BLYP, BP86, B3LYP, TPSS | Up to Z= 54 | Analytic | DFPT & FD |
| [D3](#D3) [@GrimmeD3] | CASTEP 20 ([Compilation instructions](#D3compilation)) | PBE, PBE0, HF | | Analytic | FD |
| [D3-BJ](#D3-BJ) [@GrimmeD3-BJ] | CASTEP 20 ([Compilation instructions](#D3compilation)) | PBE, PBE0, HF | | Analytic | FD |
| [D4](#D4) [@GrimmeD4-1;@GrimmeD4-2;@GrimmeD4-3] | CASTEP 24.1 | PBE, RPBE, PBESOL, BLYP, PW91, RSCAN | | Analytic | FD |
| [OBS](#OBS) [@Ortmann2006] | Predates 2012 | LDA, PW91 | Up to Z=57 | Analytic | DFPT & FD |
| [JCHS](#JCHS) [@Jurecka2007] | Predates 2012 | PBE, BLYP, B3LYP, TPSS | H, C, N, O, F, Cl, Br | Analytic | DFPT & FD |
| [XDM](#XDM) [@Becke2007] | CASTEP 20 | B86PBE, PBE, BLYP, PBESOL, PW91, RPBE, WC, RSCAN | Up to Z=102 | Analytic | FD |
Expand Down Expand Up @@ -254,7 +255,7 @@ Note that default D2 parameters are available only for the PBE, BLYP, BP86, B3LY

**D3**

Grimme's DFT-D3 method. The D3 scheme with Becke-Johnson damping (D3-BJ) is generally more accurate[@Smith2016] than the 'zero-damping' method (D3).
Grimme's DFT-D3 method. The D3 scheme with Becke-Johnson damping (D3-BJ) is generally more accurate[@Smith2016] than the 'zero-damping' method (D3). Note that most published results for "D3" are actually "D3-BJ", and that the original version of D3 is rarely used any more.

Restrictions:

Expand All @@ -272,6 +273,8 @@ This is the Grimme D3 scheme with Becke-Johnson damping.

!!! note
When running a D3-BJ calculation with `IPRINT > 1`, you might see `Dispersion version: D4` in the .castep output file. Confusingly, this does **not** mean the Grimme D4 method has been used, it's just an interal CASTEP version label for this correction scheme.
<!-- TODO is this note still valid for castep 24.1 ? -->



??? warning "Compilation flags: for the D3 correction, CASTEP must be compiled with `GRIMMED3 := compile`<a name="D3compilation"></a>"
Expand All @@ -285,6 +288,18 @@ This is the Grimme D3 scheme with Becke-Johnson damping.

For CASTEP 20, the D3 library is included in the distribution and the setting the flag above should be sufficient.

**D4**
Generally applicable atomic-charge dependent London dispersion correction, termed DFT+D4. It is available from CASTEP 24.1 onwards via setting

**`SEDC_SCHEME : D4`**<a name="D4"></a>

Note that D4 is made available via using the external [dftd4](https://github.com/dftd4/dftd4) library. This library is included in the CASTEP 24.1 distribution and should be compiled by default when you build CASTEP.

Restrictions:

* Default D4 parameters are available for the PBE, RPBE, PBESOL, BLYP, PW91 and RSCAN functionals.
<!-- Is this list exhaustive? -->


#### Exchange-dipole moment (XDM) method <a name="XDM"></a>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ dfdiff['c/2'] = df['crange'] / 2
styles = [f'{m}-' for m in ["o","v","^","s", "H", "+","x","D"]]

# compared to this reference (and many others!) https://doi.org/10.1039/C3RA47187J
ax = dfdiff.plot(x='c/2', y=['PBE-','PBE-G06', 'PBE-D3', 'PBE-D3-BJ', 'PBE-TS', 'PBE-MBD', 'PBE-XDM'],
ax = dfdiff.plot(x='c/2', y=['PBE-','PBE-G06', 'PBE-D3', 'PBE-D3-BJ', 'D4', 'PBE-TS', 'PBE-MBD', 'PBE-XDM'],
ylabel='energy/atom (meV)',
ylim=(-100, 80),
xlabel=r'interlayer spacing d ( = c/2) (${\AA}$)',
Expand All @@ -218,10 +218,11 @@ plt.savefig('graphite-interlayer-binding-castep-dispersions.png', dpi=300)

which produces the following figure:


![png](graphite-interlayer-binding-castep-dispersions.png)

where the dashed vertical line is the experimental interlayer spacing and the shaded grey region is the range of experimentally obtained interlayer binding energies. Please note that these are not fully converged calculations and so do not represent the actual performance of these methods but is simply a guide for how to use them with CASTEP.
![Fig1. Graphite binding energy](graphite-interlayer-binding-castep-dispersions.png){width="100%"}
<figure style="display: inline-block;">
<figcaption style="text-align: left;">Fig1. Graphite interlayer binding energy using the PBE XC functional with various dispersion corrections. The dashed vertical line is the experimental interlayer spacing and the shaded grey region is the range of experimentally obtained interlayer binding energies. Please note that these are not fully converged calculations and so do not represent the actual performance of these methods but is simply a guide for how to use them with CASTEP. </figcaption>
</figure>


We can see that the plain PBE functional severely underestimates the binding energy of graphite and that many of the dispersion-corrected results are in much better agreement. The TS scheme strongly overbinds graphite, but has been found to be accurate for other types of systems. Testing such methods carefully is always required when you encounter a new system.
Expand All @@ -239,7 +240,9 @@ We can see that the plain PBE functional severely underestimates the binding ene
```
in the .param file. What effect does this have on the interlayer binding energy in graphite? (You may also want to set `IPRINT = 2` to see more information about the dispersion correction parameters.)
2. Compare to other XC functionals with and without the dispersion corrections (though note that of the corrections are [only parameterised for a few functionals](../../documentation/Groundstate/dftd.md#table).)
3. For CASTEP < 24.1 we get a warning for the TS, MBD and XDM schemes about the unit cell being too small for accurate corrections. If you get this warning, try repeating the above calculations for these three methods using a larger supercell to see what the effect is and what sized supercell you would need to converge the dispersion correction.
Expand Down
42 changes: 42 additions & 0 deletions refs.bib
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,48 @@ @article{GrimmeD3-BJ
year = {2011}
}

@article{GrimmeD4-1,
title = {Extension of the D3 dispersion coefficient model},
volume = {147},
ISSN = {1089-7690},
url = {http://dx.doi.org/10.1063/1.4993215},
DOI = {10.1063/1.4993215},
number = {3},
journal = {The Journal of Chemical Physics},
publisher = {AIP Publishing},
author = {Caldeweyher, Eike and Bannwarth, Christoph and Grimme, Stefan},
year = {2017},
month = jul
}

@article{GrimmeD4-2,
title = {A generally applicable atomic-charge dependent London dispersion correction},
volume = {150},
ISSN = {1089-7690},
url = {http://dx.doi.org/10.1063/1.5090222},
DOI = {10.1063/1.5090222},
number = {15},
journal = {The Journal of Chemical Physics},
publisher = {AIP Publishing},
author = {Caldeweyher, Eike and Ehlert, Sebastian and Hansen, Andreas and Neugebauer, Hagen and Spicher, Sebastian and Bannwarth, Christoph and Grimme, Stefan},
year = {2019},
month = apr
}

@article{GrimmeD4-3,
title = {Extension and evaluation of the D4 London-dispersion model for periodic systems},
volume = {22},
ISSN = {1463-9084},
url = {http://dx.doi.org/10.1039/D0CP00502A},
DOI = {10.1039/d0cp00502a},
number = {16},
journal = {Physical Chemistry Chemical Physics},
publisher = {Royal Society of Chemistry (RSC)},
author = {Caldeweyher, Eike and Mewes, Jan-Michael and Ehlert, Sebastian and Grimme, Stefan},
year = {2020},
pages = {8499–8512}
}

@article{vdW-DF2,
title = {Higher-accuracy van der {W}aals density functional},
author = {Lee, Kyuho and Murray, \'Eamonn D. and Kong, Lingzhu and Lundqvist, Bengt I. and Langreth, David C.},
Expand Down

0 comments on commit a3b9c14

Please sign in to comment.