Skip to content

Commit

Permalink
add test for checking that R_Recombination doesn't react birads intra…
Browse files Browse the repository at this point in the history
…molecularly
  • Loading branch information
mjohnson541 committed Aug 7, 2019
1 parent aeea15a commit 8b2fa28
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions rmgpy/data/kinetics/familyTest.py
Expand Up @@ -68,7 +68,8 @@ def setUpClass(cls):
'1,2_shiftC',
'Intra_R_Add_Exo_scission',
'intra_substitutionS_isomerization',
'R_Addition_COm'
'R_Addition_COm',
'R_Recombination'
],
)
cls.family = cls.database.families['intra_H_migration']
Expand Down Expand Up @@ -637,7 +638,16 @@ def testSaveFamily(self):
os.path.join(settings['test_data.directory'], 'testing_database/kinetics/families/intra_H_copy/training/dictionary.txt')))
finally:
shutil.rmtree(os.path.join(settings['test_data.directory'], 'testing_database/kinetics/families/intra_H_copy'))


def testReactantNumID(self):
"""
Tests that templates aren't applied to the incorrect
number of reactants
"""
family = self.database.families['R_Recombination']
spc = Molecule().fromSMILES("[CH2]CC[CH2]")
out = family._KineticsFamily__generateReactions(reactants=[spc],forward=True)
self.assertTrue(out==[])

class TestTreeGeneration(unittest.TestCase):

Expand Down

0 comments on commit 8b2fa28

Please sign in to comment.