Skip to content

Commit

Permalink
raise error when checking for same reactants if provided more than 3 …
Browse files Browse the repository at this point in the history
…reactants
  • Loading branch information
jonwzheng committed Apr 4, 2024
1 parent 09f7354 commit e77d985
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rmgpy/data/kinetics/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@ def check_for_same_reactants(reactants):
same_reactants = 2

Check warning on line 263 in rmgpy/data/kinetics/common.py

View check run for this annotation

Codecov / codecov/patch

rmgpy/data/kinetics/common.py#L263

Added line #L263 was not covered by tests
elif reactants[1].is_isomorphic(reactants[2]):
same_reactants = 2
elif len(reactants) > 3:
raise ValueError('Cannot check for duplicate reactants if provided number of reactants is greater than 3. '

Check warning on line 267 in rmgpy/data/kinetics/common.py

View check run for this annotation

Codecov / codecov/patch

rmgpy/data/kinetics/common.py#L267

Added line #L267 was not covered by tests
'Got: {} reactants'.format(len(reactants)))

return reactants, same_reactants

def find_degenerate_reactions(rxn_list, same_reactants=None, template=None, kinetics_database=None,
Expand Down

0 comments on commit e77d985

Please sign in to comment.