Last active
August 29, 2015 14:21
-
-
Save nickvandewiele/00fded046ea086a66c13 to your computer and use it in GitHub Desktop.
Testing the random way of sorting reactants of reaction when calling Reaction.reactants.sort()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cPickle | |
from rmgpy.species import Species | |
from rmgpy.reaction import Reaction | |
a = Species(...) | |
b = Species(...) | |
r = Reaction() | |
r.reactants = [a,b] | |
r.reactants.sort() | |
r_pickle = cPickle.loads(cPickle.dumps(r)) | |
r_pickle.reactants.sort() | |
for spc, spc_pickle in zip(r.reactants, r_pickle.reactants): | |
assert.assertTrue(spc.isIsomorphic(spc_pickle) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment