Skip to content

Conversation

@davidfarinajr
Copy link
Contributor

This PR added a constraints param to the add_rules_from_training method 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 allowed

Using 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 facet constraint 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.

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.
@davidfarinajr davidfarinajr force-pushed the training_rxns_filter branch from 5cfeb66 to 3a8dc47 Compare May 28, 2021 18:16
@davidfarinajr
Copy link
Contributor Author

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:

  1. strict - assume isomorphic iff metal and facet match
  2. medium - use BEP to scale the Ea based on the thermo of reaction (could enforce that facets match here or not, not sure)
  3. loose - ignore metal and facet and allow all isomorphic matches

@codecov
Copy link

codecov bot commented May 28, 2021

Codecov Report

Merging #2145 (3a8dc47) into master (38c49f7) will increase coverage by 0.00%.
The diff coverage is 15.90%.

Impacted file tree graph

@@           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     
Impacted Files Coverage Δ
rmgpy/rmg/input.py 40.24% <5.26%> (-1.03%) ⬇️
rmgpy/data/kinetics/family.py 48.68% <21.73%> (-0.25%) ⬇️
rmgpy/rmg/main.py 22.56% <50.00%> (+0.05%) ⬆️
arkane/kinetics.py 12.24% <0.00%> (ø)
rmgpy/molecule/draw.py 54.03% <0.00%> (+1.28%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 38c49f7...3a8dc47. Read the comment docs.

mazeau
mazeau previously approved these changes May 30, 2021
Copy link
Contributor

@mazeau mazeau left a 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.

@Tingchenlee Tingchenlee requested a review from mazeau May 30, 2021 19:19
@rwest
Copy link
Member

rwest commented Jun 4, 2021

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)

@rwest
Copy link
Member

rwest commented Jun 4, 2021

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...

@davidfarinajr davidfarinajr changed the base branch from master to main October 1, 2021 17:39
@davidfarinajr davidfarinajr dismissed mazeau’s stale review October 1, 2021 17:39

The base branch was changed.

@github-actions
Copy link

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.

@github-actions github-actions bot added the stale stale issue/PR as determined by actions bot label Jun 21, 2023
@github-actions github-actions bot added the abandoned abandoned issue/PR as determined by actions bot label Jul 23, 2023
@github-actions github-actions bot closed this Jul 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

abandoned abandoned issue/PR as determined by actions bot stale stale issue/PR as determined by actions bot Status: WIP This is currently work-in-progress Topic: Catalysis Topic: Kinetics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants