Skip to content

Commit

Permalink
Sort reaction species by index
Browse files Browse the repository at this point in the history
  • Loading branch information
mliu49 committed Apr 4, 2019
1 parent 01aaf8f commit fc815fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rmgpy/rmg/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ def checkForExistingReaction(self, rxn):
"""

# Make sure the reactant and product lists are sorted before performing the check
rxn.reactants.sort()
rxn.products.sort()
rxn.reactants.sort(key=lambda x: x.index)
rxn.products.sort(key=lambda x: x.index)

# If reactants and products are identical, then something weird happened along
# the way and we got a symmetrical reaction.
Expand Down

0 comments on commit fc815fc

Please sign in to comment.