RMG-Py
RMG-Py copied to clipboard
Add training reactions from library
Motivation or Problem
I was working on a script to add training reactions from a library, then I found this awesome python notebook that already does this :). This PR adds some features and bug fixes to the library to training notebook and tools.
Description of Changes
- Skip over kinetics in library not suitable for training reactions (Pdep, MultiArrhenius, etc)
- change A units only for gas phase kinetics
- search for isomorphic reactions already in training, skip the library reactions if identical (isomorphic with same kinetics) and compare kinetics with isomorphic training reactions
- option to manually selection in step 1 while we are comparing kinetics.
- do not relabel the products while getting the species labels for a reaction. Without this option, for some families, like H_Abstraction, the products are relabeled with reactant labels to match with forbidden species for the family.
- option to save unmatched reaction to a new library, perhaps to use as seed mechanism or to save for later to figure out if new families are needed
Testing
Added training reactions from a 2-BTP kinetic library
Reviewer Tips
Give it a try.
Unresolved issues
- A forbidden species in your library (like CH) will cause this code to crash, we may need to just skip over these reactions or add an allowed species option
- we may want to load all thermo libraries by default. If your thermo is bad and the training reaction is in reverse, the kinetics can be ugly
This pull request introduces 1 alert when merging 1922d691719b26913edf28e6a354fa0dab5df26f into 1e21621d3a7cf75dc7085b7ada330941021018d2 - view on LGTM.com
new alerts:
- 1 for Except block handles 'BaseException'
Codecov Report
Merging #2061 (fd82ade) into master (209d194) will increase coverage by
0.04%
. The diff coverage is86.79%
.
@@ Coverage Diff @@
## master #2061 +/- ##
==========================================
+ Coverage 47.54% 47.59% +0.04%
==========================================
Files 89 89
Lines 23565 23574 +9
Branches 6131 6135 +4
==========================================
+ Hits 11204 11219 +15
+ Misses 11177 11173 -4
+ Partials 1184 1182 -2
Impacted Files | Coverage Δ | |
---|---|---|
rmgpy/data/kinetics/family.py | 48.61% <86.79%> (-0.10%) |
:arrow_down: |
arkane/kinetics.py | 12.24% <0.00%> (ø) |
|
rmgpy/molecule/draw.py | 53.09% <0.00%> (+1.11%) |
:arrow_up: |
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 209d194...fd82ade. Read the comment docs.
I nominated @hwpang as a reviewer, because it looks like she recently worked on this tool.
This pull request introduces 3 alerts when merging 6512be5556093ec96d4ee425b62202209272fa75 into 773564358a141fbe7384d27ae5fac69ef3ff39ac - view on LGTM.com
new alerts:
- 2 for Except block handles 'BaseException'
- 1 for Non-callable called
This pull request introduces 3 alerts when merging fd82ade12f34b9f25da0e2ff22979fb731afeedb into 209d194ddde989b93369ec6c7e875c966c430893 - view on LGTM.com
new alerts:
- 3 for Except block handles 'BaseException'
This pull request introduces 3 alerts when merging b399343101a0bcad53834c26fd42b7d5118d2822 into f07039c3c86a02c667a273d1a33910da3c51ce8e - view on LGTM.com
new alerts:
- 3 for Except block handles 'BaseException'
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.