Skip to content

Commit

Permalink
Increase tolerance for rate check in pdep test
Browse files Browse the repository at this point in the history
Resolves #1682
  • Loading branch information
mliu49 committed Dec 6, 2019
1 parent 1655008 commit 08e8a1d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arkane/pdepTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ def test_pdep_job(self):
reaction_list = read_reactions_block(chem, dictionary)
rxn = reaction_list[0]
self.assertIsInstance(rxn.kinetics, Chebyshev)
self.assertAlmostEquals(rxn.kinetics.get_rate_coefficient(1000.0, 1.0), 88.88253229631246)
# Accept a delta of 0.2, which could result from numerical discrepancies
# See RMG-Py #1682 on GitHub for discussion
self.assertAlmostEquals(rxn.kinetics.get_rate_coefficient(1000.0, 1.0), 88.88253229631246, delta=0.2)

files = [f for f in os.listdir(os.path.join(self.directory, 'sensitivity', ''))
if os.path.isfile(os.path.join(self.directory, 'sensitivity', f))]
Expand All @@ -116,7 +118,7 @@ def test_pdep_job(self):
if '1000.0' in line:
break
sa_coeff = line.split()[-2]
self.assertEquals(float(sa_coeff), -8.23e-6)
self.assertAlmostEquals(float(sa_coeff), -8.23e-6, delta=0.02e-6)

@classmethod
def tearDown(cls):
Expand Down

0 comments on commit 08e8a1d

Please sign in to comment.