From 256c6ad99024cfb7f7a3b08aab459b31144e5dbd Mon Sep 17 00:00:00 2001 From: Sebastian Ehlert Date: Sat, 28 Sep 2024 17:37:40 +0200 Subject: [PATCH 1/8] Add citations for damping parameters --- app/cli.f90 | 14 + app/driver.f90 | 15 +- assets/parameters.toml | 28 +- src/dftd3/CMakeLists.txt | 1 + src/dftd3/citation.f90 | 112 +++++++ src/dftd3/meson.build | 1 + src/dftd3/param.f90 | 699 ++++++++++++++++++++++++++++++++++++++- 7 files changed, 857 insertions(+), 13 deletions(-) create mode 100644 src/dftd3/citation.f90 diff --git a/app/cli.f90 b/app/cli.f90 index 3719cbbc..a7cbcd20 100644 --- a/app/cli.f90 +++ b/app/cli.f90 @@ -55,6 +55,8 @@ module dftd3_app_cli logical :: has_param = .false. integer :: verbosity = 2 logical :: pair_resolved = .false. + logical :: citation = .false. + character(len=:), allocatable :: citation_output !> Parameter data base character(len=:), allocatable :: db end type run_config @@ -212,6 +214,18 @@ subroutine get_run_arguments(config, list, start, error) end if call move_alloc(arg, config%json_output) end if + case("--citation") + config%citation = .true. + config%citation_output = "dftd3.bib" + iarg = iarg + 1 + call list%get(iarg, arg) + if (allocated(arg)) then + if (arg(1:1) == "-") then + iarg = iarg - 1 + cycle + end if + call move_alloc(arg, config%citation_output) + end if case("--property") config%properties = .true. case("--pair-resolved") diff --git a/app/driver.f90 b/app/driver.f90 index 23d5b11f..e9a86612 100644 --- a/app/driver.f90 +++ b/app/driver.f90 @@ -21,6 +21,7 @@ module dftd3_app_driver use dftd3 use dftd3_output use dftd3_utils + use dftd3_citation, only : format_bibtex use dftd3_app_help, only : header use dftd3_app_cli, only : app_config, run_config, param_config, get_arguments use dftd3_app_toml, only : param_database @@ -55,7 +56,8 @@ subroutine run_driver(config, error) real(wp), allocatable :: pair_disp2(:, :), pair_disp3(:, :) real(wp), allocatable :: s9 real(wp) :: energy - integer :: stat, unit + character(len=:), allocatable :: output + integer :: stat, unit, idx logical :: exist if (config%verbosity > 1) then @@ -255,6 +257,17 @@ subroutine run_driver(config, error) end if + if (config%citation .and. allocated(inp%citation)) then + open(file=config%citation_output, newunit=unit) + call format_bibtex(output, inp%citation) + if (allocated(output)) write(unit, '(a)') output + close(unit) + if (config%verbosity > 0) then + write(output_unit, '(a)') & + & "[Info] Citation information written to '"//config%citation_output//"'" + end if + end if + end subroutine run_driver subroutine property_calc(unit, mol, disp, verbosity) diff --git a/assets/parameters.toml b/assets/parameters.toml index e55cd457..4c3d9121 100644 --- a/assets/parameters.toml +++ b/assets/parameters.toml @@ -8,6 +8,9 @@ d3.bjm = {s6=1.0, s9=1.0, alp=14.0, damping="rational"} d3.zerom = {s6=1.0, s9=1.0, rs8=1.0, alp=14.0, damping="mzero"} d3.op = {s9=1.0, alp=14.0, damping="optimizedpower"} +[parameter.slaterdirac] +d3.zero = {rs6=0.999, s8=-1.957, rs8=0.697} + [parameter.bp] d3.bj = {a1=0.3946, s8=3.2822, a2=4.8516, doi="10.1002/jcc.21759"} d3.zero = {rs6=1.139, s8=1.683, doi="10.1063/1.3382344"} @@ -50,6 +53,7 @@ d3.op = {s6=0.91826, s8=0.0, a1=0.200, a2=4.750, bet=6.0, doi="10.1021/acs.jctc. [parameter.rpw86pbe] d3.bj = {a1=0.4613, s8=1.3845, a2=4.5062, doi="10.1002/jcc.21759"} +d3.zero = {rs6=1.224, s8=0.901} [parameter.b3lyp] d3.bj = {a1=0.3981, s8=1.9889, a2=4.4211, doi="10.1002/jcc.21759"} @@ -65,6 +69,7 @@ d3.op = {s6=1.0, s8=0.51581, a1=0.575, a2=3.00, bet=8.0, doi="10.1021/acs.jctc.7 [parameter.hf] d3.bj = {a1=0.3385, s8=0.9171, a2=2.8830, doi="10.1002/jcc.21759"} +d3.zero = {rs6=1.158, s8=1.746} [parameter.tpss0] d3.bj = {a1=0.3768, s8=1.2576, a2=4.5865, doi="10.1002/jcc.21759"} @@ -83,9 +88,11 @@ d3.zero = {rs6=1.129, s8=0.109, doi="10.1021/jp501237c"} [parameter.revpbe38] d3.bj = {a1=0.4309, s8=1.4760, a2=3.9446, doi="10.1039/c0cp02984j"} +d3.zero = {rs6=1.021, s8=0.862} [parameter.pw6b95] d3.bj = {a1=0.2076, s8=0.7257, a2=6.3750, doi="10.1039/c0cp02984j"} +d3.zero = {rs6=1.532, s8=0.862} [parameter.b2plyp] d3.bj = {a1=0.3065, s8=0.9147, a2=5.0570, s6=0.64, doi="10.1039/c0cp02984j"} @@ -151,12 +158,15 @@ d3.zero = {rs6=0.837, s8=2.033, doi="10.1039/c0cp02984j"} [parameter.ssb] d3.bj = {a1=-0.0952, s8=-0.1744, a2=5.2170, doi="10.1039/c0cp02984j"} +d3.zero = {rs6=1.215, s8=0.663, doi="10.1039/c0cp02984j"} [parameter.revssb] d3.bj = {a1=0.4720, s8=0.4389, a2=4.0986, doi="10.1039/c0cp02984j"} +d3.zero = {rs6=1.221, s8=0.560, doi="10.1039/c0cp02984j"} [parameter.otpss] d3.bj = {a1=0.4634, s8=2.7495, a2=4.3153, doi="10.1039/c0cp02984j"} +d3.zero = {rs6=1.128, s8=1.494, doi="10.1039/c0cp02984j"} [parameter.b3pw91] d3.bj = {a1=0.4312, s8=2.8524, a2=4.4693, doi="10.1039/c0cp02984j"} @@ -177,9 +187,11 @@ d3.op = {s6=1.0, s8=0.43185, a1=0.575, a2=3.00, bet=8.0, doi="10.1021/acs.jctc.7 [parameter.mpw1b95] d3.bj = {a1=0.1955, s8=1.0508, a2=6.4177, doi="10.1039/c0cp02984j"} +d3.zero = {rs6=1.605, s8=1.118, doi="10.1039/c0cp02984j"} [parameter.pwb6k] d3.bj = {a1=0.1805, s8=0.9383, a2=7.7627, doi="10.1039/c0cp02984j"} +d3.zero = {rs6=1.660, s8=0.550, doi="10.1039/c0cp02984j"} [parameter.b1b95] d3.bj = {a1=0.2092, s8=1.4507, a2=5.5545, doi="10.1039/c0cp02984j"} @@ -191,6 +203,7 @@ d3.zero = {rs6=1.931, s8=2.168, doi="10.1039/c0cp02984j"} [parameter.camb3lyp] d3.bj = {a1=0.3708, s8=2.0674, a2=5.4743, doi="10.1039/c0cp02984j"} +d3.zero = {rs6=1.378, s8=1.217, doi="10.1039/c0cp02984j"} [parameter.lcwpbe] d3.bj = {a1=0.3919, s8=1.8541, a2=5.0897, doi="10.1039/c0cp02984j"} @@ -204,6 +217,7 @@ d3.zero = {rs6=1.586, s8=0.760, s6=0.56, doi="10.1021/ct100466k"} [parameter.ptpss] d3.bj = {a1=0.0000, s8=0.2804, a2=6.5745, s6=0.750, doi="10.1039/c0cp02984j"} +d3.zero = {rs6=1.541, s8=0.879, s6=0.75, doi="10.1021/ct100466k"} [parameter.pwpb95] d3.bj = {a1=0.0000, s8=0.2904, a2=7.3141, s6=0.820, doi="10.1039/c0cp02984j"} @@ -228,8 +242,8 @@ d3.bj = {a1=0.3563, s8=1.0821, a2=4.3359} d3.bj = {a1=0.5719, s8=0.5883, a2=3.6017} [parameter.pw1pw] -d3.bj = {a1=0.3807, s8=2.3363, a2=5.8844} -d3.zero = {rs6=1.4968, s8=1.1786, doi="10.1039/C7CP04913G"} +d3.bj = {a1=0.3807, s8=2.3363, a2=5.8844, doi="10.1039/c7cp04913g"} +d3.zero = {rs6=1.4968, s8=1.1786, doi="10.1039/c7cp04913g"} [parameter.pwgga] d3.bj = {a1=0.2211, s8=2.6910, a2=6.7278} @@ -413,7 +427,7 @@ d3.bj = {a1=0.2746, s8=1.1908, a2=5.3157, doi="10.1039/c7cp04913g"} [parameter.mpw2plyp] d3.bj = {s6=0.66, a1=0.4105, s8=0.6223, a2=5.0136, doi="10.1039/c7cp04913g"} -d3.zero = {s6=0.66, rs6=1.5527, s8=0.7529, doi="10.1039/C7CP04913G"} +d3.zero = {s6=0.66, rs6=1.5527, s8=0.7529, doi="10.1039/c7cp04913g"} [parameter.ms2] d3.op = {s6=1.0, s8=0.90743, a1=0.700, a2=4.00, bet=2.0, doi="10.1021/acs.jctc.7b00176"} @@ -469,14 +483,6 @@ d3.bj = {s6=0.3012, a1=0.0, s8=0.0, a2=4.5050, doi="10.1021/acs.jpca.1c01295"} [parameter.dsdpbep86_2011] d3.bj = {s6=0.418, a1=0.0, s8=0.0, a2=5.65, doi="10.1039/c1cp22592h"} -# dRPA75-D3(BJ) from MRCC source code -[parameter.drpa75_mrcc] -d3.bj = {s6=0.375, a1=0.0, s8=0.0, a2=4.505} - -# SCS-dRPA75-D3(BJ) from MRCC source code -[parameter.scsdrpa75_mrcc] -d3.bj = {s6=0.375, a1=0.0, s8=0.0, a2=4.505} - [parameter.dsdsvwn5] d3.bj = {s6=0.46, a1=0.0, s8=0.0, a2=5.6, doi="10.1002/jcc.23391"} diff --git a/src/dftd3/CMakeLists.txt b/src/dftd3/CMakeLists.txt index 0bf808de..f15715f0 100644 --- a/src/dftd3/CMakeLists.txt +++ b/src/dftd3/CMakeLists.txt @@ -21,6 +21,7 @@ set(dir "${CMAKE_CURRENT_SOURCE_DIR}") list( APPEND srcs + "${dir}/citation.f90" "${dir}/cutoff.f90" "${dir}/damping.f90" "${dir}/data.f90" diff --git a/src/dftd3/citation.f90 b/src/dftd3/citation.f90 new file mode 100644 index 00000000..b931b268 --- /dev/null +++ b/src/dftd3/citation.f90 @@ -0,0 +1,112 @@ +! This file is part of s-dftd3. +! SPDX-Identifier: LGPL-3.0-or-later +! +! s-dftd3 is free software: you can redistribute it and/or modify it under +! the terms of the GNU Lesser General Public License as published by +! the Free Software Foundation, either version 3 of the License, or +! (at your option) any later version. +! +! s-dftd3 is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public License +! along with s-dftd3. If not, see . + +module dftd3_citation + implicit none + private + + public :: citation_type, author_name, new_citation + public :: format_bibtex + + type :: author_name + character(len=:), allocatable :: name + end type author_name + + interface author_name + module procedure :: new_author + end interface author_name + + type :: citation_type + character(len=:), allocatable :: title + type(author_name), allocatable :: author(:) + character(len=:), allocatable :: issue + character(len=:), allocatable :: journal + character(len=:), allocatable :: volume + character(len=:), allocatable :: year + character(len=:), allocatable :: pages + character(len=:), allocatable :: doi + end type citation_type + + character(len=*), parameter :: nl = new_line('a') + +contains + +pure function new_citation(title, author, journal, issue, volume, year, pages, doi) result(citation) + character(len=*), intent(in) :: title + type(author_name), intent(in) :: author(:) + character(len=*), intent(in) :: journal + character(len=*), intent(in), optional :: issue + character(len=*), intent(in) :: volume + character(len=*), intent(in) :: year + character(len=*), intent(in) :: pages + character(len=*), intent(in) :: doi + type(citation_type) :: citation + + citation%title = title + citation%author = author + citation%journal = journal + citation%volume = volume + citation%year = year + citation%pages = pages + citation%doi = doi + if (present(issue)) citation%issue = issue +end function new_citation + +pure function new_author(name) result(author) + character(len=*), intent(in) :: name + type(author_name) :: author + author%name = name +end function new_author + +subroutine format_bibtex(string, citation) + character(len=:), allocatable, intent(out) :: string + class(citation_type), intent(in) :: citation + integer :: idx + + if (.not.(allocated(citation%doi) & + & .and.allocated(citation%title) & + & .and.allocated(citation%author) & + & .and.allocated(citation%journal) & + & .and.allocated(citation%volume) & + & .and.allocated(citation%year) & + & .and.allocated(citation%pages) & + )) then + return + end if + + string = & + & "@article{" // citation%doi // "," // nl // & + & " title = {{" // citation%title // "}}," // nl // & + & " author = {" // citation%author(1)%name // nl + do idx = 2, size(citation%author) + string = string // & + & " and " // citation%author(idx)%name // nl + end do + string = string // & + & " }," // nl + if (allocated(citation%issue)) then + string = string // & + & " issue = {" // citation%issue // "}," // nl + end if + string = string // & + & " volume = {" // citation%volume // "}," // nl // & + & " pages = {" // citation%pages // "}," // nl // & + & " doi = {" // citation%doi // "}," // nl // & + & " url = {https://doi.org/" // citation%doi // "}" // nl // & + & "}" +end subroutine format_bibtex + +end module dftd3_citation \ No newline at end of file diff --git a/src/dftd3/meson.build b/src/dftd3/meson.build index 8d4a267d..97b81163 100644 --- a/src/dftd3/meson.build +++ b/src/dftd3/meson.build @@ -18,6 +18,7 @@ subdir('damping') subdir('data') srcs += files( + 'citation.f90', 'cutoff.f90', 'damping.f90', 'data.f90', diff --git a/src/dftd3/param.f90 b/src/dftd3/param.f90 index 5e8a5404..a95f9cd4 100644 --- a/src/dftd3/param.f90 +++ b/src/dftd3/param.f90 @@ -16,6 +16,7 @@ module dftd3_param use mctc_env, only : wp, error_type, fatal_error + use dftd3_citation, only : citation_type, author_name, new_citation implicit none public :: d3_param @@ -34,6 +35,7 @@ module dftd3_param real(wp) :: a2 = 5.0_wp real(wp) :: alp = 14.0_wp real(wp) :: bet = 0.0_wp + type(citation_type), allocatable :: citation end type d3_param @@ -57,7 +59,7 @@ module dftd3_param & p_mpw1kcis_df, p_pbeh1pbe_df, p_pbe1kcis_df, p_x3lyp_df, p_o3lyp_df, & & p_b97_1_df, p_b97_2_df, p_b98_df, p_hiss_df, p_hse03_df, p_revtpssh_df, & & p_revtpss0_df, p_tpss1kcis_df, p_tauhcthhyb_df, p_mn15_df, p_lc_whpbe_df, & - & p_mpw2plyp_df, p_m11_df, p_sogga11x_df, p_n12sx_df, p_mn12sx_df, & + & p_mpw2plyp_df, p_m11_df, p_sogga11x_df, p_n12sx_df, p_mn12sx_df, p_mn12l_df, & & p_ms2_df, p_ms2h_df, p_mpw1lyp_df, p_mpwkcis1k_df, p_pkzb_df, p_n12_df, & & p_m08hx_df, p_m11l_df, p_mn15l_df, p_pwp_df, p_r2scanh_df, p_r2scan0_df, & & p_r2scan50_df, p_b973c_df, p_dm21_df, p_dm21m_df, p_dm21mc_df, p_dm21mu_df, & @@ -78,6 +80,34 @@ module dftd3_param & p_dod_pbep86_df, p_dod_pbeb95_df, p_dod_hsep86_df, p_dod_pbehb95_df end enum + character(len=*), parameter :: & + & doi_dftd3_0 = "10.1063/1.3382344", & + & doi_dftd3_bj = "10.1002/jcc.21759", & + & doi_dftd3_m = "10.1021/acs.jpclett.6b00780", & + & doi_dftd3_op = "10.1021/acs.jctc.7b00176", & + & doi_gmtkn30_0 = "10.1021/ct100466k", & + & doi_gmtkn30_bj = "10.1039/c0cp02984j", & + & doi_gmtkn55 = "10.1039/c7cp04913g", & + & doi_dsd = "10.1002/jcc.23391", & + & doi_dsdpbep86 = "10.1039/c1cp22592h", & + & doi_drpa = "10.1021/acs.jpca.1c01295", & + & doi_revdsd = "10.1021/acs.jpca.9b03157", & + & doi_pw91_d3 = "10.1073/pnas.1516984112", & + & doi_r2scan_d4 = "10.1063/5.0041008", & + & doi_scan_d3 = "10.1103/physrevb.94.115144", & + & doi_pbeh3c = "10.1063/1.4927476", & + & doi_hse3c = "10.1039/c6cp01697a", & + & doi_b973c = "10.1063/1.5012601", & + & doi_hf3c = "10.1002/jcc.23317", & + & doi_gcp = "10.1063/1.3700154", & + & doi_d3pbc = "10.1002/cphc.201100521", & + & doi_r2scan_hyb = "10.1063/5.0086040", & + & doi_r2scan_dhdf = "10.1063/5.0174988", & + & doi_minnesota_d3 = "10.1021/acs.jpclett.5b01591", & + & doi_b97m_d3 = "10.1021/acs.jctc.8b00842", & + & doi_wb97x_d3 = "10.1021/ct300715s", & + & doi_hse06_d3 = "10.1021/jp501237c" + contains @@ -201,6 +231,7 @@ function get_method_id(method) result(id) case("m08hx"); id = p_m08hx_df case("m11"); id = p_m11_df case("m11l"); id = p_m11l_df + case("mn12l"); id = p_mn12l_df case("mn12sx"); id = p_mn12sx_df case("mn15"); id = p_mn15_df case("mn15l"); id = p_mn15l_df @@ -295,318 +326,479 @@ subroutine get_rational_damping(param, method, error, s9) !> Error handling type(error_type), allocatable, intent(out) :: error + character(len=:), allocatable :: doi + select case(get_method_id(method)) case default call fatal_error(error, "No entry for '"//method//"' present") return case(p_bp_df) param = d3_param(a1=0.3946_wp, s8=3.2822_wp, a2=4.8516_wp) + doi = doi_dftd3_bj case(p_blyp_df) param = d3_param(a1=0.4298_wp, s8=2.6996_wp, a2=4.2359_wp) + doi = doi_dftd3_bj case(p_revpbe_df) param = d3_param(a1=0.5238_wp, s8=2.3550_wp, a2=3.5016_wp) + doi = doi_dftd3_bj case(p_rpbe_df) param = d3_param(a1=0.1820_wp, s8=0.8318_wp, a2=4.0094_wp) + ! TODO: find reference (it is not GMTKN55) case(p_b97d_df) param = d3_param(a1=0.5545_wp, s8=2.2609_wp, a2=3.2297_wp) + doi = doi_dftd3_bj case(p_b973c_df) param = d3_param(a1=0.37_wp, s8=1.50_wp, a2=4.10_wp) + doi = doi_b973c case(p_pbe_df) param = d3_param(a1=0.4289_wp, s8=0.7875_wp, a2=4.4407_wp) + doi = doi_dftd3_bj case(p_rpw86pbe_df) param = d3_param(a1=0.4613_wp, s8=1.3845_wp, a2=4.5062_wp) + doi = doi_dftd3_bj case(p_b3lyp_df, p_b3lyp_g_df, p_dm21_df, p_dm21m_df, p_dm21mc_df, p_dm21mu_df) param = d3_param(a1=0.3981_wp, s8=1.9889_wp, a2=4.4211_wp) + doi = doi_dftd3_bj case(p_tpss_df) param = d3_param(a1=0.4535_wp, s8=1.9435_wp, a2=4.4752_wp) + doi = doi_dftd3_bj case(p_hf_df) param = d3_param(a1=0.3385_wp, s8=0.9171_wp, a2=2.8830_wp) + doi = doi_dftd3_bj case(p_tpss0_df) param = d3_param(a1=0.3768_wp, s8=1.2576_wp, a2=4.5865_wp) + doi = doi_dftd3_bj case(p_pbe0_df) param = d3_param(a1=0.4145_wp, s8=1.2177_wp, a2=4.8593_wp) + doi = doi_dftd3_bj case(p_hse06_df) param = d3_param(a1=0.383_wp, s8=2.310_wp, a2=5.685_wp) + doi = doi_hse06_d3 case(p_revpbe38_df) param = d3_param(a1=0.4309_wp, s8=1.4760_wp, a2=3.9446_wp) + doi = doi_gmtkn30_bj case(p_pw6b95_df) param = d3_param(a1=0.2076_wp, s8=0.7257_wp, a2=6.3750_wp) + doi = doi_gmtkn30_bj case(p_b2plyp_df) param = d3_param(a1=0.3065_wp, s8=0.9147_wp, a2=5.0570_wp, s6=0.64_wp) + doi = doi_gmtkn30_bj case(p_dsdblyp_df) param = d3_param(a1=0.0000_wp, s8=0.2130_wp, a2=6.0519_wp, s6=0.50_wp) + doi = doi_gmtkn30_bj case(p_dsdblypfc_df) param = d3_param(a1=0.0009_wp, s8=0.2112_wp, a2=5.9807_wp, s6=0.50_wp) + doi = doi_gmtkn30_bj case(p_bop_df) param = d3_param(a1=0.4870_wp, s8=3.2950_wp, a2=3.5043_wp) + doi = doi_gmtkn30_bj case(p_mpwlyp_df) param = d3_param(a1=0.4831_wp, s8=2.0077_wp, a2=4.5323_wp) + doi = doi_gmtkn30_bj case(p_olyp_df) param = d3_param(a1=0.5299_wp, s8=2.6205_wp, a2=2.8065_wp) + doi = doi_gmtkn30_bj case(p_pbesol_df) param = d3_param(a1=0.4466_wp, s8=2.9491_wp, a2=6.1742_wp) + doi = doi_gmtkn30_bj case(p_bpbe_df) param = d3_param(a1=0.4567_wp, s8=4.0728_wp, a2=4.3908_wp) + doi = doi_gmtkn30_bj case(p_opbe_df) param = d3_param(a1=0.5512_wp, s8=3.3816_wp, a2=2.9444_wp) + doi = doi_gmtkn30_bj case(p_ssb_df) param = d3_param(a1=-0.0952_wp, s8=-0.1744_wp, a2=5.2170_wp) + doi = doi_gmtkn30_bj case(p_revssb_df) param = d3_param(a1=0.4720_wp, s8=0.4389_wp, a2=4.0986_wp) + doi = doi_gmtkn30_bj case(p_otpss_df) param = d3_param(a1=0.4634_wp, s8=2.7495_wp, a2=4.3153_wp) + doi = doi_gmtkn30_bj case(p_b3pw91_df) param = d3_param(a1=0.4312_wp, s8=2.8524_wp, a2=4.4693_wp) + doi = doi_gmtkn30_bj case(p_bhlyp_df) param = d3_param(a1=0.2793_wp, s8=1.0354_wp, a2=4.9615_wp) + doi = doi_gmtkn30_bj case(p_revpbe0_df) param = d3_param(a1=0.4679_wp, s8=1.7588_wp, a2=3.7619_wp) + doi = doi_gmtkn30_bj case(p_tpssh_df) param = d3_param(a1=0.4529_wp, s8=2.2382_wp, a2=4.6550_wp) + doi = doi_gmtkn30_bj case(p_mpw1b95_df) param = d3_param(a1=0.1955_wp, s8=1.0508_wp, a2=6.4177_wp) + doi = doi_gmtkn30_bj case(p_pwb6k_df) param = d3_param(a1=0.1805_wp, s8=0.9383_wp, a2=7.7627_wp) + doi = doi_gmtkn30_bj case(p_b1b95_df) param = d3_param(a1=0.2092_wp, s8=1.4507_wp, a2=5.5545_wp) + doi = doi_gmtkn30_bj case(p_bmk_df) param = d3_param(a1=0.1940_wp, s8=2.0860_wp, a2=5.9197_wp) + doi = doi_gmtkn30_bj case(p_camb3lyp_df) param = d3_param(a1=0.3708_wp, s8=2.0674_wp, a2=5.4743_wp) + doi = doi_gmtkn30_bj case(p_lcwpbe_df) param = d3_param(a1=0.3919_wp, s8=1.8541_wp, a2=5.0897_wp) + doi = doi_gmtkn30_bj case(p_b2gpplyp_df) param = d3_param(a1=0.0000_wp, s8=0.2597_wp, a2=6.3332_wp, s6=0.560_wp) + doi = doi_gmtkn30_bj case(p_ptpss_df) param = d3_param(a1=0.0000_wp, s8=0.2804_wp, a2=6.5745_wp, s6=0.750_wp) + doi = doi_gmtkn30_bj case(p_pwpb95_df) param = d3_param(a1=0.0000_wp, s8=0.2904_wp, a2=7.3141_wp, s6=0.820_wp) + doi = doi_gmtkn30_bj case(p_pw91_df) param = d3_param(a1=0.6319_wp, s8=1.9598_wp, a2=4.5718_wp) + doi = doi_pw91_d3 case(p_hf_mixed_df) param = d3_param(a1=0.5607_wp, s8=3.9027_wp, a2=4.5622_wp) + doi = doi_gcp case(p_hf_sv_df) param = d3_param(a1=0.4249_wp, s8=2.1849_wp, a2=4.2783_wp) + doi = doi_gcp case(p_hf_minis_df) param = d3_param(a1=0.1702_wp, s8=0.9841_wp, a2=3.8506_wp) + doi = doi_gcp case(p_b3lyp_631gd_df) param = d3_param(a1=0.5014_wp, s8=4.0672_wp, a2=4.8409_wp) + doi = doi_gcp case(p_hcth120_df) param = d3_param(a1=0.3563_wp, s8=1.0821_wp, a2=4.3359_wp) + ! TODO: find reference case(p_dftb3_df) param = d3_param(a1=0.5719_wp, s8=0.5883_wp, a2=3.6017_wp) + ! TODO: find reference case(p_pw1pw_df) param = d3_param(a1=0.3807_wp, s8=2.3363_wp, a2=5.8844_wp) + doi = doi_gmtkn55 case(p_pwgga_df) param = d3_param(a1=0.2211_wp, s8=2.6910_wp, a2=6.7278_wp) + ! TODO: find reference case(p_hsesol_df) param = d3_param(a1=0.4650_wp, s8=2.9215_wp, a2=6.2003_wp) + ! TODO: find reference case(p_hf3c_df) param = d3_param(a1=0.4171_wp, s8=0.8777_wp, a2=2.9149_wp) + doi = doi_hf3c case(p_hf3cv_df) param = d3_param(a1=0.3063_wp, s8=0.5022_wp, a2=3.9856_wp) + doi = doi_hf3c case(p_pbeh3c_df) param = d3_param(a1=0.4860_wp, s8=0.0000_wp, a2=4.5000_wp) + doi = doi_pbeh3c case(p_scan_df) param = d3_param(a1=0.5380_wp, s8=0.0000_wp, a2=5.4200_wp) + doi = doi_scan_d3 case(p_rscan_df) param = d3_param(a1=0.47023427_wp, s8=1.08859014_wp, a2=5.73408312_wp) + doi = doi_r2scan_d4 case(p_r2scan_df) param = d3_param(a1=0.49484001_wp, s8=0.78981345_wp, a2=5.73083694_wp) + doi = doi_r2scan_d4 case(p_r2scanh_df) param = d3_param(s8=1.1236_wp, a1=0.4709_wp, a2=5.9157_wp) + doi = doi_r2scan_hyb case(p_r2scan0_df) param = d3_param(s8=1.1846_wp, a1=0.4534_wp, a2=5.8972_wp) + doi = doi_r2scan_hyb case(p_r2scan50_df) param = d3_param(s8=1.3294_wp, a1=0.4311_wp, a2=5.9240_wp) + doi = doi_r2scan_hyb case(p_wb97x_df) param = d3_param(a1=0.0000_wp, s8=0.2641_wp, a2=5.4959_wp) + ! TODO: find reference case(p_wb97m_df) param = d3_param(a1=0.5660_wp, s8=0.3908_wp, a2=3.1280_wp) + doi = doi_b97m_d3 case(p_b97m_df) param = d3_param(a1=-0.0780_wp, s8=0.1384_wp, a2=5.5946_wp) + doi = doi_b97m_d3 case(p_pbehpbe_df) param = d3_param(a1=0.0000_wp, s8=1.1152_wp, a2=6.7184_wp) + doi = doi_gmtkn55 case(p_xlyp_df) param = d3_param(a1=0.0809_wp, s8=1.5669_wp, a2=5.3166_wp) + doi = doi_gmtkn55 case(p_mpwpw_df) param = d3_param(a1=0.3168_wp, s8=1.7974_wp, a2=4.7732_wp) + doi = doi_gmtkn55 case(p_hcth407_df) param = d3_param(a1=0.0000_wp, s8=0.6490_wp, a2=4.8162_wp) + doi = doi_gmtkn55 case(p_revtpss_df) param = d3_param(a1=0.4326_wp, s8=1.4023_wp, a2=4.4723_wp) + doi = doi_gmtkn55 case(p_tauhcth_df) param = d3_param(a1=0.0000_wp, s8=1.2626_wp, a2=5.6162_wp) + doi = doi_gmtkn55 case(p_b3p_df) param = d3_param(a1=0.4601_wp, s8=3.3211_wp, a2=4.9858_wp) + doi = doi_gmtkn55 case(p_b1p_df) param = d3_param(a1=0.4724_wp, s8=3.5681_wp, a2=4.9858_wp) + doi = doi_gmtkn55 case(p_b1lyp_df) param = d3_param(a1=0.1986_wp, s8=2.1167_wp, a2=5.3875_wp) + doi = doi_gmtkn55 case(p_mpwb1k_df) param = d3_param(a1=0.1474_wp, s8=0.9499_wp, a2=6.6223_wp) + doi = doi_gmtkn55 case(p_mpw1pw_df) param = d3_param(a1=0.3342_wp, s8=1.8744_wp, a2=4.9819_wp) + doi = doi_gmtkn55 case(p_mpw1kcis_df) param = d3_param(a1=0.0576_wp, s8=1.0893_wp, a2=5.5314_wp) + doi = doi_gmtkn55 case(p_pbeh1pbe_df) param = d3_param(a1=0.0000_wp, s8=1.4877_wp, a2=7.0385_wp) + doi = doi_gmtkn55 case(p_pbe1kcis_df) param = d3_param(a1=0.0000_wp, s8=0.7688_wp, a2=6.2794_wp) + doi = doi_gmtkn55 case(p_x3lyp_df) param = d3_param(a1=0.2022_wp, s8=1.5744_wp, a2=5.4184_wp) + doi = doi_gmtkn55 case(p_o3lyp_df) param = d3_param(a1=0.0963_wp, s8=1.8171_wp, a2=5.9940_wp) + doi = doi_gmtkn55 case(p_b97_1_df) param = d3_param(a1=0.0000_wp, s8=0.4814_wp, a2=6.2279_wp) + doi = doi_gmtkn55 case(p_b97_2_df) param = d3_param(a1=0.0000_wp, s8=0.9448_wp, a2=5.9940_wp) + doi = doi_gmtkn55 case(p_b98_df) param = d3_param(a1=0.0000_wp, s8=0.7086_wp, a2=6.0672_wp) + doi = doi_gmtkn55 case(p_hiss_df) param = d3_param(a1=0.0000_wp, s8=1.6112_wp, a2=7.3539_wp) + doi = doi_gmtkn55 case(p_hse03_df) param = d3_param(a1=0.0000_wp, s8=1.1243_wp, a2=6.8889_wp) + doi = doi_gmtkn55 case(p_revtpssh_df) param = d3_param(a1=0.2660_wp, s8=1.4076_wp, a2=5.3761_wp) + doi = doi_gmtkn55 case(p_revtpss0_df) param = d3_param(a1=0.2218_wp, s8=1.6151_wp, a2=5.7985_wp) + doi = doi_gmtkn55 case(p_tpss1kcis_df) param = d3_param(a1=0.0000_wp, s8=1.0542_wp, a2=6.0201_wp) + doi = doi_gmtkn55 case(p_tauhcthhyb_df) param = d3_param(a1=0.0000_wp, s8=0.9585_wp, a2=10.1389_wp) + doi = doi_gmtkn55 case(p_m11_df) param = d3_param(a1=0.0000_wp, s8=2.8112_wp, a2=10.1389_wp) + doi = doi_minnesota_d3 case(p_sogga11x_df) param = d3_param(a1=0.1330_wp, s8=1.1426_wp, a2=5.7381_wp) + doi = doi_minnesota_d3 case(p_n12sx_df) param = d3_param(a1=0.3283_wp, s8=2.4900_wp, a2=5.7898_wp) + doi = doi_minnesota_d3 case(p_mn12sx_df) param = d3_param(a1=0.0983_wp, s8=1.1674_wp, a2=8.0259_wp) + doi = doi_minnesota_d3 + case(p_mn12l_df) + param = d3_param(a1=0.0000_wp, s8=2.2674_wp, a2=9.1494_wp) + doi = doi_minnesota_d3 case(p_mn15_df) param = d3_param(a1=2.0971_wp, s8=0.7862_wp, a2=7.5923_wp) + doi = doi_gmtkn55 case(p_lc_whpbe_df) param = d3_param(a1=0.2746_wp, s8=1.1908_wp, a2=5.3157_wp) + doi = doi_gmtkn55 case(p_mpw2plyp_df) param = d3_param(s6=0.66_wp, a1=0.4105_wp, s8=0.6223_wp, a2=5.0136_wp) + doi = doi_gmtkn55 case(p_dodscan66_df) param = d3_param(s6=0.3152_wp, a1=0.0_wp, s8=0.0_wp, a2=5.75_wp) + doi = doi_revdsd case(p_revdsdblyp_df) param = d3_param(s6=0.5451_wp, a1=0.0_wp, s8=0.0_wp, a2=5.2_wp) + doi = doi_revdsd case(p_revdsdpbep86_df) param = d3_param(s6=0.4377_wp, a1=0.0_wp, s8=0.0_wp, a2=5.5_wp) + doi = doi_revdsd case(p_revdsdpbeb95_df) param = d3_param(s6=0.3686_wp, a1=0.0_wp, s8=0.0_wp, a2=5.5_wp) + doi = doi_revdsd case(p_revdsdpbe_df) param = d3_param(s6=0.5746_wp, a1=0.0_wp, s8=0.0_wp, a2=5.5_wp) + doi = doi_revdsd case(p_revdodblyp_df) param = d3_param(s6=0.6145_wp, a1=0.0_wp, s8=0.0_wp, a2=5.2_wp) + doi = doi_revdsd case(p_revdodpbep86_df) param = d3_param(s6=0.4770_wp, a1=0.0_wp, s8=0.0_wp, a2=5.5_wp) + doi = doi_revdsd case(p_revdodpbeb95_df) param = d3_param(s6=0.4107_wp, a1=0.0_wp, s8=0.0_wp, a2=5.5_wp) + doi = doi_revdsd case(p_revdodpbe_df) param = d3_param(s6=0.6067_wp, a1=0.0_wp, s8=0.0_wp, a2=5.5_wp) + doi = doi_revdsd case(p_drpa75_df) param = d3_param(s6=0.3754_wp, a1=0.0_wp, s8=0.0_wp, a2=4.5048_wp) + doi = doi_drpa case(p_scs_drpa75_df) param = d3_param(s6=0.2528_wp, a1=0.0_wp, s8=0.0_wp, a2=4.5050_wp) + doi = doi_drpa case(p_optscs_drpa75_df) param = d3_param(s6=0.2546_wp, a1=0.0_wp, s8=0.0_wp, a2=4.5050_wp) + doi = doi_drpa case(p_dsd_pbe_drpa75_df) param = d3_param(s6=0.3223_wp, a1=0.0_wp, s8=0.0_wp, a2=4.5050_wp) + doi = doi_drpa case(p_dsd_pbep86_drpa75_df) param = d3_param(s6=0.3012_wp, a1=0.0_wp, s8=0.0_wp, a2=4.5050_wp) + doi = doi_drpa case(p_dsdpbep86_2011_df) param = d3_param(s6=0.418_wp, a1=0.0_wp, s8=0.0_wp, a2=5.65_wp) + doi = doi_dsd case(p_dsd_svwn5_df) param = d3_param(s6=0.46_wp, a1=0.0_wp, s8=0.0_wp, a2=5.6_wp) + doi = doi_dsd case(p_dsd_sp86_df) param = d3_param(s6=0.30_wp, a1=0.0_wp, s8=0.0_wp, a2=5.8_wp) + doi = doi_dsd case(p_dsd_slyp_df) param = d3_param(s6=0.30_wp, a1=0.0_wp, s8=0.0_wp, a2=5.6_wp) + doi = doi_dsd case(p_dsd_spbe_df) param = d3_param(s6=0.40_wp, a1=0.0_wp, s8=0.0_wp, a2=6.0_wp) + doi = doi_dsd case(p_dsd_bvwn5_df) param = d3_param(s6=0.61_wp, a1=0.0_wp, s8=0.0_wp, a2=5.2_wp) + doi = doi_dsd case(p_dsd_blyp_2013_df) param = d3_param(s6=0.57_wp, a1=0.0_wp, s8=0.0_wp, a2=5.4_wp) + doi = doi_dsd case(p_dsd_bpbe_df) param = d3_param(s6=1.22_wp, a1=0.0_wp, s8=0.0_wp, a2=6.6_wp) + doi = doi_dsd case(p_dsd_bp86_df) param = d3_param(s6=0.76_wp, a1=0.0_wp, s8=0.0_wp, a2=6.0_wp) + doi = doi_dsd case(p_dsd_bpw91_df) param = d3_param(s6=1.14_wp, a1=0.0_wp, s8=0.0_wp, a2=6.5_wp) + doi = doi_dsd case(p_dsd_bb95_df) param = d3_param(s6=1.02_wp, a1=0.0_wp, s8=0.0_wp, a2=6.8_wp) + doi = doi_dsd case(p_dsd_pbevwn5_df) param = d3_param(s6=0.54_wp, a1=0.0_wp, s8=0.0_wp, a2=5.1_wp) + doi = doi_dsd case(p_dsd_pbelyp_df) param = d3_param(s6=0.43_wp, a1=0.0_wp, s8=0.0_wp, a2=5.2_wp) + doi = doi_dsd case(p_dsdpbe_df) param = d3_param(s6=0.78_wp, a1=0.0_wp, s8=0.0_wp, a2=6.1_wp) + doi = doi_dsd case(p_dsdpbep86_df) param = d3_param(s6=0.48_wp, a1=0.0_wp, s8=0.0_wp, a2=5.6_wp) + doi = doi_dsd case(p_dsd_pbepw91_df) param = d3_param(s6=0.73_wp, a1=0.0_wp, s8=0.0_wp, a2=6.0_wp) + doi = doi_dsd case(p_dsdpbeb95_df) param = d3_param(s6=0.61_wp, a1=0.0_wp, s8=0.0_wp, a2=6.2_wp) + doi = doi_dsd case(p_dsd_pbehb95_df) param = d3_param(s6=0.58_wp, a1=0.0_wp, s8=0.0_wp, a2=6.2_wp) + doi = doi_dsd case(p_dsd_pbehp86_df) param = d3_param(s6=0.46_wp, a1=0.0_wp, s8=0.0_wp, a2=5.6_wp) + doi = doi_dsd case(p_dsd_mpwlyp_df) param = d3_param(s6=0.48_wp, a1=0.0_wp, s8=0.0_wp, a2=5.3_wp) + doi = doi_dsd case(p_dsd_mpwpw91_df) param = d3_param(s6=0.90_wp, a1=0.0_wp, s8=0.0_wp, a2=6.2_wp) + doi = doi_dsd case(p_dsd_mpwp86_df) param = d3_param(s6=0.59_wp, a1=0.0_wp, s8=0.0_wp, a2=5.8_wp) + doi = doi_dsd case(p_dsd_mpwpbe_df) param = d3_param(s6=0.96_wp, a1=0.0_wp, s8=0.0_wp, a2=6.3_wp) + doi = doi_dsd case(p_dsd_mpwb95_df) param = d3_param(s6=0.82_wp, a1=0.0_wp, s8=0.0_wp, a2=6.6_wp) + doi = doi_dsd case(p_dsd_hsepbe_df) param = d3_param(s6=0.79_wp, a1=0.0_wp, s8=0.0_wp, a2=6.1_wp) + doi = doi_dsd case(p_dsd_hsepw91_df) param = d3_param(s6=0.74_wp, a1=0.0_wp, s8=0.0_wp, a2=6.0_wp) + doi = doi_dsd case(p_dsd_hsep86_df) param = d3_param(s6=0.46_wp, a1=0.0_wp, s8=0.0_wp, a2=5.6_wp) + doi = doi_dsd case(p_dsd_hselyp_df) param = d3_param(s6=0.40_wp, a1=0.0_wp, s8=0.0_wp, a2=5.2_wp) + doi = doi_dsd case(p_dsd_tpss_df) param = d3_param(s6=0.72_wp, a1=0.0_wp, s8=0.0_wp, a2=6.5_wp) + doi = doi_dsd case(p_dsd_tpssb95_df) param = d3_param(s6=0.91_wp, a1=0.0_wp, s8=0.0_wp, a2=7.9_wp) + doi = doi_dsd case(p_dsd_olyp_df) param = d3_param(s6=0.93_wp, a1=0.0_wp, s8=0.0_wp, a2=5.8_wp) + doi = doi_dsd case(p_dsd_xlyp_df) param = d3_param(s6=0.51_wp, a1=0.0_wp, s8=0.0_wp, a2=5.3_wp) + doi = doi_dsd case(p_dsd_xb95_df) param = d3_param(s6=0.92_wp, a1=0.0_wp, s8=0.0_wp, a2=6.7_wp) + doi = doi_dsd case(p_dsd_b98_df) param = d3_param(s6=0.07_wp, a1=0.0_wp, s8=0.0_wp, a2=3.7_wp) + doi = doi_dsd case(p_dsd_bmk_df) param = d3_param(s6=0.17_wp, a1=0.0_wp, s8=0.0_wp, a2=3.9_wp) + doi = doi_dsd case(p_dsd_thcth_df) param = d3_param(s6=0.39_wp, a1=0.0_wp, s8=0.0_wp, a2=4.8_wp) + doi = doi_dsd case(p_dsd_hcth407_df) param = d3_param(s6=0.53_wp, a1=0.0_wp, s8=0.0_wp, a2=5.0_wp) + doi = doi_dsd case(p_dod_svwn5_df) param = d3_param(s6=0.57_wp, a1=0.0_wp, s8=0.0_wp, a2=5.6_wp) + doi = doi_dsd case(p_dod_blyp_df) param = d3_param(s6=0.96_wp, a1=0.0_wp, s8=0.0_wp, a2=5.1_wp) + doi = doi_dsd case(p_dod_pbe_df) param = d3_param(s6=0.91_wp, a1=0.0_wp, s8=0.0_wp, a2=5.9_wp) + doi = doi_dsd case(p_dod_pbep86_df) param = d3_param(s6=0.72_wp, a1=0.0_wp, s8=0.0_wp, a2=5.4_wp) + doi = doi_dsd case(p_dod_pbeb95_df) param = d3_param(s6=0.71_wp, a1=0.0_wp, s8=0.0_wp, a2=6.0_wp) + doi = doi_dsd case(p_dod_hsep86_df) param = d3_param(s6=0.69_wp, a1=0.0_wp, s8=0.0_wp, a2=5.4_wp) + doi = doi_dsd case(p_dod_pbehb95_df) param = d3_param(s6=0.67_wp, a1=0.0_wp, s8=0.0_wp, a2=6.0_wp) + doi = doi_dsd end select + if (.not.allocated(doi)) doi = doi_dftd3_bj + param%citation = get_citation(doi) + if (present(s9)) then param%s9 = s9 end if @@ -628,6 +820,8 @@ subroutine get_zero_damping(param, method, error, s9) !> Error handling type(error_type), allocatable, intent(out) :: error + character(len=:), allocatable :: doi + select case(get_method_id(method)) case default call fatal_error(error, "No entry for '"//method//"' present") @@ -636,16 +830,22 @@ subroutine get_zero_damping(param, method, error, s9) param = d3_param(rs6=0.999_wp, s8=-1.957_wp, rs8=0.697_wp) case(p_blyp_df) param = d3_param(rs6=1.094_wp, s8=1.682_wp) + doi = doi_dftd3_0 case(p_bp_df) param = d3_param(rs6=1.139_wp, s8=1.683_wp) + doi = doi_dftd3_0 case(p_b97d_df) param = d3_param(rs6=0.892_wp, s8=0.909_wp) + doi = doi_dftd3_0 case(p_b973c_df) param = d3_param(rs6=1.06_wp, s8=1.50_wp) + doi = doi_b973c case(p_revpbe_df) param = d3_param(rs6=0.923_wp, s8=1.010_wp) + doi = doi_dftd3_0 case(p_pbe_df) param = d3_param(rs6=1.217_wp, s8=0.722_wp) + doi = doi_dftd3_0 case(p_pbesol_df) param = d3_param(rs6=1.345_wp, s8=0.612_wp) case(p_rpw86pbe_df) @@ -654,156 +854,231 @@ subroutine get_zero_damping(param, method, error, s9) param = d3_param(rs6=0.872_wp, s8=0.514_wp) case(p_tpss_df) param = d3_param(rs6=1.166_wp, s8=1.105_wp) + doi = doi_dftd3_0 case(p_b3lyp_df, p_b3lyp_g_df, p_dm21_df, p_dm21m_df, p_dm21mc_df, p_dm21mu_df) param = d3_param(rs6=1.261_wp, s8=1.703_wp) + doi = doi_dftd3_0 case(p_pbe0_df) param = d3_param(rs6=1.287_wp, s8=0.928_wp) + doi = doi_dftd3_0 case(p_hse06_df) param = d3_param(rs6=1.129_wp, s8=0.109_wp) + doi = doi_hse06_d3 case(p_revpbe38_df) param = d3_param(rs6=1.021_wp, s8=0.862_wp) + doi = doi_gmtkn30_0 case(p_pw6b95_df) param = d3_param(rs6=1.532_wp, s8=0.862_wp) case(p_tpss0_df) param = d3_param(rs6=1.252_wp, s8=1.242_wp) + doi = doi_dftd3_0 case(p_b2plyp_df) param = d3_param(rs6=1.427_wp, s8=1.022_wp, s6=0.64_wp) + doi = doi_gmtkn30_0 case(p_pwpb95_df) param = d3_param(rs6=1.557_wp, s8=0.705_wp, s6=0.82_wp) + doi = doi_gmtkn30_0 case(p_b2gpplyp_df) param = d3_param(rs6=1.586_wp, s8=0.760_wp, s6=0.56_wp) + doi = doi_gmtkn30_0 case(p_ptpss_df) param = d3_param(rs6=1.541_wp, s8=0.879_wp, s6=0.75_wp) + doi = doi_gmtkn30_0 case(p_hf_df) param = d3_param(rs6=1.158_wp, s8=1.746_wp) + doi = doi_gmtkn30_bj case(p_mpwlyp_df) param = d3_param(rs6=1.239_wp, s8=1.098_wp) + doi = doi_gmtkn30_bj case(p_bpbe_df) param = d3_param(rs6=1.087_wp, s8=2.033_wp) + doi = doi_gmtkn30_bj case(p_bhlyp_df) param = d3_param(rs6=1.370_wp, s8=1.442_wp) + doi = doi_gmtkn30_bj case(p_tpssh_df) param = d3_param(rs6=1.223_wp, s8=1.219_wp) case(p_pwb6k_df) param = d3_param(rs6=1.660_wp, s8=0.550_wp) + doi = doi_gmtkn30_bj case(p_b1b95_df) param = d3_param(rs6=1.613_wp, s8=1.868_wp) + doi = doi_gmtkn30_bj case(p_bop_df) param = d3_param(rs6=0.929_wp, s8=1.975_wp) + doi = doi_gmtkn30_bj case(p_olyp_df) param = d3_param(rs6=0.806_wp, s8=1.764_wp) + doi = doi_gmtkn30_bj case(p_opbe_df) param = d3_param(rs6=0.837_wp, s8=2.055_wp) + doi = doi_gmtkn30_bj case(p_ssb_df) param = d3_param(rs6=1.215_wp, s8=0.663_wp) + doi = doi_gmtkn30_bj case(p_revssb_df) param = d3_param(rs6=1.221_wp, s8=0.560_wp) + doi = doi_gmtkn30_bj case(p_otpss_df) param = d3_param(rs6=1.128_wp, s8=1.494_wp) + doi = doi_gmtkn30_bj case(p_b3pw91_df) param = d3_param(rs6=1.176_wp, s8=1.775_wp) + doi = doi_gmtkn30_bj case(p_revpbe0_df) param = d3_param(rs6=0.949_wp, s8=0.792_wp) + doi = doi_gmtkn30_bj case(p_pbe38_df) param = d3_param(rs6=1.333_wp, s8=0.998_wp) + doi = doi_gmtkn30_bj case(p_mpw1b95_df) param = d3_param(rs6=1.605_wp, s8=1.118_wp) + doi = doi_gmtkn30_bj case(p_mpwb1k_df) param = d3_param(rs6=1.671_wp, s8=1.061_wp) + doi = doi_gmtkn30_bj case(p_bmk_df) param = d3_param(rs6=1.931_wp, s8=2.168_wp) + doi = doi_gmtkn30_bj case(p_camb3lyp_df) param = d3_param(rs6=1.378_wp, s8=1.217_wp) + doi = doi_gmtkn30_bj case(p_lcwpbe_df) param = d3_param(rs6=1.355_wp, s8=1.279_wp) + doi = doi_gmtkn30_bj case(p_m05_df) param = d3_param(rs6=1.373_wp, s8=0.595_wp) + doi = doi_gmtkn30_bj case(p_m052x_df) param = d3_param(rs6=1.417_wp, s8=0.000_wp) + doi = doi_gmtkn30_bj case(p_m06l_df) param = d3_param(rs6=1.581_wp, s8=0.000_wp) + doi = doi_gmtkn30_bj case(p_m06_df) param = d3_param(rs6=1.325_wp, s8=0.000_wp) + doi = doi_gmtkn30_bj case(p_m062x_df) param = d3_param(rs6=1.619_wp, s8=0.000_wp) + doi = doi_gmtkn30_bj case(p_m06hf_df) param = d3_param(rs6=1.446_wp, s8=0.000_wp) + doi = doi_gmtkn30_bj case(p_hcth120_df) param = d3_param(rs6=1.221_wp, s8=1.206_wp) case(p_scan_df) param = d3_param(rs6=1.324_wp, s8=0.000_wp) + doi = doi_scan_d3 case(p_wb97x_df) param = d3_param(rs6=1.281_wp, s8=1.0_wp, rs8=1.094_wp) + doi = doi_wb97x_d3 case(p_pw1pw_df) param = d3_param(rs6=1.4968_wp, s8=1.1786_wp) + doi = doi_gmtkn55 case(p_pbehpbe_df) param = d3_param(rs6=1.5703_wp, s8=1.4010_wp) + doi = doi_gmtkn55 case(p_xlyp_df) param = d3_param(rs6=0.9384_wp, s8=0.7447_wp) + doi = doi_gmtkn55 case(p_mpwpw_df) param = d3_param(rs6=1.3725_wp, s8=1.9467_wp) + doi = doi_gmtkn55 case(p_hcth407_df) param = d3_param(rs6=4.0426_wp, s8=2.7694_wp) + doi = doi_gmtkn55 case(p_revtpss_df) param = d3_param(rs6=1.3491_wp, s8=1.3666_wp) + doi = doi_gmtkn55 case(p_tauhcth_df) param = d3_param(rs6=0.9320_wp, s8=0.5662_wp) + doi = doi_gmtkn55 case(p_b3p_df) param = d3_param(rs6=1.1897_wp, s8=1.1961_wp) + doi = doi_gmtkn55 case(p_b1p_df) param = d3_param(rs6=1.1815_wp, s8=1.1209_wp) + doi = doi_gmtkn55 case(p_b1lyp_df) param = d3_param(rs6=1.3725_wp, s8=1.9467_wp) + doi = doi_gmtkn55 case(p_mpw1lyp_df) param = d3_param(rs6=2.0512_wp, s8=1.9529_wp) + doi = doi_gmtkn55 case(p_mpw1pw_df) param = d3_param(rs6=1.2892_wp, s8=1.4758_wp) + doi = doi_gmtkn55 case(p_mpw1kcis_df) param = d3_param(rs6=1.7231_wp, s8=2.2917_wp) + doi = doi_gmtkn55 case(p_mpwkcis1k_df) param = d3_param(rs6=1.4853_wp, s8=1.7553_wp) + doi = doi_gmtkn55 case(p_pbeh1pbe_df) param = d3_param(rs6=1.3719_wp, s8=1.0430_wp) + doi = doi_gmtkn55 case(p_pbe1kcis_df) param = d3_param(rs6=3.6355_wp, s8=1.7934_wp) + doi = doi_gmtkn55 case(p_x3lyp_df) param = d3_param(rs6=1.0_wp, s8=0.2990_wp) + doi = doi_gmtkn55 case(p_o3lyp_df) param = d3_param(rs6=1.4060_wp, s8=1.8058_wp) + doi = doi_gmtkn55 case(p_b97_1_df) param = d3_param(rs6=3.7924_wp, s8=1.6418_wp) + doi = doi_gmtkn55 case(p_b97_2_df) param = d3_param(rs6=1.7066_wp, s8=1.6418_wp) + doi = doi_gmtkn55 case(p_b98_df) param = d3_param(rs6=2.6895_wp, s8=1.9078_wp) + doi = doi_gmtkn55 case(p_hiss_df) param = d3_param(rs6=1.3338_wp, s8=0.7615_wp) + doi = doi_gmtkn55 case(p_hse03_df) param = d3_param(rs6=1.3944_wp, s8=1.0156_wp) + doi = doi_gmtkn55 case(p_revtpssh_df) param = d3_param(rs6=1.3224_wp, s8=1.2504_wp) + doi = doi_gmtkn55 case(p_revtpss0_df) param = d3_param(rs6=1.2881_wp, s8=1.0649_wp) + doi = doi_gmtkn55 case(p_tpss1kcis_df) param = d3_param(rs6=1.7729_wp, s8=2.0902_wp) + doi = doi_gmtkn55 case(p_tauhcthhyb_df) param = d3_param(rs6=1.5001_wp, s8=1.6302_wp) + doi = doi_gmtkn55 case(p_pkzb_df) param = d3_param(rs6=0.6327_wp, s8=0.0_wp) + doi = doi_gmtkn55 case(p_n12_df) param = d3_param(rs6=1.3493_wp, s8=2.3916_wp) + doi = doi_gmtkn55 case(p_mpw2plyp_df) param = d3_param(s6=0.66_wp, rs6=1.5527_wp, s8=0.7529_wp) + doi = doi_gmtkn55 case(p_m08hx_df) param = d3_param(rs6=1.6247_wp, s8=0.0_wp) + doi = doi_gmtkn55 case(p_m11l_df) param = d3_param(rs6=2.3933_wp, s8=1.1129_wp) + doi = doi_minnesota_d3 case(p_mn15l_df) param = d3_param(rs6=3.3388_wp, s8=0.0_wp) + doi = doi_gmtkn55 case(p_pwp_df) param = d3_param(rs6=2.1040_wp, s8=0.8747_wp) + doi = doi_gmtkn55 end select + if (.not.allocated(doi)) doi = doi_dftd3_0 + param%citation = get_citation(doi) + if (present(s9)) then param%s9 = s9 end if @@ -847,6 +1122,8 @@ subroutine get_mrational_damping(param, method, error, s9) param = d3_param(a1=0.563761_wp, s8=0.906564_wp, a2=3.593680_wp) end select + param%citation = get_citation(doi_dftd3_m) + if (present(s9)) then param%s9 = s9 end if @@ -890,6 +1167,8 @@ subroutine get_mzero_damping(param, method, error, s9) param = d3_param(rs6=1.366361_wp, s8=1.280619_wp, bet=0.003160_wp) end select + param%citation = get_citation(doi_dftd3_m) + if (present(s9)) then param%s9 = s9 end if @@ -945,6 +1224,8 @@ subroutine get_optimizedpower_damping(param, method, error, s9) param = d3_param(s6=1.0_wp, s8=1.69464_wp, a1=0.650_wp, a2=4.75_wp, bet=0.0_wp) end select + param%citation = get_citation(doi_dftd3_op) + if (present(s9)) then param%s9 = s9 end if @@ -984,4 +1265,420 @@ pure function lowercase(str) result(lcstr) end function lowercase +function get_citation(doi) result(citation) + character(len=*), intent(in) :: doi + type(citation_type) :: citation + + select case(doi) + case(doi_dftd3_0) + citation = new_citation( & + doi=doi, & + title="A consistent and accurate ab initio parametrization of density functional & + & dispersion correction (DFT-D) for the 94 elements H-Pu", & + author=[ & + & author_name("Stefan Grimme"), & + & author_name("Jens Antony"), & + & author_name("Stephan Ehrlich"), & + & author_name("Helge Krieg")], & + journal="J. Chem. Phys.", & + volume="132", & + pages="154104", & + year="2010" & + ) + + case(doi_dftd3_bj) + citation = new_citation( & + doi=doi, & + title="Effect of the damping function in dispersion corrected density functional theory", & + author=[ & + & author_name("Stefan Grimme"), & + & author_name("Stephan Ehrlich"), & + & author_name("Lars Goerigk")], & + journal="J. Comput. Chem.", & + issue="7", & + volume="32", & + pages="1456-1465", & + year="2011" & + ) + + case(doi_dftd3_m) + citation = new_citation( & + doi=doi, & + title="Revised Damping Parameters for the D3 Dispersion Correction to Density Functional Theory", & + author=[ & + & author_name("Daniel G. A. Smith"), & + & author_name("Lori A. Burns"), & + & author_name("Konrad Patkowski"), & + & author_name("C. David Sherrill")], & + journal="J. Phys. Chem. Lett.", & + issue="12", & + volume="7", & + pages="2197-2203", & + year="2016" & + ) + + case(doi_dftd3_op) + citation = new_citation( & + doi=doi, & + title="Assessing DFT-D3 Damping Functions Across Widely Used Density Functionals: Can We Do Better?", & + author=[ & + & author_name("Jonathon Witte"), & + & author_name("Narbe Mardirossian"), & + & author_name("Jeffrey B. Neaton"), & + & author_name("Martin Head-Gordon")], & + journal="J. Chem. Theory Comput.", & + issue="5", & + volume="13", & + pages="2043-2052", & + year="2017" & + ) + + case(doi_gmtkn30_0) + citation = new_citation( & + doi=doi, & + title="Efficient and Accurate Double-Hybrid-Meta-GGA Density Functionals—Evaluation & + & with the Extended GMTKN30 Database for General Main Group Thermochemistry, Kinetics, & + & and Noncovalent Interactions", & + author=[ & + & author_name("Lars Goerigk"), & + & author_name("Stefan Grimme")], & + journal="J. Chem. Theory Comput.", & + issue="2", & + volume="7", & + pages="291-309", & + year="2011" & + ) + + case(doi_gmtkn30_bj) + citation = new_citation( & + doi=doi, & + title="A thorough benchmark of density functional methods for general main group & + & thermochemistry, kinetics, and noncovalent interactions", & + author=[ & + & author_name("Lars Goerigk"), & + & author_name("Stefan Grimme")], & + journal="Phys. Chem. Chem. Phys.", & + issue="14", & + volume="13", & + pages="6670-6688", & + year="2011" & + ) + + case(doi_gmtkn55) + citation = new_citation( & + doi=doi, & + title="A look at the density functional theory zoo with the advanced GMTKN55 & + & database for general main group thermochemistry, kinetics and noncovalent interactions", & + author=[ & + & author_name("Lars Goerigk"), & + & author_name("Andreas Hansen"), & + & author_name("Christoph Bauer"), & + & author_name("Stephan Ehrlich"), & + & author_name("Asim Najibi"), & + & author_name("Stefan Grimme")], & + journal="Phys. Chem. Chem. Phys.", & + issue="48", & + volume="19", & + pages="32184-32215", & + year="2017" & + ) + + case(doi_dsd) + citation = new_citation( & + doi=doi, & + title="Spin-component-scaled double hybrids: An extensive search for the best fifth-rung & + & functionals blending DFT and perturbation theory", & + author=[ & + & author_name("Sebastian Kozuch"), & + & author_name("Jan M. L. Martin")], & + journal="J. Comput. Chem.", & + issue="27", & + volume="34", & + pages="2327-2344", & + year="2013" & + ) + + case(doi_dsdpbep86) + citation = new_citation( & + doi=doi, & + title="DSD-PBEP86: in search of the best double-hybrid DFT with spin-component scaled & + & MP2 and dispersion corrections", & + author=[ & + & author_name("Sebastian Kozuch"), & + & author_name("Jan M. L. Martin")], & + journal="Phys. Chem. Chem. Phys.", & + issue="45", & + volume="13", & + pages="20104-20107", & + year="2011" & + ) + + case(doi_drpa) + citation = new_citation( & + doi=doi, & + title="Exploring Avenues beyond Revised DSD Functionals: II. Random-Phase Approximation and Scaled MP3 Corrections", & + author=[ & + & author_name("Golokesh Santra"), & + & author_name("Emmanouil Semidalas"), & + & author_name("Jan M. L. Martin")], & + journal="J. Phys. Chem. A", & + issue="21", & + volume="125", & + pages="4628-4638", & + year="2021" & + ) + + case(doi_revdsd) + citation = new_citation( & + doi=doi, & + title="Minimally Empirical Double-Hybrid Functionals Trained against the GMTKN55 Database: & + & revDSD-PBEP86-D4, revDOD-PBE-D4, and DOD-SCAN-D4", & + author=[ & + & author_name("Golokesh Santra"), & + & author_name("Nitai Sylvetsky"), & + & author_name("Jan M. L. Martin")], & + journal="J. Phys. Chem. A", & + issue="24", & + volume="123", & + pages="5129-5143", & + year="2019" & + ) + + case(doi_pw91_d3) + citation = new_citation( & + doi=doi, & + title="A priori calculations of the free energy of formation from solution of polymorphic & + & self-assembled monolayers", & + author=[ & + & author_name("Jeffrey R. Reimers"), & + & author_name("Dwi Panduwinata"), & + & author_name("Johan Visser"), & + & author_name("Maxwell J. Crossley")], & + journal="Proc. Natl. Acad. Sci.", & + issue="45", & + volume="112", & + pages="E6101-E6110", & + year="2015" & + ) + + case(doi_r2scan_d4) + citation = new_citation( & + doi=doi, & + title="r²SCAN-D4: Dispersion corrected meta-generalized gradient approximation for general & + & chemical applications", & + author=[ & + & author_name("Sebastian Ehlert"), & + & author_name("Uwe Huniar"), & + & author_name("Jinliang Ning"), & + & author_name("James W. Furness"), & + & author_name("Jianwei Sun"), & + & author_name("Aaron D. Kaplan"), & + & author_name("John P. Perdew"), & + & author_name("Jan Gerit Brandenburg")], & + journal="J. Chem. Phys.", & + volume="154", & + pages="061101", & + year="2021" & + ) + + case(doi_scan_d3) + citation = new_citation( & + doi=doi, & + title="Benchmark tests of a strongly constrained semilocal functional with a & + & long-range dispersion correction", & + author=[ & + & author_name("J. G. Brandenburg"), & + & author_name("J. E. Bates"), & + & author_name("J. Sun"), & + & author_name("J. P. Perdew")], & + journal="Phys. Rev. B", & + volume="94", & + pages="115144", & + year="2016" & + ) + + case(doi_pbeh3c) + citation = new_citation( & + doi=doi, & + title="Consistent structures and interactions by density functional theory & + & with small atomic orbital basis sets", & + author=[ & + & author_name("Stefan Grimme"), & + & author_name("Jan Gerit Brandenburg"), & + & author_name("Christoph Bannwarth"), & + & author_name("Andreas Hansen")], & + journal="J. Chem. Phys.", & + volume="143", & + pages="054107", & + year="2015" & + ) + + case(doi_hse3c) + citation = new_citation( & + doi=doi, & + title="Screened exchange hybrid density functional for accurate and efficient & + & structures and interaction energies", & + author=[ & + & author_name("Jan Gerit Brandenburg"), & + & author_name("Eike Caldeweyher"), & + & author_name("Stefan Grimme")], & + journal="Phys. Chem. Chem. Phys.", & + issue="23", & + volume="18", & + pages="15519-15523", & + year="2016" & + ) + + case(doi_b973c) + citation = new_citation( & + doi=doi, & + title="B97-3c: A revised low-cost variant of the B97-D density functional method", & + author=[ & + & author_name("Jan Gerit Brandenburg"), & + & author_name("Christoph Bannwarth"), & + & author_name("Andreas Hansen"), & + & author_name("Stefan Grimme")], & + journal="J. Chem. Phys.", & + volume=" 148", & + pages="064104", & + year="2018" & + ) + + case(doi_hf3c) + citation = new_citation( & + doi=doi, & + title="Corrected small basis set Hartree-Fock method for large systems", & + author=[ & + & author_name("Rebecca Sure"), & + & author_name("Stefan Grimme")], & + journal="J. Comput. Chem.", & + issue="19", & + volume="34", & + pages="1672-1685", & + year="2013" & + ) + + case(doi_gcp) + citation = new_citation( & + doi=doi, & + title="A geometrical correction for the inter- and intra-molecular basis set & + & superposition error in Hartree-Fock and density functional theory calculations for large systems", & + author=[ & + & author_name("Holger Kruse"), & + & author_name("Stefan Grimme")], & + journal="J. Chem. Phys.", & + volume="136", & + pages="154101", & + year="2012" & + ) + + case(doi_d3pbc) + citation = new_citation( & + doi=doi, & + title="System-Dependent Dispersion Coefficients for the DFT-D3 Treatment of & + & Adsorption Processes on Ionic Surfaces", & + author=[ & + & author_name("Stephan Ehrlich"), & + & author_name("Jonas Moellmann"), & + & author_name("Werner Reckien"), & + & author_name("Thomas Bredow"), & + & author_name("Stefan Grimme")], & + journal="ChemPhysChem", & + issue="17", & + volume="12", & + pages="3414", & + year="2011" & + ) + + case(doi_r2scan_hyb) + citation = new_citation( & + doi=doi, & + title="Dispersion corrected r²SCAN based global hybrid functionals: r²SCANh, r²SCAN0, and r²SCAN50", & + author=[ & + & author_name("Markus Bursch"), & + & author_name("Hagen Neugebauer"), & + & author_name("Sebastian Ehlert"), & + & author_name("Stefan Grimme")], & + journal="J. Chem. Phys.", & + volume="156", & + pages="134105", & + year="2022" & + ) + + case(doi_r2scan_dhdf) + citation = new_citation( & + doi=doi, & + title="Dispersion-corrected r²SCAN based double-hybrid functionals", & + author=[ & + & author_name("Lukas Wittmann"), & + & author_name("Hagen Neugebauer"), & + & author_name("Stefan Grimme"), & + & author_name("Markus Bursch")], & + journal="J. Chem. Phys.", & + volume="159", & + pages="224103", & + year="2023" & + ) + + case(doi_minnesota_d3) + citation = new_citation( & + doi=doi, & + title="Treating London-Dispersion Effects with the Latest Minnesota Density Functionals: & + & Problems and Possible Solutions", & + author=[ & + & author_name("Lars Goerigk")], & + journal="J. Phys. Chem. Lett.", & + issue="19", & + volume="6", & + pages="3891-3896", & + year="2015" & + ) + + case(doi_b97m_d3) + citation = new_citation( & + doi=doi, & + title="The Nonlocal Kernel in van der Waals Density Functionals as an Additive Correction: & + & An Extensive Analysis with Special Emphasis on the B97M-V and ωB97M-V Approaches", & + author=[ & + & author_name("Asim Najibi"), & + & author_name("Lars Goerigk")], & + journal="J. Chem. Theory Comput.", & + issue="11", & + volume="14", & + pages="5725-5738", & + year="2018" & + ) + + case(doi_wb97x_d3) + citation = new_citation( & + doi=doi, & + title="Long-Range Corrected Hybrid Density Functionals with Improved Dispersion Corrections", & + author=[ & + & author_name("You-Sheng Lin"), & + & author_name("Guan-De Li"), & + & author_name("Shan-Ping Mao"), & + & author_name("Jeng-Da Chai")], & + journal="J. Chem. Theory Comput.", & + issue="1", & + volume="9", & + pages="263-272", & + year="2013" & + ) + + case(doi_hse06_d3) + citation = new_citation( & + doi=doi, & + title="DFT-D3 Study of Some Molecular Crystals", & + author=[ & + & author_name("Jonas Moellmann"), & + & author_name("Stefan Grimme")], & + journal="J. Phys. Chem. C", & + issue="14", & + volume="118", & + pages="7615-7621", & + year="2014" & + ) + end select +end function get_citation + end module dftd3_param From d6c2e73fea374658a8d38749d80a4b1c3b76b214 Mon Sep 17 00:00:00 2001 From: Sebastian Ehlert Date: Sun, 29 Sep 2024 11:19:38 +0200 Subject: [PATCH 2/8] Update documentation --- app/driver.f90 | 33 ++- app/help.f90 | 1 + man/s-dftd3.1.adoc | 3 + src/dftd3/citation.f90 | 551 +++++++++++++++++++++++++++++++++++++++-- src/dftd3/param.f90 | 455 +--------------------------------- 5 files changed, 565 insertions(+), 478 deletions(-) diff --git a/app/driver.f90 b/app/driver.f90 index e9a86612..aa6da253 100644 --- a/app/driver.f90 +++ b/app/driver.f90 @@ -18,10 +18,20 @@ module dftd3_app_driver use, intrinsic :: iso_fortran_env, only : output_unit, input_unit use mctc_env, only : wp, error_type, fatal_error use mctc_io, only : structure_type, read_structure, filetype, get_filetype - use dftd3 - use dftd3_output - use dftd3_utils - use dftd3_citation, only : format_bibtex + use dftd3, only : damping_param, d3_param, d3_model, get_coordination_number, & + & get_dispersion, get_zero_damping, zero_damping_param, new_zero_damping, & + & get_rational_damping, rational_damping_param, new_rational_damping, & + & get_mzero_damping, mzero_damping_param, new_mzero_damping, get_mrational_damping, & + & get_optimizedpower_damping, optimizedpower_damping_param, & + & new_optimizedpower_damping, new_d3_model, get_pairwise_dispersion, & + & realspace_cutoff, get_lattice_points + use dftd3_output, only : ascii_damping_param, ascii_atomic_radii, & + & ascii_atomic_references, ascii_system_properties, ascii_energy_atom, & + & ascii_results, ascii_pairwise, tagged_result, json_results, & + & turbomole_gradient, turbomole_gradlatt + use dftd3_utils, only : wrap_to_central_cell + use dftd3_citation, only : format_bibtex, is_citation_present, citation_type, & + & get_citation, doi_dftd3_0, doi_dftd3_bj, doi_dftd3_m, doi_dftd3_op, same_citation use dftd3_app_help, only : header use dftd3_app_cli, only : app_config, run_config, param_config, get_arguments use dftd3_app_toml, only : param_database @@ -59,6 +69,7 @@ subroutine run_driver(config, error) character(len=:), allocatable :: output integer :: stat, unit, idx logical :: exist + type(citation_type) :: citation if (config%verbosity > 1) then call header(output_unit) @@ -81,6 +92,7 @@ subroutine run_driver(config, error) if (config%has_param) inp = config%inp if (config%atm) s9 = config%inp%s9 if (config%zero) then + citation = get_citation(doi_dftd3_0) if (.not.config%has_param) then if (allocated(config%db)) then call from_db(param, config%db, config%method, "zero", error) @@ -99,6 +111,7 @@ subroutine run_driver(config, error) end if end if if (config%mzero) then + citation = get_citation(doi_dftd3_m) if (.not.config%has_param) then if (allocated(config%db)) then call from_db(param, config%db, config%method, "zerom", error) @@ -117,6 +130,11 @@ subroutine run_driver(config, error) end if end if if (config%rational .or. config%mrational) then + if (config%rational) then + citation = get_citation(doi_dftd3_bj) + else + citation = get_citation(doi_dftd3_m) + end if if (.not.config%has_param) then if (config%mrational) then if (allocated(config%db)) then @@ -143,6 +161,7 @@ subroutine run_driver(config, error) end if end if if (config%optimizedpower) then + citation = get_citation(doi_dftd3_op) if (.not.config%has_param) then if (allocated(config%db)) then call from_db(param, config%db, config%method, "op", error) @@ -257,8 +276,12 @@ subroutine run_driver(config, error) end if - if (config%citation .and. allocated(inp%citation)) then + if (config%citation) then open(file=config%citation_output, newunit=unit) + if (.not.same_citation(citation, inp%citation)) then + call format_bibtex(output, citation) + if (allocated(output)) write(unit, '(a)') output + end if call format_bibtex(output, inp%citation) if (allocated(output)) write(unit, '(a)') output close(unit) diff --git a/app/help.f90 b/app/help.f90 index 0d6d596e..da619c24 100644 --- a/app/help.f90 +++ b/app/help.f90 @@ -54,6 +54,7 @@ module dftd3_app_help " attempts to add to Turbomole gradient and gradlatt files"//nl//& " --property Evaluate dispersion related properties"//nl//& " --pair-resolved Calculate pairwise representation of dispersion energy"//nl//& + " --citation [file] Print citation information to file (default: dftd3.bib)"//nl//& "-v,--verbose Show more, can be used multiple times"//nl//& "-s,--silent Show less, use twice to supress all output"//nl//& " --version Print program version and exit"//nl//& diff --git a/man/s-dftd3.1.adoc b/man/s-dftd3.1.adoc index 44e5a688..5b7bee44 100644 --- a/man/s-dftd3.1.adoc +++ b/man/s-dftd3.1.adoc @@ -79,6 +79,9 @@ Evaluate dispersion related properties *--pair-resolved*:: Calculate pairwise representation of dispersion energy +*--citation* [_file_]:: +Write citations as bibtex (default: `dftd3.bib`) + *-v, --verbose*:: Show more, can be used multiple times diff --git a/src/dftd3/citation.f90 b/src/dftd3/citation.f90 index b931b268..1857d02a 100644 --- a/src/dftd3/citation.f90 +++ b/src/dftd3/citation.f90 @@ -14,45 +14,97 @@ ! You should have received a copy of the GNU Lesser General Public License ! along with s-dftd3. If not, see . +!> Module for handling citation data module dftd3_citation implicit none private - public :: citation_type, author_name, new_citation - public :: format_bibtex + public :: citation_type, author_name, new_citation, is_citation_present + public :: format_bibtex, get_citation, same_citation + public :: doi_dftd3_0, doi_dftd3_bj, doi_dftd3_m, doi_dftd3_op, & + & doi_gmtkn30_0, doi_gmtkn30_bj, doi_gmtkn55, doi_dsd, doi_dsdpbep86, & + & doi_drpa, doi_revdsd, doi_pw91_d3, doi_r2scan_d4, doi_scan_d3, & + & doi_pbeh3c, doi_hse3c, doi_b973c, doi_hf3c, doi_gcp, doi_d3pbc, & + & doi_r2scan_hyb, doi_r2scan_dhdf, doi_minnesota_d3, doi_b97m_d3, & + & doi_wb97x_d3, doi_hse06_d3 - type :: author_name + !> Represents an author to allow creating author lists + type :: author_type + !> Name of the author character(len=:), allocatable :: name - end type author_name - - interface author_name - module procedure :: new_author - end interface author_name + end type author_type + !> Represents a citation type :: citation_type + !> Title of the publication character(len=:), allocatable :: title - type(author_name), allocatable :: author(:) + !> Authors of the publication + type(author_type), allocatable :: author(:) + !> Issue of the publication character(len=:), allocatable :: issue + !> Journal of the publication character(len=:), allocatable :: journal + !> Volume of the publication character(len=:), allocatable :: volume + !> Year of the publication character(len=:), allocatable :: year + !> Page numbers of the publication character(len=:), allocatable :: pages + !> Digital Object Identifier (DOI) of the publication character(len=:), allocatable :: doi end type citation_type character(len=*), parameter :: nl = new_line('a') + character(len=*), parameter :: & + & doi_dftd3_0 = "10.1063/1.3382344", & + & doi_dftd3_bj = "10.1002/jcc.21759", & + & doi_dftd3_m = "10.1021/acs.jpclett.6b00780", & + & doi_dftd3_op = "10.1021/acs.jctc.7b00176", & + & doi_gmtkn30_0 = "10.1021/ct100466k", & + & doi_gmtkn30_bj = "10.1039/c0cp02984j", & + & doi_gmtkn55 = "10.1039/c7cp04913g", & + & doi_dsd = "10.1002/jcc.23391", & + & doi_dsdpbep86 = "10.1039/c1cp22592h", & + & doi_drpa = "10.1021/acs.jpca.1c01295", & + & doi_revdsd = "10.1021/acs.jpca.9b03157", & + & doi_pw91_d3 = "10.1073/pnas.1516984112", & + & doi_r2scan_d4 = "10.1063/5.0041008", & + & doi_scan_d3 = "10.1103/physrevb.94.115144", & + & doi_pbeh3c = "10.1063/1.4927476", & + & doi_hse3c = "10.1039/c6cp01697a", & + & doi_b973c = "10.1063/1.5012601", & + & doi_hf3c = "10.1002/jcc.23317", & + & doi_gcp = "10.1063/1.3700154", & + & doi_d3pbc = "10.1002/cphc.201100521", & + & doi_r2scan_hyb = "10.1063/5.0086040", & + & doi_r2scan_dhdf = "10.1063/5.0174988", & + & doi_minnesota_d3 = "10.1021/acs.jpclett.5b01591", & + & doi_b97m_d3 = "10.1021/acs.jctc.8b00842", & + & doi_wb97x_d3 = "10.1021/ct300715s", & + & doi_hse06_d3 = "10.1021/jp501237c" + contains +!> Create a new citation pure function new_citation(title, author, journal, issue, volume, year, pages, doi) result(citation) + !> Title of the publication character(len=*), intent(in) :: title - type(author_name), intent(in) :: author(:) + !> Authors of the publication + type(author_type), intent(in) :: author(:) + !> Journal of the publication character(len=*), intent(in) :: journal + !> Issue of the publication character(len=*), intent(in), optional :: issue + !> Volume of the publication character(len=*), intent(in) :: volume + !> Year of the publication character(len=*), intent(in) :: year + !> Page numbers of the publication character(len=*), intent(in) :: pages + !> Digital Object Identifier (DOI) of the publication character(len=*), intent(in) :: doi + !> The new citation type(citation_type) :: citation citation%title = title @@ -65,38 +117,66 @@ pure function new_citation(title, author, journal, issue, volume, year, pages, d if (present(issue)) citation%issue = issue end function new_citation -pure function new_author(name) result(author) +!> Create an author +pure function author_name(name) result(author) + !> Name of the author character(len=*), intent(in) :: name - type(author_name) :: author + !> The new author + type(author_type) :: author author%name = name -end function new_author +end function author_name -subroutine format_bibtex(string, citation) - character(len=:), allocatable, intent(out) :: string - class(citation_type), intent(in) :: citation - integer :: idx +!> Check if citation data is present +pure function is_citation_present(citation) result(is_present) + !> The citation to check + type(citation_type), intent(in) :: citation + !> Whether the citation data is present + logical :: is_present - if (.not.(allocated(citation%doi) & + is_present = allocated(citation%doi) & & .and.allocated(citation%title) & & .and.allocated(citation%author) & & .and.allocated(citation%journal) & & .and.allocated(citation%volume) & & .and.allocated(citation%year) & - & .and.allocated(citation%pages) & - )) then - return + & .and.allocated(citation%pages) +end function is_citation_present + +!> Check if two citations are the same +pure function same_citation(lhs, rhs) result(same) + !> The first citation + type(citation_type), intent(in) :: lhs + !> The second citation + type(citation_type), intent(in) :: rhs + !> Whether the citations are the same + logical :: same + + if (is_citation_present(lhs) .and. is_citation_present(rhs)) then + same = lhs%doi == rhs%doi + else + same = .false. end if +end function same_citation + +!> Format a citation as a BibTeX entry +subroutine format_bibtex(string, citation) + !> The formatted BibTeX entry + character(len=:), allocatable, intent(out) :: string + !> The citation to format + class(citation_type), intent(in) :: citation + integer :: idx + + if (.not.is_citation_present(citation)) return string = & & "@article{" // citation%doi // "," // nl // & & " title = {{" // citation%title // "}}," // nl // & - & " author = {" // citation%author(1)%name // nl + & " author = {" // citation%author(1)%name do idx = 2, size(citation%author) - string = string // & - & " and " // citation%author(idx)%name // nl + string = string // nl // & + & " and " // citation%author(idx)%name end do - string = string // & - & " }," // nl + string = string // "}," // nl if (allocated(citation%issue)) then string = string // & & " issue = {" // citation%issue // "}," // nl @@ -109,4 +189,423 @@ subroutine format_bibtex(string, citation) & "}" end subroutine format_bibtex +!> Get citation data for a given DOI +pure function get_citation(doi) result(citation) + !> Digital Object Identifier (DOI) of the publication + character(len=*), intent(in) :: doi + !> The citation data + type(citation_type) :: citation + + select case(doi) + case(doi_dftd3_0) + citation = new_citation( & + doi=doi, & + title="A consistent and accurate ab initio parametrization of density functional & + & dispersion correction (DFT-D) for the 94 elements H-Pu", & + author=[ & + & author_name("Stefan Grimme"), & + & author_name("Jens Antony"), & + & author_name("Stephan Ehrlich"), & + & author_name("Helge Krieg")], & + journal="J. Chem. Phys.", & + volume="132", & + pages="154104", & + year="2010" & + ) + + case(doi_dftd3_bj) + citation = new_citation( & + doi=doi, & + title="Effect of the damping function in dispersion corrected density functional theory", & + author=[ & + & author_name("Stefan Grimme"), & + & author_name("Stephan Ehrlich"), & + & author_name("Lars Goerigk")], & + journal="J. Comput. Chem.", & + issue="7", & + volume="32", & + pages="1456-1465", & + year="2011" & + ) + + case(doi_dftd3_m) + citation = new_citation( & + doi=doi, & + title="Revised Damping Parameters for the D3 Dispersion Correction to Density Functional Theory", & + author=[ & + & author_name("Daniel G. A. Smith"), & + & author_name("Lori A. Burns"), & + & author_name("Konrad Patkowski"), & + & author_name("C. David Sherrill")], & + journal="J. Phys. Chem. Lett.", & + issue="12", & + volume="7", & + pages="2197-2203", & + year="2016" & + ) + + case(doi_dftd3_op) + citation = new_citation( & + doi=doi, & + title="Assessing DFT-D3 Damping Functions Across Widely Used Density Functionals: Can We Do Better?", & + author=[ & + & author_name("Jonathon Witte"), & + & author_name("Narbe Mardirossian"), & + & author_name("Jeffrey B. Neaton"), & + & author_name("Martin Head-Gordon")], & + journal="J. Chem. Theory Comput.", & + issue="5", & + volume="13", & + pages="2043-2052", & + year="2017" & + ) + + case(doi_gmtkn30_0) + citation = new_citation( & + doi=doi, & + title="Efficient and Accurate Double-Hybrid-Meta-GGA Density Functionals—Evaluation & + & with the Extended GMTKN30 Database for General Main Group Thermochemistry, Kinetics, & + & and Noncovalent Interactions", & + author=[ & + & author_name("Lars Goerigk"), & + & author_name("Stefan Grimme")], & + journal="J. Chem. Theory Comput.", & + issue="2", & + volume="7", & + pages="291-309", & + year="2011" & + ) + + case(doi_gmtkn30_bj) + citation = new_citation( & + doi=doi, & + title="A thorough benchmark of density functional methods for general main group & + & thermochemistry, kinetics, and noncovalent interactions", & + author=[ & + & author_name("Lars Goerigk"), & + & author_name("Stefan Grimme")], & + journal="Phys. Chem. Chem. Phys.", & + issue="14", & + volume="13", & + pages="6670-6688", & + year="2011" & + ) + + case(doi_gmtkn55) + citation = new_citation( & + doi=doi, & + title="A look at the density functional theory zoo with the advanced GMTKN55 & + & database for general main group thermochemistry, kinetics and noncovalent interactions", & + author=[ & + & author_name("Lars Goerigk"), & + & author_name("Andreas Hansen"), & + & author_name("Christoph Bauer"), & + & author_name("Stephan Ehrlich"), & + & author_name("Asim Najibi"), & + & author_name("Stefan Grimme")], & + journal="Phys. Chem. Chem. Phys.", & + issue="48", & + volume="19", & + pages="32184-32215", & + year="2017" & + ) + + case(doi_dsd) + citation = new_citation( & + doi=doi, & + title="Spin-component-scaled double hybrids: An extensive search for the best fifth-rung & + & functionals blending DFT and perturbation theory", & + author=[ & + & author_name("Sebastian Kozuch"), & + & author_name("Jan M. L. Martin")], & + journal="J. Comput. Chem.", & + issue="27", & + volume="34", & + pages="2327-2344", & + year="2013" & + ) + + case(doi_dsdpbep86) + citation = new_citation( & + doi=doi, & + title="DSD-PBEP86: in search of the best double-hybrid DFT with spin-component scaled & + & MP2 and dispersion corrections", & + author=[ & + & author_name("Sebastian Kozuch"), & + & author_name("Jan M. L. Martin")], & + journal="Phys. Chem. Chem. Phys.", & + issue="45", & + volume="13", & + pages="20104-20107", & + year="2011" & + ) + + case(doi_drpa) + citation = new_citation( & + doi=doi, & + title="Exploring Avenues beyond Revised DSD Functionals: II. Random-Phase Approximation and Scaled MP3 Corrections", & + author=[ & + & author_name("Golokesh Santra"), & + & author_name("Emmanouil Semidalas"), & + & author_name("Jan M. L. Martin")], & + journal="J. Phys. Chem. A", & + issue="21", & + volume="125", & + pages="4628-4638", & + year="2021" & + ) + + case(doi_revdsd) + citation = new_citation( & + doi=doi, & + title="Minimally Empirical Double-Hybrid Functionals Trained against the GMTKN55 Database: & + & revDSD-PBEP86-D4, revDOD-PBE-D4, and DOD-SCAN-D4", & + author=[ & + & author_name("Golokesh Santra"), & + & author_name("Nitai Sylvetsky"), & + & author_name("Jan M. L. Martin")], & + journal="J. Phys. Chem. A", & + issue="24", & + volume="123", & + pages="5129-5143", & + year="2019" & + ) + + case(doi_pw91_d3) + citation = new_citation( & + doi=doi, & + title="A priori calculations of the free energy of formation from solution of polymorphic & + & self-assembled monolayers", & + author=[ & + & author_name("Jeffrey R. Reimers"), & + & author_name("Dwi Panduwinata"), & + & author_name("Johan Visser"), & + & author_name("Maxwell J. Crossley")], & + journal="Proc. Natl. Acad. Sci.", & + issue="45", & + volume="112", & + pages="E6101-E6110", & + year="2015" & + ) + + case(doi_r2scan_d4) + citation = new_citation( & + doi=doi, & + title="r²SCAN-D4: Dispersion corrected meta-generalized gradient approximation for general & + & chemical applications", & + author=[ & + & author_name("Sebastian Ehlert"), & + & author_name("Uwe Huniar"), & + & author_name("Jinliang Ning"), & + & author_name("James W. Furness"), & + & author_name("Jianwei Sun"), & + & author_name("Aaron D. Kaplan"), & + & author_name("John P. Perdew"), & + & author_name("Jan Gerit Brandenburg")], & + journal="J. Chem. Phys.", & + volume="154", & + pages="061101", & + year="2021" & + ) + + case(doi_scan_d3) + citation = new_citation( & + doi=doi, & + title="Benchmark tests of a strongly constrained semilocal functional with a & + & long-range dispersion correction", & + author=[ & + & author_name("J. G. Brandenburg"), & + & author_name("J. E. Bates"), & + & author_name("J. Sun"), & + & author_name("J. P. Perdew")], & + journal="Phys. Rev. B", & + volume="94", & + pages="115144", & + year="2016" & + ) + + case(doi_pbeh3c) + citation = new_citation( & + doi=doi, & + title="Consistent structures and interactions by density functional theory & + & with small atomic orbital basis sets", & + author=[ & + & author_name("Stefan Grimme"), & + & author_name("Jan Gerit Brandenburg"), & + & author_name("Christoph Bannwarth"), & + & author_name("Andreas Hansen")], & + journal="J. Chem. Phys.", & + volume="143", & + pages="054107", & + year="2015" & + ) + + case(doi_hse3c) + citation = new_citation( & + doi=doi, & + title="Screened exchange hybrid density functional for accurate and efficient & + & structures and interaction energies", & + author=[ & + & author_name("Jan Gerit Brandenburg"), & + & author_name("Eike Caldeweyher"), & + & author_name("Stefan Grimme")], & + journal="Phys. Chem. Chem. Phys.", & + issue="23", & + volume="18", & + pages="15519-15523", & + year="2016" & + ) + + case(doi_b973c) + citation = new_citation( & + doi=doi, & + title="B97-3c: A revised low-cost variant of the B97-D density functional method", & + author=[ & + & author_name("Jan Gerit Brandenburg"), & + & author_name("Christoph Bannwarth"), & + & author_name("Andreas Hansen"), & + & author_name("Stefan Grimme")], & + journal="J. Chem. Phys.", & + volume=" 148", & + pages="064104", & + year="2018" & + ) + + case(doi_hf3c) + citation = new_citation( & + doi=doi, & + title="Corrected small basis set Hartree-Fock method for large systems", & + author=[ & + & author_name("Rebecca Sure"), & + & author_name("Stefan Grimme")], & + journal="J. Comput. Chem.", & + issue="19", & + volume="34", & + pages="1672-1685", & + year="2013" & + ) + + case(doi_gcp) + citation = new_citation( & + doi=doi, & + title="A geometrical correction for the inter- and intra-molecular basis set & + & superposition error in Hartree-Fock and density functional theory calculations for large systems", & + author=[ & + & author_name("Holger Kruse"), & + & author_name("Stefan Grimme")], & + journal="J. Chem. Phys.", & + volume="136", & + pages="154101", & + year="2012" & + ) + + case(doi_d3pbc) + citation = new_citation( & + doi=doi, & + title="System-Dependent Dispersion Coefficients for the DFT-D3 Treatment of & + & Adsorption Processes on Ionic Surfaces", & + author=[ & + & author_name("Stephan Ehrlich"), & + & author_name("Jonas Moellmann"), & + & author_name("Werner Reckien"), & + & author_name("Thomas Bredow"), & + & author_name("Stefan Grimme")], & + journal="ChemPhysChem", & + issue="17", & + volume="12", & + pages="3414", & + year="2011" & + ) + + case(doi_r2scan_hyb) + citation = new_citation( & + doi=doi, & + title="Dispersion corrected r²SCAN based global hybrid functionals: r²SCANh, r²SCAN0, and r²SCAN50", & + author=[ & + & author_name("Markus Bursch"), & + & author_name("Hagen Neugebauer"), & + & author_name("Sebastian Ehlert"), & + & author_name("Stefan Grimme")], & + journal="J. Chem. Phys.", & + volume="156", & + pages="134105", & + year="2022" & + ) + + case(doi_r2scan_dhdf) + citation = new_citation( & + doi=doi, & + title="Dispersion-corrected r²SCAN based double-hybrid functionals", & + author=[ & + & author_name("Lukas Wittmann"), & + & author_name("Hagen Neugebauer"), & + & author_name("Stefan Grimme"), & + & author_name("Markus Bursch")], & + journal="J. Chem. Phys.", & + volume="159", & + pages="224103", & + year="2023" & + ) + + case(doi_minnesota_d3) + citation = new_citation( & + doi=doi, & + title="Treating London-Dispersion Effects with the Latest Minnesota Density Functionals: & + & Problems and Possible Solutions", & + author=[ & + & author_name("Lars Goerigk")], & + journal="J. Phys. Chem. Lett.", & + issue="19", & + volume="6", & + pages="3891-3896", & + year="2015" & + ) + + case(doi_b97m_d3) + citation = new_citation( & + doi=doi, & + title="The Nonlocal Kernel in van der Waals Density Functionals as an Additive Correction: & + & An Extensive Analysis with Special Emphasis on the B97M-V and ωB97M-V Approaches", & + author=[ & + & author_name("Asim Najibi"), & + & author_name("Lars Goerigk")], & + journal="J. Chem. Theory Comput.", & + issue="11", & + volume="14", & + pages="5725-5738", & + year="2018" & + ) + + case(doi_wb97x_d3) + citation = new_citation( & + doi=doi, & + title="Long-Range Corrected Hybrid Density Functionals with Improved Dispersion Corrections", & + author=[ & + & author_name("You-Sheng Lin"), & + & author_name("Guan-De Li"), & + & author_name("Shan-Ping Mao"), & + & author_name("Jeng-Da Chai")], & + journal="J. Chem. Theory Comput.", & + issue="1", & + volume="9", & + pages="263-272", & + year="2013" & + ) + + case(doi_hse06_d3) + citation = new_citation( & + doi=doi, & + title="DFT-D3 Study of Some Molecular Crystals", & + author=[ & + & author_name("Jonas Moellmann"), & + & author_name("Stefan Grimme")], & + journal="J. Phys. Chem. C", & + issue="14", & + volume="118", & + pages="7615-7621", & + year="2014" & + ) + end select +end function get_citation + end module dftd3_citation \ No newline at end of file diff --git a/src/dftd3/param.f90 b/src/dftd3/param.f90 index a95f9cd4..35f67e1a 100644 --- a/src/dftd3/param.f90 +++ b/src/dftd3/param.f90 @@ -16,7 +16,13 @@ module dftd3_param use mctc_env, only : wp, error_type, fatal_error - use dftd3_citation, only : citation_type, author_name, new_citation + use dftd3_citation, only : citation_type, author_name, new_citation, & + & get_citation, doi_dftd3_0, doi_dftd3_bj, doi_dftd3_m, doi_dftd3_op, & + & doi_gmtkn30_0, doi_gmtkn30_bj, doi_gmtkn55, doi_dsd, doi_dsdpbep86, & + & doi_drpa, doi_revdsd, doi_pw91_d3, doi_r2scan_d4, doi_scan_d3, & + & doi_pbeh3c, doi_hse3c, doi_b973c, doi_hf3c, doi_gcp, doi_d3pbc, & + & doi_r2scan_hyb, doi_r2scan_dhdf, doi_minnesota_d3, doi_b97m_d3, & + & doi_wb97x_d3, doi_hse06_d3 implicit none public :: d3_param @@ -35,7 +41,7 @@ module dftd3_param real(wp) :: a2 = 5.0_wp real(wp) :: alp = 14.0_wp real(wp) :: bet = 0.0_wp - type(citation_type), allocatable :: citation + type(citation_type) :: citation end type d3_param @@ -80,34 +86,6 @@ module dftd3_param & p_dod_pbep86_df, p_dod_pbeb95_df, p_dod_hsep86_df, p_dod_pbehb95_df end enum - character(len=*), parameter :: & - & doi_dftd3_0 = "10.1063/1.3382344", & - & doi_dftd3_bj = "10.1002/jcc.21759", & - & doi_dftd3_m = "10.1021/acs.jpclett.6b00780", & - & doi_dftd3_op = "10.1021/acs.jctc.7b00176", & - & doi_gmtkn30_0 = "10.1021/ct100466k", & - & doi_gmtkn30_bj = "10.1039/c0cp02984j", & - & doi_gmtkn55 = "10.1039/c7cp04913g", & - & doi_dsd = "10.1002/jcc.23391", & - & doi_dsdpbep86 = "10.1039/c1cp22592h", & - & doi_drpa = "10.1021/acs.jpca.1c01295", & - & doi_revdsd = "10.1021/acs.jpca.9b03157", & - & doi_pw91_d3 = "10.1073/pnas.1516984112", & - & doi_r2scan_d4 = "10.1063/5.0041008", & - & doi_scan_d3 = "10.1103/physrevb.94.115144", & - & doi_pbeh3c = "10.1063/1.4927476", & - & doi_hse3c = "10.1039/c6cp01697a", & - & doi_b973c = "10.1063/1.5012601", & - & doi_hf3c = "10.1002/jcc.23317", & - & doi_gcp = "10.1063/1.3700154", & - & doi_d3pbc = "10.1002/cphc.201100521", & - & doi_r2scan_hyb = "10.1063/5.0086040", & - & doi_r2scan_dhdf = "10.1063/5.0174988", & - & doi_minnesota_d3 = "10.1021/acs.jpclett.5b01591", & - & doi_b97m_d3 = "10.1021/acs.jctc.8b00842", & - & doi_wb97x_d3 = "10.1021/ct300715s", & - & doi_hse06_d3 = "10.1021/jp501237c" - contains @@ -1264,421 +1242,4 @@ pure function lowercase(str) result(lcstr) end function lowercase - -function get_citation(doi) result(citation) - character(len=*), intent(in) :: doi - type(citation_type) :: citation - - select case(doi) - case(doi_dftd3_0) - citation = new_citation( & - doi=doi, & - title="A consistent and accurate ab initio parametrization of density functional & - & dispersion correction (DFT-D) for the 94 elements H-Pu", & - author=[ & - & author_name("Stefan Grimme"), & - & author_name("Jens Antony"), & - & author_name("Stephan Ehrlich"), & - & author_name("Helge Krieg")], & - journal="J. Chem. Phys.", & - volume="132", & - pages="154104", & - year="2010" & - ) - - case(doi_dftd3_bj) - citation = new_citation( & - doi=doi, & - title="Effect of the damping function in dispersion corrected density functional theory", & - author=[ & - & author_name("Stefan Grimme"), & - & author_name("Stephan Ehrlich"), & - & author_name("Lars Goerigk")], & - journal="J. Comput. Chem.", & - issue="7", & - volume="32", & - pages="1456-1465", & - year="2011" & - ) - - case(doi_dftd3_m) - citation = new_citation( & - doi=doi, & - title="Revised Damping Parameters for the D3 Dispersion Correction to Density Functional Theory", & - author=[ & - & author_name("Daniel G. A. Smith"), & - & author_name("Lori A. Burns"), & - & author_name("Konrad Patkowski"), & - & author_name("C. David Sherrill")], & - journal="J. Phys. Chem. Lett.", & - issue="12", & - volume="7", & - pages="2197-2203", & - year="2016" & - ) - - case(doi_dftd3_op) - citation = new_citation( & - doi=doi, & - title="Assessing DFT-D3 Damping Functions Across Widely Used Density Functionals: Can We Do Better?", & - author=[ & - & author_name("Jonathon Witte"), & - & author_name("Narbe Mardirossian"), & - & author_name("Jeffrey B. Neaton"), & - & author_name("Martin Head-Gordon")], & - journal="J. Chem. Theory Comput.", & - issue="5", & - volume="13", & - pages="2043-2052", & - year="2017" & - ) - - case(doi_gmtkn30_0) - citation = new_citation( & - doi=doi, & - title="Efficient and Accurate Double-Hybrid-Meta-GGA Density Functionals—Evaluation & - & with the Extended GMTKN30 Database for General Main Group Thermochemistry, Kinetics, & - & and Noncovalent Interactions", & - author=[ & - & author_name("Lars Goerigk"), & - & author_name("Stefan Grimme")], & - journal="J. Chem. Theory Comput.", & - issue="2", & - volume="7", & - pages="291-309", & - year="2011" & - ) - - case(doi_gmtkn30_bj) - citation = new_citation( & - doi=doi, & - title="A thorough benchmark of density functional methods for general main group & - & thermochemistry, kinetics, and noncovalent interactions", & - author=[ & - & author_name("Lars Goerigk"), & - & author_name("Stefan Grimme")], & - journal="Phys. Chem. Chem. Phys.", & - issue="14", & - volume="13", & - pages="6670-6688", & - year="2011" & - ) - - case(doi_gmtkn55) - citation = new_citation( & - doi=doi, & - title="A look at the density functional theory zoo with the advanced GMTKN55 & - & database for general main group thermochemistry, kinetics and noncovalent interactions", & - author=[ & - & author_name("Lars Goerigk"), & - & author_name("Andreas Hansen"), & - & author_name("Christoph Bauer"), & - & author_name("Stephan Ehrlich"), & - & author_name("Asim Najibi"), & - & author_name("Stefan Grimme")], & - journal="Phys. Chem. Chem. Phys.", & - issue="48", & - volume="19", & - pages="32184-32215", & - year="2017" & - ) - - case(doi_dsd) - citation = new_citation( & - doi=doi, & - title="Spin-component-scaled double hybrids: An extensive search for the best fifth-rung & - & functionals blending DFT and perturbation theory", & - author=[ & - & author_name("Sebastian Kozuch"), & - & author_name("Jan M. L. Martin")], & - journal="J. Comput. Chem.", & - issue="27", & - volume="34", & - pages="2327-2344", & - year="2013" & - ) - - case(doi_dsdpbep86) - citation = new_citation( & - doi=doi, & - title="DSD-PBEP86: in search of the best double-hybrid DFT with spin-component scaled & - & MP2 and dispersion corrections", & - author=[ & - & author_name("Sebastian Kozuch"), & - & author_name("Jan M. L. Martin")], & - journal="Phys. Chem. Chem. Phys.", & - issue="45", & - volume="13", & - pages="20104-20107", & - year="2011" & - ) - - case(doi_drpa) - citation = new_citation( & - doi=doi, & - title="Exploring Avenues beyond Revised DSD Functionals: II. Random-Phase Approximation and Scaled MP3 Corrections", & - author=[ & - & author_name("Golokesh Santra"), & - & author_name("Emmanouil Semidalas"), & - & author_name("Jan M. L. Martin")], & - journal="J. Phys. Chem. A", & - issue="21", & - volume="125", & - pages="4628-4638", & - year="2021" & - ) - - case(doi_revdsd) - citation = new_citation( & - doi=doi, & - title="Minimally Empirical Double-Hybrid Functionals Trained against the GMTKN55 Database: & - & revDSD-PBEP86-D4, revDOD-PBE-D4, and DOD-SCAN-D4", & - author=[ & - & author_name("Golokesh Santra"), & - & author_name("Nitai Sylvetsky"), & - & author_name("Jan M. L. Martin")], & - journal="J. Phys. Chem. A", & - issue="24", & - volume="123", & - pages="5129-5143", & - year="2019" & - ) - - case(doi_pw91_d3) - citation = new_citation( & - doi=doi, & - title="A priori calculations of the free energy of formation from solution of polymorphic & - & self-assembled monolayers", & - author=[ & - & author_name("Jeffrey R. Reimers"), & - & author_name("Dwi Panduwinata"), & - & author_name("Johan Visser"), & - & author_name("Maxwell J. Crossley")], & - journal="Proc. Natl. Acad. Sci.", & - issue="45", & - volume="112", & - pages="E6101-E6110", & - year="2015" & - ) - - case(doi_r2scan_d4) - citation = new_citation( & - doi=doi, & - title="r²SCAN-D4: Dispersion corrected meta-generalized gradient approximation for general & - & chemical applications", & - author=[ & - & author_name("Sebastian Ehlert"), & - & author_name("Uwe Huniar"), & - & author_name("Jinliang Ning"), & - & author_name("James W. Furness"), & - & author_name("Jianwei Sun"), & - & author_name("Aaron D. Kaplan"), & - & author_name("John P. Perdew"), & - & author_name("Jan Gerit Brandenburg")], & - journal="J. Chem. Phys.", & - volume="154", & - pages="061101", & - year="2021" & - ) - - case(doi_scan_d3) - citation = new_citation( & - doi=doi, & - title="Benchmark tests of a strongly constrained semilocal functional with a & - & long-range dispersion correction", & - author=[ & - & author_name("J. G. Brandenburg"), & - & author_name("J. E. Bates"), & - & author_name("J. Sun"), & - & author_name("J. P. Perdew")], & - journal="Phys. Rev. B", & - volume="94", & - pages="115144", & - year="2016" & - ) - - case(doi_pbeh3c) - citation = new_citation( & - doi=doi, & - title="Consistent structures and interactions by density functional theory & - & with small atomic orbital basis sets", & - author=[ & - & author_name("Stefan Grimme"), & - & author_name("Jan Gerit Brandenburg"), & - & author_name("Christoph Bannwarth"), & - & author_name("Andreas Hansen")], & - journal="J. Chem. Phys.", & - volume="143", & - pages="054107", & - year="2015" & - ) - - case(doi_hse3c) - citation = new_citation( & - doi=doi, & - title="Screened exchange hybrid density functional for accurate and efficient & - & structures and interaction energies", & - author=[ & - & author_name("Jan Gerit Brandenburg"), & - & author_name("Eike Caldeweyher"), & - & author_name("Stefan Grimme")], & - journal="Phys. Chem. Chem. Phys.", & - issue="23", & - volume="18", & - pages="15519-15523", & - year="2016" & - ) - - case(doi_b973c) - citation = new_citation( & - doi=doi, & - title="B97-3c: A revised low-cost variant of the B97-D density functional method", & - author=[ & - & author_name("Jan Gerit Brandenburg"), & - & author_name("Christoph Bannwarth"), & - & author_name("Andreas Hansen"), & - & author_name("Stefan Grimme")], & - journal="J. Chem. Phys.", & - volume=" 148", & - pages="064104", & - year="2018" & - ) - - case(doi_hf3c) - citation = new_citation( & - doi=doi, & - title="Corrected small basis set Hartree-Fock method for large systems", & - author=[ & - & author_name("Rebecca Sure"), & - & author_name("Stefan Grimme")], & - journal="J. Comput. Chem.", & - issue="19", & - volume="34", & - pages="1672-1685", & - year="2013" & - ) - - case(doi_gcp) - citation = new_citation( & - doi=doi, & - title="A geometrical correction for the inter- and intra-molecular basis set & - & superposition error in Hartree-Fock and density functional theory calculations for large systems", & - author=[ & - & author_name("Holger Kruse"), & - & author_name("Stefan Grimme")], & - journal="J. Chem. Phys.", & - volume="136", & - pages="154101", & - year="2012" & - ) - - case(doi_d3pbc) - citation = new_citation( & - doi=doi, & - title="System-Dependent Dispersion Coefficients for the DFT-D3 Treatment of & - & Adsorption Processes on Ionic Surfaces", & - author=[ & - & author_name("Stephan Ehrlich"), & - & author_name("Jonas Moellmann"), & - & author_name("Werner Reckien"), & - & author_name("Thomas Bredow"), & - & author_name("Stefan Grimme")], & - journal="ChemPhysChem", & - issue="17", & - volume="12", & - pages="3414", & - year="2011" & - ) - - case(doi_r2scan_hyb) - citation = new_citation( & - doi=doi, & - title="Dispersion corrected r²SCAN based global hybrid functionals: r²SCANh, r²SCAN0, and r²SCAN50", & - author=[ & - & author_name("Markus Bursch"), & - & author_name("Hagen Neugebauer"), & - & author_name("Sebastian Ehlert"), & - & author_name("Stefan Grimme")], & - journal="J. Chem. Phys.", & - volume="156", & - pages="134105", & - year="2022" & - ) - - case(doi_r2scan_dhdf) - citation = new_citation( & - doi=doi, & - title="Dispersion-corrected r²SCAN based double-hybrid functionals", & - author=[ & - & author_name("Lukas Wittmann"), & - & author_name("Hagen Neugebauer"), & - & author_name("Stefan Grimme"), & - & author_name("Markus Bursch")], & - journal="J. Chem. Phys.", & - volume="159", & - pages="224103", & - year="2023" & - ) - - case(doi_minnesota_d3) - citation = new_citation( & - doi=doi, & - title="Treating London-Dispersion Effects with the Latest Minnesota Density Functionals: & - & Problems and Possible Solutions", & - author=[ & - & author_name("Lars Goerigk")], & - journal="J. Phys. Chem. Lett.", & - issue="19", & - volume="6", & - pages="3891-3896", & - year="2015" & - ) - - case(doi_b97m_d3) - citation = new_citation( & - doi=doi, & - title="The Nonlocal Kernel in van der Waals Density Functionals as an Additive Correction: & - & An Extensive Analysis with Special Emphasis on the B97M-V and ωB97M-V Approaches", & - author=[ & - & author_name("Asim Najibi"), & - & author_name("Lars Goerigk")], & - journal="J. Chem. Theory Comput.", & - issue="11", & - volume="14", & - pages="5725-5738", & - year="2018" & - ) - - case(doi_wb97x_d3) - citation = new_citation( & - doi=doi, & - title="Long-Range Corrected Hybrid Density Functionals with Improved Dispersion Corrections", & - author=[ & - & author_name("You-Sheng Lin"), & - & author_name("Guan-De Li"), & - & author_name("Shan-Ping Mao"), & - & author_name("Jeng-Da Chai")], & - journal="J. Chem. Theory Comput.", & - issue="1", & - volume="9", & - pages="263-272", & - year="2013" & - ) - - case(doi_hse06_d3) - citation = new_citation( & - doi=doi, & - title="DFT-D3 Study of Some Molecular Crystals", & - author=[ & - & author_name("Jonas Moellmann"), & - & author_name("Stefan Grimme")], & - journal="J. Phys. Chem. C", & - issue="14", & - volume="118", & - pages="7615-7621", & - year="2014" & - ) - end select -end function get_citation - end module dftd3_param From 56b37f82a6d11e6da69e292854a8166009feaaab Mon Sep 17 00:00:00 2001 From: Sebastian Ehlert Date: Sun, 29 Sep 2024 11:34:56 +0200 Subject: [PATCH 3/8] Add citation as optional argument --- app/driver.f90 | 16 ++++++++-------- src/dftd3/param.f90 | 36 +++++++++++++++++++++++++----------- 2 files changed, 33 insertions(+), 19 deletions(-) diff --git a/app/driver.f90 b/app/driver.f90 index aa6da253..dc157da2 100644 --- a/app/driver.f90 +++ b/app/driver.f90 @@ -69,7 +69,7 @@ subroutine run_driver(config, error) character(len=:), allocatable :: output integer :: stat, unit, idx logical :: exist - type(citation_type) :: citation + type(citation_type) :: citation, param_citation if (config%verbosity > 1) then call header(output_unit) @@ -97,7 +97,7 @@ subroutine run_driver(config, error) if (allocated(config%db)) then call from_db(param, config%db, config%method, "zero", error) else - call get_zero_damping(inp, config%method, error, s9) + call get_zero_damping(inp, config%method, error, s9, param_citation) end if if (allocated(error)) return end if @@ -116,7 +116,7 @@ subroutine run_driver(config, error) if (allocated(config%db)) then call from_db(param, config%db, config%method, "zerom", error) else - call get_mzero_damping(inp, config%method, error, s9) + call get_mzero_damping(inp, config%method, error, s9, param_citation) end if if (allocated(error)) return end if @@ -140,13 +140,13 @@ subroutine run_driver(config, error) if (allocated(config%db)) then call from_db(param, config%db, config%method, "bjm", error) else - call get_mrational_damping(inp, config%method, error, s9) + call get_mrational_damping(inp, config%method, error, s9, param_citation) end if else if (allocated(config%db)) then call from_db(param, config%db, config%method, "bj", error) else - call get_rational_damping(inp, config%method, error, s9) + call get_rational_damping(inp, config%method, error, s9, param_citation) end if end if if (allocated(error)) return @@ -166,7 +166,7 @@ subroutine run_driver(config, error) if (allocated(config%db)) then call from_db(param, config%db, config%method, "op", error) else - call get_optimizedpower_damping(inp, config%method, error, s9) + call get_optimizedpower_damping(inp, config%method, error, s9, param_citation) end if if (allocated(error)) return end if @@ -278,11 +278,11 @@ subroutine run_driver(config, error) if (config%citation) then open(file=config%citation_output, newunit=unit) - if (.not.same_citation(citation, inp%citation)) then + if (.not.same_citation(citation, param_citation)) then call format_bibtex(output, citation) if (allocated(output)) write(unit, '(a)') output end if - call format_bibtex(output, inp%citation) + call format_bibtex(output, param_citation) if (allocated(output)) write(unit, '(a)') output close(unit) if (config%verbosity > 0) then diff --git a/src/dftd3/param.f90 b/src/dftd3/param.f90 index 35f67e1a..96ed54e6 100644 --- a/src/dftd3/param.f90 +++ b/src/dftd3/param.f90 @@ -41,7 +41,6 @@ module dftd3_param real(wp) :: a2 = 5.0_wp real(wp) :: alp = 14.0_wp real(wp) :: bet = 0.0_wp - type(citation_type) :: citation end type d3_param @@ -290,7 +289,7 @@ function get_method_id(method) result(id) end function get_method_id -subroutine get_rational_damping(param, method, error, s9) +subroutine get_rational_damping(param, method, error, s9, citation) !> Loaded parameter record type(d3_param), intent(out) :: param @@ -301,6 +300,9 @@ subroutine get_rational_damping(param, method, error, s9) !> Overwrite s9 real(wp), intent(in), optional :: s9 + !> Citation information + type(citation_type), intent(out), optional :: citation + !> Error handling type(error_type), allocatable, intent(out) :: error @@ -775,7 +777,7 @@ subroutine get_rational_damping(param, method, error, s9) end select if (.not.allocated(doi)) doi = doi_dftd3_bj - param%citation = get_citation(doi) + citation = get_citation(doi) if (present(s9)) then param%s9 = s9 @@ -784,7 +786,7 @@ subroutine get_rational_damping(param, method, error, s9) end subroutine get_rational_damping -subroutine get_zero_damping(param, method, error, s9) +subroutine get_zero_damping(param, method, error, s9, citation) !> Loaded parameter record type(d3_param), intent(out) :: param @@ -795,6 +797,9 @@ subroutine get_zero_damping(param, method, error, s9) !> Overwrite s9 real(wp), intent(in), optional :: s9 + !> Citation information + type(citation_type), intent(out), optional :: citation + !> Error handling type(error_type), allocatable, intent(out) :: error @@ -1055,7 +1060,7 @@ subroutine get_zero_damping(param, method, error, s9) end select if (.not.allocated(doi)) doi = doi_dftd3_0 - param%citation = get_citation(doi) + citation = get_citation(doi) if (present(s9)) then param%s9 = s9 @@ -1064,7 +1069,7 @@ subroutine get_zero_damping(param, method, error, s9) end subroutine get_zero_damping -subroutine get_mrational_damping(param, method, error, s9) +subroutine get_mrational_damping(param, method, error, s9,citation) !> Loaded parameter record type(d3_param), intent(out) :: param @@ -1075,6 +1080,9 @@ subroutine get_mrational_damping(param, method, error, s9) !> Overwrite s9 real(wp), intent(in), optional :: s9 + !> Citation information + type(citation_type), intent(out), optional :: citation + !> Error handling type(error_type), allocatable, intent(out) :: error @@ -1100,7 +1108,7 @@ subroutine get_mrational_damping(param, method, error, s9) param = d3_param(a1=0.563761_wp, s8=0.906564_wp, a2=3.593680_wp) end select - param%citation = get_citation(doi_dftd3_m) + citation = get_citation(doi_dftd3_m) if (present(s9)) then param%s9 = s9 @@ -1109,7 +1117,7 @@ subroutine get_mrational_damping(param, method, error, s9) end subroutine get_mrational_damping -subroutine get_mzero_damping(param, method, error, s9) +subroutine get_mzero_damping(param, method, error, s9, citation) !> Loaded parameter record type(d3_param), intent(out) :: param @@ -1120,6 +1128,9 @@ subroutine get_mzero_damping(param, method, error, s9) !> Overwrite s9 real(wp), intent(in), optional :: s9 + !> Citation information + type(citation_type), intent(out), optional :: citation + !> Error handling type(error_type), allocatable, intent(out) :: error @@ -1145,7 +1156,7 @@ subroutine get_mzero_damping(param, method, error, s9) param = d3_param(rs6=1.366361_wp, s8=1.280619_wp, bet=0.003160_wp) end select - param%citation = get_citation(doi_dftd3_m) + citation = get_citation(doi_dftd3_m) if (present(s9)) then param%s9 = s9 @@ -1154,7 +1165,7 @@ subroutine get_mzero_damping(param, method, error, s9) end subroutine get_mzero_damping -subroutine get_optimizedpower_damping(param, method, error, s9) +subroutine get_optimizedpower_damping(param, method, error, s9, citation) !> Loaded parameter record type(d3_param), intent(out) :: param @@ -1165,6 +1176,9 @@ subroutine get_optimizedpower_damping(param, method, error, s9) !> Overwrite s9 real(wp), intent(in), optional :: s9 + !> Citation information + type(citation_type), intent(out), optional :: citation + !> Error handling type(error_type), allocatable, intent(out) :: error @@ -1202,7 +1216,7 @@ subroutine get_optimizedpower_damping(param, method, error, s9) param = d3_param(s6=1.0_wp, s8=1.69464_wp, a1=0.650_wp, a2=4.75_wp, bet=0.0_wp) end select - param%citation = get_citation(doi_dftd3_op) + citation = get_citation(doi_dftd3_op) if (present(s9)) then param%s9 = s9 From 64818f56bf9066881a8046fcc0effd14627630f0 Mon Sep 17 00:00:00 2001 From: Sebastian Ehlert <28669218+awvwgk@users.noreply.github.com> Date: Sun, 29 Sep 2024 14:50:22 +0200 Subject: [PATCH 4/8] Update src/dftd3/param.f90 --- src/dftd3/param.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dftd3/param.f90 b/src/dftd3/param.f90 index 96ed54e6..cb751934 100644 --- a/src/dftd3/param.f90 +++ b/src/dftd3/param.f90 @@ -777,7 +777,7 @@ subroutine get_rational_damping(param, method, error, s9, citation) end select if (.not.allocated(doi)) doi = doi_dftd3_bj - citation = get_citation(doi) + if (present(citation)) citation = get_citation(doi) if (present(s9)) then param%s9 = s9 From 3aaaa78e146492ca2f17128d06d44e6d9ef6860e Mon Sep 17 00:00:00 2001 From: Sebastian Ehlert <28669218+awvwgk@users.noreply.github.com> Date: Sun, 29 Sep 2024 14:50:35 +0200 Subject: [PATCH 5/8] Update src/dftd3/param.f90 --- src/dftd3/param.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dftd3/param.f90 b/src/dftd3/param.f90 index cb751934..387013f5 100644 --- a/src/dftd3/param.f90 +++ b/src/dftd3/param.f90 @@ -1060,7 +1060,7 @@ subroutine get_zero_damping(param, method, error, s9, citation) end select if (.not.allocated(doi)) doi = doi_dftd3_0 - citation = get_citation(doi) + if (present(citation)) citation = get_citation(doi) if (present(s9)) then param%s9 = s9 From dbae304e23cc3e6474e60893c12cbc86c9c0091a Mon Sep 17 00:00:00 2001 From: Sebastian Ehlert <28669218+awvwgk@users.noreply.github.com> Date: Sun, 29 Sep 2024 14:50:43 +0200 Subject: [PATCH 6/8] Update src/dftd3/param.f90 --- src/dftd3/param.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dftd3/param.f90 b/src/dftd3/param.f90 index 387013f5..486376a6 100644 --- a/src/dftd3/param.f90 +++ b/src/dftd3/param.f90 @@ -1156,7 +1156,7 @@ subroutine get_mzero_damping(param, method, error, s9, citation) param = d3_param(rs6=1.366361_wp, s8=1.280619_wp, bet=0.003160_wp) end select - citation = get_citation(doi_dftd3_m) + if (present(citation)) citation = get_citation(doi_dftd3_m) if (present(s9)) then param%s9 = s9 From d77312a02ad1d7461bff1cddcfb79e532262988a Mon Sep 17 00:00:00 2001 From: Sebastian Ehlert <28669218+awvwgk@users.noreply.github.com> Date: Sun, 29 Sep 2024 14:50:50 +0200 Subject: [PATCH 7/8] Update src/dftd3/param.f90 --- src/dftd3/param.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dftd3/param.f90 b/src/dftd3/param.f90 index 486376a6..df1088a9 100644 --- a/src/dftd3/param.f90 +++ b/src/dftd3/param.f90 @@ -1108,7 +1108,7 @@ subroutine get_mrational_damping(param, method, error, s9,citation) param = d3_param(a1=0.563761_wp, s8=0.906564_wp, a2=3.593680_wp) end select - citation = get_citation(doi_dftd3_m) + if (present(citation)) citation = get_citation(doi_dftd3_m) if (present(s9)) then param%s9 = s9 From 63a94e25fbc1802d75371720c00222337e438857 Mon Sep 17 00:00:00 2001 From: Sebastian Ehlert <28669218+awvwgk@users.noreply.github.com> Date: Sun, 29 Sep 2024 14:50:57 +0200 Subject: [PATCH 8/8] Update src/dftd3/param.f90 --- src/dftd3/param.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dftd3/param.f90 b/src/dftd3/param.f90 index df1088a9..e346f1c2 100644 --- a/src/dftd3/param.f90 +++ b/src/dftd3/param.f90 @@ -1216,7 +1216,7 @@ subroutine get_optimizedpower_damping(param, method, error, s9, citation) param = d3_param(s6=1.0_wp, s8=1.69464_wp, a1=0.650_wp, a2=4.75_wp, bet=0.0_wp) end select - citation = get_citation(doi_dftd3_op) + if (present(citation)) citation = get_citation(doi_dftd3_op) if (present(s9)) then param%s9 = s9