D4: correctly set CN rc cutoff (#4821)

This commit is contained in:
Juerg Hutter 2026-02-11 15:04:18 +01:00 committed by GitHub
parent 0805bbdd34
commit 2f8dfa158c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -966,7 +966,7 @@ CONTAINS
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="D4_CN_CUTOFF", &
description="Coordination number cutoff for D4", &
usage="D4_CN_CUTOFF 30.0", default_r_val=10.0_dp, &
usage="D4_CN_CUTOFF 30.0", default_r_val=-1.0_dp, &
unit_str="angstrom")
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)

View file

@ -350,7 +350,9 @@ CONTAINS
dispersion_env%alp = 14._dp
!
dispersion_env%cnfun = 3
dispersion_env%rc_cn = get_cn_radius(dispersion_env)
IF (dispersion_env%rc_cn < 0.0_dp) THEN
dispersion_env%rc_cn = get_cn_radius(dispersion_env)
END IF
IF (PRESENT(pp_section)) THEN
eeq_section => section_vals_get_subs_vals(pp_section, "EEQ")
CALL read_eeq_param(eeq_section, dispersion_env%eeq_sparam)