Skip to content

Commit

Permalink
Increase tolerance in test_get_enthalpy_quantum_fourier
Browse files Browse the repository at this point in the history
When testing HinderedRotor.get_enthalpy() method using a Fourier series potential
 in the quantum limit it calls get_enthalpy
 which in the quantum limit calls solve_schrodinger_equation
 which calls scipy.linalg.eig_banded(H, lower=True, eigvals_only=True, overwrite_a_band=True)

 There's a lengthy discussion in #1682
 trying to track down the possibility of a bug.
In the end they increased the tolerance on a test.

Since nothing has changed recently, except some C libraries etc. on conda-forge,
I propose taking the same approach, and relaxing
the tolerance
  • Loading branch information
rwest committed Jun 7, 2023
1 parent 211f034 commit cd2b77a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rmgpy/statmech/torsionTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def test_get_enthalpy_quantum_fourier(self):
h_exp_list = np.array([0.548251, 0.728974, 0.762396, 0.718702, 0.681764]) * constants.R * t_list
for temperature, h_exp in zip(t_list, h_exp_list):
h_act = self.mode.get_enthalpy(temperature)
self.assertAlmostEqual(h_exp, h_act, delta=1e-3 * h_exp)
self.assertAlmostEqual(h_exp, h_act, delta=2e-3 * h_exp)

def test_get_entropy_free(self):
t_list = np.array([300, 500, 1000, 1500, 2000])
Expand Down

0 comments on commit cd2b77a

Please sign in to comment.