From fa27613bea0f664846f88d92fdda2b54697ff3af Mon Sep 17 00:00:00 2001 From: Richard West Date: Mon, 17 Jul 2023 23:20:34 -0400 Subject: [PATCH] Fix ArrheniusBM.get_activation_energy unit test. The E0 had been changed, but the expected Ea not updated. --- rmgpy/kinetics/arrheniusTest.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rmgpy/kinetics/arrheniusTest.py b/rmgpy/kinetics/arrheniusTest.py index d7d4f72974b..d61d8b4b27b 100644 --- a/rmgpy/kinetics/arrheniusTest.py +++ b/rmgpy/kinetics/arrheniusTest.py @@ -528,7 +528,13 @@ def test_get_activation_energy(self): """ Hrxn = -44000 # J/mol Ea = self.arrhenius_bm.get_activation_energy(Hrxn) - self.assertAlmostEqual(Ea, 95074, delta=1e1) + + w = self.w0 + E0 = self.E0 + Vp = 2 * w * (w + E0)/(w - E0) + Ea_exp = (w + Hrxn/2) * (Vp - 2*w + Hrxn)**2 / (Vp*Vp - 4*w*w + Hrxn*Hrxn) + + self.assertAlmostEqual(Ea, Ea_exp, delta=1e1) ################################################################################