-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report reactants and products in a consistent deterministic order #1616
Comments
I tried sorting by species ID recently. It seemed to work very well, but resulted in an unexpected change to one of the unit tests for the explorer feature of Arkane. I haven't had a chance to look more into what caused the change yet. |
Is there a reason they're shuffled in the first place? I would have thought they'd be generated in a deterministic order. |
Wow. A couple of four-year-old issues! that even look like they have solutions proposed? |
This one is still bugging me! But I'm hopeful the recent changes to sorting and comparison methods I spotted on the Python 3 branch may put this to bed... |
I think this should be fixed now. Species sorting now uses comparison methods (implemented in 0c0c7ed), which use the new |
Motivation or Problem
Whenever I re-run an RMG simulation and then
diff
the log files or chemkin files to see what has changed, I have a ton of changes like this:where it is just a reaction is written as
16 + 34 <=> 7
one time but34 + 16 <=> 7
the next.Desired Outcome
I'd like the log files and chemkin files to come out identical if the models are chemically identical, so that what shows up in a
git diff
is actually a difference.Possible solutions
We could sort by species ID, eg. we always put the lowest number first, like
16 + 34 <=> 7
, for example.Or for library and seed reactions it could preserve the order as originally written (make it easier to look up original sources)
For template reactions we might use the labels (eg. the molecule with *1 always goes first) so that reactions of the same type are written consistently (eg.
abstractee + abstractor =>
oralkene + radical =>
).The text was updated successfully, but these errors were encountered: