From fc815fc0a4e73ac768b85f99a686a610a9c6313d Mon Sep 17 00:00:00 2001 From: Max Liu Date: Thu, 4 Apr 2019 18:12:32 -0400 Subject: [PATCH] Sort reaction species by index --- rmgpy/rmg/model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rmgpy/rmg/model.py b/rmgpy/rmg/model.py index 037ea8af0c4..0134168a51b 100644 --- a/rmgpy/rmg/model.py +++ b/rmgpy/rmg/model.py @@ -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.