Skip to content

Commit 5a76019

Browse files
committed
Re-implement DFT-D3 against the s-dftd3 reference
1 parent c44750f commit 5a76019

34 files changed

Lines changed: 14275 additions & 36175 deletions

docs/advanced/input_files/input-main.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3938,7 +3938,7 @@
39383938
- d4: Grimme's DFT-D4 dispersion correction method using the external DFT-D4 library
39393939
- none: no vdW correction
39403940

3941-
> Note: ABACUS supports automatic setting of DFT-D3 parameters for common functionals. To benefit from this feature, please specify the parameter dft_functional explicitly, otherwise the autoset procedure will crash. If not satisfied with the built-in parameters, any manual setting on vdw_s6, vdw_s8, vdw_a1 and vdw_a2 will overwrite the automatic values.
3941+
> Note: DFT-D3 damping parameters are loaded from the bundled s-dftd3 v1.5.0 dataset. Individual user values overwrite the corresponding tabulated values. Setting all four of vdw_s6, vdw_s8, vdw_a1 and vdw_a2 defines a fully custom set and bypasses functional lookup.
39423942
- **Default**: none
39433943

39443944
### vdw_d4_xc
@@ -3964,25 +3964,25 @@
39643964

39653965
- **Type**: String
39663966
- **Availability**: *[`vdw_method`](#vdw_method) in [d2, d3_0, d3_bj]*
3967-
- **Description**: This scale factor is used to optimize the interaction energy deviations in van der Waals (vdW) corrected calculations. The recommended values of this parameter are dependent on the chosen vdW correction method and the DFT functional being used. For DFT-D2, the recommended values are 0.75 (PBE), 1.2 (BLYP), 1.05 (B-P86), 1.0 (TPSS), and 1.05 (B3LYP). If not set, will use values of PBE functional. For DFT-D3, recommended values with different DFT functionals can be found on the here. If not set, will search in ABACUS built-in dataset based on the dft_functional keywords. User set value will overwrite the searched value.
3967+
- **Description**: Scale factor s6. DFT-D2 keeps its established defaults; for DFT-D3, ABACUS loads the s-dftd3 value for dft_functional. A user value overwrites the selected default.
39683968

39693969
### vdw_s8
39703970

39713971
- **Type**: String
39723972
- **Availability**: *[`vdw_method`](#vdw_method) in [d3_0, d3_bj]*
3973-
- **Description**: This scale factor is relevant for D3(0) and D3(BJ) van der Waals (vdW) correction methods. The recommended values of this parameter with different DFT functionals can be found on the webpage. If not set, will search in ABACUS built-in dataset based on the dft_functional keywords. User set value will overwrite the searched value.
3973+
- **Description**: Scale factor s8 for D3(0) and D3(BJ). If not set, ABACUS loads the s-dftd3 value for dft_functional. A user value overwrites the tabulated value.
39743974

39753975
### vdw_a1
39763976

39773977
- **Type**: String
39783978
- **Availability**: *[`vdw_method`](#vdw_method) in [d3_0, d3_bj]*
3979-
- **Description**: This damping function parameter is relevant for D3(0) and D3(BJ) van der Waals (vdW) correction methods. The recommended values of this parameter with different DFT functionals can be found on the webpage. If not set, will search in ABACUS built-in dataset based on the dft_functional keywords. User set value will overwrite the searched value.
3979+
- **Description**: Damping parameter rs6 for D3(0), or a1 for D3(BJ). If not set, ABACUS loads the s-dftd3 value for dft_functional. A user value overwrites the tabulated value.
39803980

39813981
### vdw_a2
39823982

39833983
- **Type**: String
39843984
- **Availability**: *[`vdw_method`](#vdw_method) in [d3_0, d3_bj]*
3985-
- **Description**: This damping function parameter is only relevant for D3(0) and D3(BJ) van der Waals (vdW) correction methods. The recommended values of this parameter with different DFT functionals can be found on the webpage. If not set, will search in ABACUS built-in dataset based on the dft_functional keywords. User set value will overwrite the searched value.
3985+
- **Description**: Damping parameter rs8 for D3(0), or a2 for D3(BJ). If not set, ABACUS loads the s-dftd3 value for dft_functional. A user value overwrites the tabulated value.
39863986

39873987
### vdw_d
39883988

@@ -4045,7 +4045,7 @@
40454045
- **Type**: String
40464046
- **Description**: Determines the method used for specifying the cutoff radius in periodic systems when applying Van der Waals correction. Available options are:
40474047
- radius: The supercell is selected within a sphere centered at the origin with a radius defined by vdw_cutoff_radius.
4048-
- period: The extent of the supercell is explicitly specified using the vdw_cutoff_period keyword.
4048+
- period: The extent of the D2 supercell is explicitly specified using the vdw_cutoff_period keyword. DFT-D3 and DFT-D4 require radius.
40494049
- **Default**: radius
40504050

40514051
### vdw_cutoff_radius
@@ -4067,7 +4067,7 @@
40674067
### vdw_cutoff_smooth_width_2b
40684068

40694069
- **Type**: Real
4070-
- **Availability**: *[`vdw_method`](#vdw_method)==d4*
4070+
- **Availability**: *[`vdw_method`](#vdw_method) in [d3_0, d3_bj, d4]*
40714071
- **Description**: Width of the smooth switching region for the two-body pairwise dispersion real-space cutoff.
40724072
A value of zero disables smoothing for the two-body contribution.
40734073
- **Default**: 0.05
@@ -4076,7 +4076,7 @@
40764076
### vdw_cutoff_smooth_width_3b
40774077

40784078
- **Type**: Real
4079-
- **Availability**: *[`vdw_method`](#vdw_method)==d4*
4079+
- **Availability**: *[`vdw_method`](#vdw_method) in [d3_0, d3_bj, d4]*
40804080
- **Description**: Width of the smooth switching region for the three-body Axilrod-Teller-Muto (ATM) dispersion real-space cutoff.
40814081
A value of zero disables smoothing for the three-body contribution.
40824082
- **Default**: 0.05

docs/parameters.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4166,7 +4166,7 @@ parameters:
41664166
* d4: Grimme's DFT-D4 dispersion correction method using the external DFT-D4 library
41674167
* none: no vdW correction
41684168
4169-
[NOTE] ABACUS supports automatic setting of DFT-D3 parameters for common functionals. To benefit from this feature, please specify the parameter dft_functional explicitly, otherwise the autoset procedure will crash. If not satisfied with the built-in parameters, any manual setting on vdw_s6, vdw_s8, vdw_a1 and vdw_a2 will overwrite the automatic values.
4169+
[NOTE] DFT-D3 damping parameters are loaded from the bundled s-dftd3 v1.5.0 dataset. Individual user values overwrite the corresponding tabulated values. Setting all four of vdw_s6, vdw_s8, vdw_a1 and vdw_a2 defines a fully custom set and bypasses functional lookup.
41704170
default_value: none
41714171
unit: ""
41724172
availability: ""
@@ -4194,31 +4194,31 @@ parameters:
41944194
category: vdW correction
41954195
type: String
41964196
description: |
4197-
This scale factor is used to optimize the interaction energy deviations in van der Waals (vdW) corrected calculations. The recommended values of this parameter are dependent on the chosen vdW correction method and the DFT functional being used. For DFT-D2, the recommended values are 0.75 (PBE), 1.2 (BLYP), 1.05 (B-P86), 1.0 (TPSS), and 1.05 (B3LYP). If not set, will use values of PBE functional. For DFT-D3, recommended values with different DFT functionals can be found on the here. If not set, will search in ABACUS built-in dataset based on the dft_functional keywords. User set value will overwrite the searched value.
4197+
Scale factor s6. DFT-D2 keeps its established defaults; for DFT-D3, ABACUS loads the s-dftd3 value for dft_functional. A user value overwrites the selected default.
41984198
default_value: ""
41994199
unit: ""
42004200
availability: "vdw_method in [d2, d3_0, d3_bj]"
42014201
- name: vdw_s8
42024202
category: vdW correction
42034203
type: String
42044204
description: |
4205-
This scale factor is relevant for D3(0) and D3(BJ) van der Waals (vdW) correction methods. The recommended values of this parameter with different DFT functionals can be found on the webpage. If not set, will search in ABACUS built-in dataset based on the dft_functional keywords. User set value will overwrite the searched value.
4205+
Scale factor s8 for D3(0) and D3(BJ). If not set, ABACUS loads the s-dftd3 value for dft_functional. A user value overwrites the tabulated value.
42064206
default_value: ""
42074207
unit: ""
42084208
availability: "vdw_method in [d3_0, d3_bj]"
42094209
- name: vdw_a1
42104210
category: vdW correction
42114211
type: String
42124212
description: |
4213-
This damping function parameter is relevant for D3(0) and D3(BJ) van der Waals (vdW) correction methods. The recommended values of this parameter with different DFT functionals can be found on the webpage. If not set, will search in ABACUS built-in dataset based on the dft_functional keywords. User set value will overwrite the searched value.
4213+
Damping parameter rs6 for D3(0), or a1 for D3(BJ). If not set, ABACUS loads the s-dftd3 value for dft_functional. A user value overwrites the tabulated value.
42144214
default_value: ""
42154215
unit: ""
42164216
availability: "vdw_method in [d3_0, d3_bj]"
42174217
- name: vdw_a2
42184218
category: vdW correction
42194219
type: String
42204220
description: |
4221-
This damping function parameter is only relevant for D3(0) and D3(BJ) van der Waals (vdW) correction methods. The recommended values of this parameter with different DFT functionals can be found on the webpage. If not set, will search in ABACUS built-in dataset based on the dft_functional keywords. User set value will overwrite the searched value.
4221+
Damping parameter rs8 for D3(0), or a2 for D3(BJ). If not set, ABACUS loads the s-dftd3 value for dft_functional. A user value overwrites the tabulated value.
42224222
default_value: ""
42234223
unit: ""
42244224
availability: "vdw_method in [d3_0, d3_bj]"
@@ -4290,7 +4290,7 @@ parameters:
42904290
description: |
42914291
Determines the method used for specifying the cutoff radius in periodic systems when applying Van der Waals correction. Available options are:
42924292
* radius: The supercell is selected within a sphere centered at the origin with a radius defined by vdw_cutoff_radius.
4293-
* period: The extent of the supercell is explicitly specified using the vdw_cutoff_period keyword.
4293+
* period: The extent of the D2 supercell is explicitly specified using the vdw_cutoff_period keyword. DFT-D3 and DFT-D4 require radius.
42944294
default_value: radius
42954295
unit: ""
42964296
availability: ""
@@ -4320,7 +4320,7 @@ parameters:
43204320
A value of zero disables smoothing for the two-body contribution.
43214321
default_value: "0.05"
43224322
unit: Bohr
4323-
availability: vdw_method==d4
4323+
availability: "vdw_method in [d3_0, d3_bj, d4]"
43244324
- name: vdw_cutoff_smooth_width_3b
43254325
category: vdW correction
43264326
type: Real
@@ -4329,7 +4329,7 @@ parameters:
43294329
A value of zero disables smoothing for the three-body contribution.
43304330
default_value: "0.05"
43314331
unit: Bohr
4332-
availability: vdw_method==d4
4332+
availability: "vdw_method in [d3_0, d3_bj, d4]"
43334333
- name: vdw_cutoff_period
43344334
category: vdW correction
43354335
type: Integer Integer Integer

source/source_hamilt/module_vdw/CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
set(vdw_sources
22
vdwd2_parameters.cpp
3-
vdwd3_parameters_tab.cpp
4-
vdwd3_parameters.cpp
53
vdwd2.cpp
4+
vdwd3_data.cpp
5+
vdwd3_parameters.cpp
6+
vdwd3_evaluator.cpp
67
vdwd3.cpp
7-
vdwd3_autoset_xcname.cpp
8-
vdwd3_auto_xcpar.cpp
98
vdw.cpp
109
)
1110

0 commit comments

Comments
 (0)