From 95dc1ed6020ad2d6bac8ee0b0ad54aa881d5c6fe Mon Sep 17 00:00:00 2001 From: Emily Mazeau Date: Tue, 3 Dec 2019 12:55:19 -0500 Subject: [PATCH] reversing the loop, suggested by mliu49. This should make all tests pass now --- rmgpy/data/kinetics/family.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rmgpy/data/kinetics/family.py b/rmgpy/data/kinetics/family.py index d757970bb69..eaca638fd1d 100644 --- a/rmgpy/data/kinetics/family.py +++ b/rmgpy/data/kinetics/family.py @@ -243,7 +243,7 @@ def get_reverse(self): of the reaction that this is the recipe for. """ other = ReactionRecipe() - for action in self.actions: + for action in reversed(self.actions): # Play the reverse recipe in the reverse order if action[0] == 'CHANGE_BOND': other.add_action(['CHANGE_BOND', action[1], str(-int(action[2])), action[3]]) elif action[0] == 'FORM_BOND': @@ -258,7 +258,7 @@ def get_reverse(self): other.add_action(['GAIN_PAIR', action[1], action[2]]) elif action[0] == 'GAIN_PAIR': other.add_action(['LOSE_PAIR', action[1], action[2]]) - other.actions = reversed(other.actions) # Play the reverse recipe in the reverse order + # other.actions = reversed(other.actions) # Play the reverse recipe in the reverse order return other def _apply(self, struct, forward, unique):