Skip to content

Commit 3929267

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

37 files changed

Lines changed: 14389 additions & 36176 deletions

docs/advanced/input_files/input-main.md

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

3944-
> 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.
3944+
> 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.
39453945
- **Default**: none
39463946

39473947
### vdw_d4_xc
@@ -3967,25 +3967,25 @@
39673967

39683968
- **Type**: String
39693969
- **Availability**: *[`vdw_method`](#vdw_method) in [d2, d3_0, d3_bj]*
3970-
- **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.
3970+
- **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.
39713971

39723972
### vdw_s8
39733973

39743974
- **Type**: String
39753975
- **Availability**: *[`vdw_method`](#vdw_method) in [d3_0, d3_bj]*
3976-
- **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.
3976+
- **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.
39773977

39783978
### vdw_a1
39793979

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

39843984
### vdw_a2
39853985

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

39903990
### vdw_d
39913991

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

40544054
### vdw_cutoff_radius
@@ -4070,7 +4070,7 @@
40704070
### vdw_cutoff_width2
40714071

40724072
- **Type**: Real
4073-
- **Availability**: *[`vdw_method`](#vdw_method)==d4*
4073+
- **Availability**: *[`vdw_method`](#vdw_method) in [d3_0, d3_bj, d4]*
40744074
- **Description**: Width of the smooth switching region for the two-body pairwise dispersion real-space cutoff.
40754075
A value of zero disables smoothing for the two-body contribution.
40764076
- **Default**: 0.05
@@ -4079,7 +4079,7 @@
40794079
### vdw_cutoff_width3
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 three-body Axilrod-Teller-Muto (ATM) dispersion real-space cutoff.
40844084
A value of zero disables smoothing for the three-body contribution.
40854085
- **Default**: 0.05

docs/parameters.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4168,7 +4168,7 @@ parameters:
41684168
* d4: Grimme's DFT-D4 dispersion correction method using the external DFT-D4 library
41694169
* none: no vdW correction
41704170
4171-
[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.
4171+
[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.
41724172
default_value: none
41734173
unit: ""
41744174
availability: ""
@@ -4196,31 +4196,31 @@ parameters:
41964196
category: vdW correction
41974197
type: String
41984198
description: |
4199-
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.
4199+
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.
42004200
default_value: ""
42014201
unit: ""
42024202
availability: "vdw_method in [d2, d3_0, d3_bj]"
42034203
- name: vdw_s8
42044204
category: vdW correction
42054205
type: String
42064206
description: |
4207-
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.
4207+
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.
42084208
default_value: ""
42094209
unit: ""
42104210
availability: "vdw_method in [d3_0, d3_bj]"
42114211
- name: vdw_a1
42124212
category: vdW correction
42134213
type: String
42144214
description: |
4215-
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.
4215+
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.
42164216
default_value: ""
42174217
unit: ""
42184218
availability: "vdw_method in [d3_0, d3_bj]"
42194219
- name: vdw_a2
42204220
category: vdW correction
42214221
type: String
42224222
description: |
4223-
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.
4223+
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.
42244224
default_value: ""
42254225
unit: ""
42264226
availability: "vdw_method in [d3_0, d3_bj]"
@@ -4292,7 +4292,7 @@ parameters:
42924292
description: |
42934293
Determines the method used for specifying the cutoff radius in periodic systems when applying Van der Waals correction. Available options are:
42944294
* radius: The supercell is selected within a sphere centered at the origin with a radius defined by vdw_cutoff_radius.
4295-
* period: The extent of the supercell is explicitly specified using the vdw_cutoff_period keyword.
4295+
* period: The extent of the D2 supercell is explicitly specified using the vdw_cutoff_period keyword. DFT-D3 and DFT-D4 require radius.
42964296
default_value: radius
42974297
unit: ""
42984298
availability: ""
@@ -4322,7 +4322,7 @@ parameters:
43224322
A value of zero disables smoothing for the two-body contribution.
43234323
default_value: "0.05"
43244324
unit: Bohr
4325-
availability: vdw_method==d4
4325+
availability: "vdw_method in [d3_0, d3_bj, d4]"
43264326
- name: vdw_cutoff_width3
43274327
category: vdW correction
43284328
type: Real
@@ -4331,7 +4331,7 @@ parameters:
43314331
A value of zero disables smoothing for the three-body contribution.
43324332
default_value: "0.05"
43334333
unit: Bohr
4334-
availability: vdw_method==d4
4334+
availability: "vdw_method in [d3_0, d3_bj, d4]"
43354335
- name: vdw_cutoff_period
43364336
category: vdW correction
43374337
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)