Skip to content

Commit ddb089b

Browse files
committed
Re-implement DFT-D3 against the s-dftd3 reference
1 parent 0aa8d8b commit ddb089b

38 files changed

Lines changed: 14392 additions & 36179 deletions

docs/advanced/input_files/input-main.md

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

3953-
> 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.
3953+
> 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.
39543954
- **Default**: none
39553955

39563956
### vdw_d4_xc
@@ -3976,25 +3976,25 @@
39763976

39773977
- **Type**: String
39783978
- **Availability**: *[`vdw_method`](#vdw_method) in [d2, d3_0, d3_bj]*
3979-
- **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.
3979+
- **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.
39803980

39813981
### vdw_s8
39823982

39833983
- **Type**: String
39843984
- **Availability**: *[`vdw_method`](#vdw_method) in [d3_0, d3_bj]*
3985-
- **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.
3985+
- **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.
39863986

39873987
### vdw_a1
39883988

39893989
- **Type**: String
39903990
- **Availability**: *[`vdw_method`](#vdw_method) in [d3_0, d3_bj]*
3991-
- **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.
3991+
- **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.
39923992

39933993
### vdw_a2
39943994

39953995
- **Type**: String
39963996
- **Availability**: *[`vdw_method`](#vdw_method) in [d3_0, d3_bj]*
3997-
- **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.
3997+
- **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.
39983998

39993999
### vdw_d
40004000

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

40634063
### vdw_cutoff_radius
@@ -4079,7 +4079,7 @@
40794079
### vdw_cutoff_width2
40804080

40814081
- **Type**: Real
4082-
- **Availability**: *[`vdw_method`](#vdw_method)==d4*
4082+
- **Availability**: *[`vdw_method`](#vdw_method) in [d3_0, d3_bj, d4]*
40834083
- **Description**: Width of the smooth switching region for the two-body pairwise dispersion real-space cutoff.
40844084
A value of zero disables smoothing for the two-body contribution.
40854085
- **Default**: 0.05
@@ -4088,7 +4088,7 @@
40884088
### vdw_cutoff_width3
40894089

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

docs/parameters.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4176,7 +4176,7 @@ parameters:
41764176
* d4: Grimme's DFT-D4 dispersion correction method using the external DFT-D4 library
41774177
* none: no vdW correction
41784178
4179-
[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.
4179+
[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.
41804180
default_value: none
41814181
unit: ""
41824182
availability: ""
@@ -4204,31 +4204,31 @@ parameters:
42044204
category: vdW correction
42054205
type: String
42064206
description: |
4207-
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.
4207+
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.
42084208
default_value: ""
42094209
unit: ""
42104210
availability: "vdw_method in [d2, d3_0, d3_bj]"
42114211
- name: vdw_s8
42124212
category: vdW correction
42134213
type: String
42144214
description: |
4215-
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.
4215+
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.
42164216
default_value: ""
42174217
unit: ""
42184218
availability: "vdw_method in [d3_0, d3_bj]"
42194219
- name: vdw_a1
42204220
category: vdW correction
42214221
type: String
42224222
description: |
4223-
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.
4223+
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.
42244224
default_value: ""
42254225
unit: ""
42264226
availability: "vdw_method in [d3_0, d3_bj]"
42274227
- name: vdw_a2
42284228
category: vdW correction
42294229
type: String
42304230
description: |
4231-
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.
4231+
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.
42324232
default_value: ""
42334233
unit: ""
42344234
availability: "vdw_method in [d3_0, d3_bj]"
@@ -4300,7 +4300,7 @@ parameters:
43004300
description: |
43014301
Determines the method used for specifying the cutoff radius in periodic systems when applying Van der Waals correction. Available options are:
43024302
* radius: The supercell is selected within a sphere centered at the origin with a radius defined by vdw_cutoff_radius.
4303-
* period: The extent of the supercell is explicitly specified using the vdw_cutoff_period keyword.
4303+
* period: The extent of the D2 supercell is explicitly specified using the vdw_cutoff_period keyword. DFT-D3 and DFT-D4 require radius.
43044304
default_value: radius
43054305
unit: ""
43064306
availability: ""
@@ -4330,7 +4330,7 @@ parameters:
43304330
A value of zero disables smoothing for the two-body contribution.
43314331
default_value: "0.05"
43324332
unit: Bohr
4333-
availability: vdw_method==d4
4333+
availability: "vdw_method in [d3_0, d3_bj, d4]"
43344334
- name: vdw_cutoff_width3
43354335
category: vdW correction
43364336
type: Real
@@ -4339,7 +4339,7 @@ parameters:
43394339
A value of zero disables smoothing for the three-body contribution.
43404340
default_value: "0.05"
43414341
unit: Bohr
4342-
availability: vdw_method==d4
4342+
availability: "vdw_method in [d3_0, d3_bj, d4]"
43434343
- name: vdw_cutoff_period
43444344
category: vdW correction
43454345
type: Integer Integer Integer

source/source_hamilt/module_vdw/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
set(vdw_sources
2+
vdw_xcname.cpp
23
vdwd2_parameters.cpp
3-
vdwd3_parameters_tab.cpp
4-
vdwd3_parameters.cpp
54
vdwd2.cpp
5+
vdwd3_data.cpp
6+
vdwd3_parameters.cpp
7+
vdwd3_evaluator.cpp
68
vdwd3.cpp
7-
vdwd3_autoset_xcname.cpp
8-
vdwd3_auto_xcpar.cpp
99
vdw.cpp
1010
)
1111

0 commit comments

Comments
 (0)