-
Notifications
You must be signed in to change notification settings - Fork 250
Training reactions constraints #2145
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
Conversation
reactions will only be used to make rate rules if they satisfy provided `constraints`. This will allow us to only make rate rules for surface reactions on`111` facets, for example, and skip other facets in the training reactions.
5cfeb66 to
3a8dc47
Compare
|
Note - this PR does not fix the "issue" that if a surface training reaction is isomorphic to a reaction in the model, the kinetics for that training reaction will be assigned to that reaction, regardless of metal or facet. A further discussion is needed to determine what approach to take here:
|
Codecov Report
@@ Coverage Diff @@
## master #2145 +/- ##
=======================================
Coverage 47.43% 47.43%
=======================================
Files 89 89
Lines 23995 24036 +41
Branches 6258 6278 +20
=======================================
+ Hits 11381 11402 +21
- Misses 11411 11433 +22
+ Partials 1203 1201 -2
Continue to review full report at Codecov.
|
mazeau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me! Thanks for adding this in. I think you should add in more unit tests in general, but also to make sure you can use 2 constraints or more at once, like only wanting to use Pt111 things or something.
|
We could make it remove the training reactions that don't satisfy the constraints, so that they don't get turned into rules and they don't get used later if fully isomorphic. And/or we could say anything that's not fully isomorphic (with metal and facet) then don't use the training reaction (from the wrong metal or facet) and instead use the tree-based estimate (which would at least be a specific node) |
|
What to do with Matt's auto-generated trees when we have different metals and facets is an unsolved problem to be discussed another day... |
|
This pull request is being automatically marked as stale because it has not received any interaction in the last 90 days. Please leave a comment if this is still a relevant pull request, otherwise it will automatically be closed in 30 days. |
This PR added a
constraintsparam to theadd_rules_from_trainingmethod so that the user can use certain criteria to pick and choose which training reactions to include (and exclude) when creating rate rules for non-auto gen families when the rules are compiled at the start of an RMG job. The constraints are:metal: list of allowed metals (e.g ['Pt'])facet: list of allowed facets (e.g ['111'])elements: list of allowed elements (e.g ['C','H','O'])forward_only: True/False, if True, only reactions in the forward direction are allowedUsing these constraints will allow us to customize the kinetics trees for individual RMG jobs. For example, we know that the facet can have a profound affect on activation barriers (https://www.nature.com/articles/s41467-019-12858-3 shows example with CO2), and using a
facetconstraint will enable use to constrain which facets we want to include when creating rate rules.Although we don't have many surface training reactions in the database right now, adding constraints will be more useful as we continue to add more training data (as we are doing in the PR ReactionMechanismGenerator/RMG-database#479)
Testing
I have not added any unit tests yet, but I built a few surface ammonium oxidation models with and without training reactions constraints.