From 6c82faa0b194d27d8f2fcc023b72df905b22ee9d Mon Sep 17 00:00:00 2001 From: Susi Lehtola Date: Mon, 2 May 2022 09:46:06 -0400 Subject: [PATCH] Decrease P86C fudge factor from 1e-12 to DBL_EPSILON. (#162) * Decrease P86 fudge factor from 1e-12 to DBL_EPSILON. * Missed an instance of broken text in a previous commit --- src/functionals/p86c.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/functionals/p86c.cpp b/src/functionals/p86c.cpp index b996edb..d0996c7 100644 --- a/src/functionals/p86c.cpp +++ b/src/functionals/p86c.cpp @@ -15,6 +15,7 @@ #include "constants.hpp" #include "functional.hpp" #include "pz81c.hpp" +#include template static num Cg(const num & r) { parameter Cx = 0.001667; @@ -26,7 +27,7 @@ template static num Cg(const num & r) { template static num Pg(const densvars & d) { parameter Fg = 0.11; parameter Cinf = 0.004235; - parameter fudge = 1e-12; // Avoid instability at d.gnn = 0 + parameter fudge = DBL_EPSILON; // Avoid instability at d.gnn = 0 #ifndef INEXACT_PI parameter pi_expr = pow(9 * M_PI, 1.0 / 6.0); #else @@ -52,8 +53,8 @@ template static num p86c_corr(const densvars & d) { FUNCTIONAL(XC_P86C) = { "P86C GGA correlation", - "J.P. Density-functional approximation for the correlation energy\n" - "of the inhomogeneous electron , Phys. Rev. B, 33(12):8822gasPerdew,\n" + "J. P. Perdew, Density-functional approximation for the correlation energy\n" + "of the inhomogeneous electron, Phys. Rev. B 33, 8822 (1986).\n" "Implemented by Ulf Ekstrom.\n" "Reference data from ftp://ftp.dl.ac.uk/qcg/dft_library/data_pt_c_p86.html", XC_DENSITY | XC_GRADIENT,