Jvp terok build (#5168)

Co-authored-by: Johann Pototschnig <j.pototschnig@hzdr.de>
This commit is contained in:
Johann Potot. 2026-05-11 18:06:14 +02:00 committed by GitHub
parent 432ceb16cc
commit fc8ffeed2f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 4 deletions

View file

@ -995,10 +995,10 @@ CONTAINS
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="REFERENCE_FUNCTIONAL", &
description="Use parameters for this specific density functional. "// &
"For available DFT-D4 functionals and parameters see: "// &
"<https://github.com/dftd4/dftd4/blob/main/src/dftd4/param.f90>. "// &
"For available D3 and D3(BJ) parameters see: "// &
"<https://www.chemie.uni-bonn.de/grimme/de/software/dft-d3>. "// &
"For the defintion of D4 parameters see: "// &
"<https://github.com/dftd4/dftd4>.", &
"<https://www.chemie.uni-bonn.de/grimme/de/software/dft-d3>.", &
usage="REFERENCE_FUNCTIONAL <functional>", &
type_of_var=char_t)
CALL section_add_keyword(subsection, keyword)

View file

@ -258,6 +258,9 @@ CONTAINS
IF (dispersion_env%ref_functional == "none") THEN
CALL get_rational_damping("pbe", param, s9=0.0_dp)
IF (.NOT. ALLOCATED(param)) THEN
CPABORT("D4: Failed to get rational damping parameters for default functional")
END IF
SELECT TYPE (param)
TYPE is (rational_damping_param)
param%s6 = dispersion_env%s6
@ -268,6 +271,9 @@ CONTAINS
END SELECT
ELSE
CALL get_rational_damping(dispersion_env%ref_functional, param, s9=dispersion_env%s9)
IF (.NOT. ALLOCATED(param)) THEN
CPABORT("D4: Unknown reference functional '"//TRIM(dispersion_env%ref_functional)//"'")
END IF
SELECT TYPE (param)
TYPE is (rational_damping_param)
dispersion_env%s6 = param%s6

View file

@ -166,6 +166,7 @@ CONTAINS
dispersion_env%s6 = 0._dp
dispersion_env%sr6 = 0._dp
dispersion_env%s8 = 0._dp
dispersion_env%s9 = 0._dp
dispersion_env%a1 = 0._dp
dispersion_env%a2 = 0._dp
dispersion_env%eps_cn = 0._dp
@ -175,7 +176,7 @@ CONTAINS
IF (.NOT. explicit) THEN
CALL section_vals_val_get(pp_section, "REFERENCE_FUNCTIONAL", explicit=exfun)
IF (.NOT. exfun) THEN
CPABORT("D4 vdW REFERENCE_FUNCTIONAL or D4_SCALING expected")
CPABORT("Missing REFERENCE_FUNCTIONAL or D4_SCALING for D4")
ELSE
CALL section_vals_val_get(vdw_section, &
"PAIR_POTENTIAL%REFERENCE_FUNCTIONAL", &
@ -190,6 +191,9 @@ CONTAINS
dispersion_env%sr6 = 0.0_dp
dispersion_env%ref_functional = "none"
END IF
IF (TRIM(ADJUSTL(dispersion_env%ref_functional)) == "none") THEN
CPABORT("Missing REFERENCE_FUNCTIONAL or D4_SCALING for D4")
END IF
CALL section_vals_val_get(pp_section, "EPS_CN", r_val=dispersion_env%eps_cn)
CALL section_vals_val_get(pp_section, "D4_REFERENCE_CODE", &
l_val=dispersion_env%d4_reference_code)