Skip to content
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

Fix bug RMG-database #81 #517

Merged
merged 6 commits into from
Jan 8, 2016
Merged

Fix bug RMG-database #81 #517

merged 6 commits into from
Jan 8, 2016

Conversation

nickvandewiele
Copy link
Contributor

This PR fixes the duplicated reactions that were erroneously not discovered as already existing reactions in the reaction database.

This issue was mentioned here and in #513.

An attempt at creating a unit test that reproduces this is found in the testGenerateReactions module for lack of a better place.

The added unit test generates reactions for 3 input reactants (HCJ=O, CH2O, and [CH2]OC=O) through a single reaction family (radical addition to double bond). The one reaction

HCJ=O + CH2O <=> [CH2]OC=O

that results from applying this reaction family, is also present in the seed mechanism (methylformate) that is imported. It is checked whether the total number of reactions in the final model is equal to the expected number.

Importing the library as a reaction library rather than a seed mechanism and only generating 1 reaction is currently not working due to #515.

@nickvandewiele nickvandewiele changed the title Fixbug rmg database 81 Fix bug RMG-database #81 Jan 7, 2016
also change variables names to reflect that the variables are the
Family/Library objects rather than the corresponding strings.
the "library" variable from the reaction dict is a string. it needs
to be converted to the corresponding object before we can check
whether it is a Family or Library.
idem dito for reactants0/products0
The test generates radical addition reactions between the 3 reactants.

One of the radical addition reactions is also present in the
seed mech

The test checks whether the reaction will only appear once in the final
model.
prevents attempting to load the (singleton) database more than once.
@nickvandewiele nickvandewiele force-pushed the fixbug_RMG-database_81 branch from 2f6592e to 97f0dd8 Compare January 8, 2016 13:57
nickvandewiele added a commit that referenced this pull request Jan 8, 2016
@nickvandewiele nickvandewiele merged commit 4a86810 into master Jan 8, 2016
@nickvandewiele nickvandewiele deleted the fixbug_RMG-database_81 branch January 8, 2016 14:37
@nickvandewiele nickvandewiele restored the fixbug_RMG-database_81 branch January 8, 2016 14:38
@connie connie deleted the fixbug_RMG-database_81 branch January 11, 2016 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant