RMG-Py icon indicating copy to clipboard operation
RMG-Py copied to clipboard

Adding halogens kinetics (twin with DB)

Open davidfarinajr opened this issue 4 years ago • 4 comments

This PR is a simultaneous with https://github.com/ReactionMechanismGenerator/RMG-database/pull/515

It adds a commit to swap labels for halogen abstraction reactions since these families are their own reverse (similar to h abstraction). It also swaps labels for 1,2_xy_interchange which is also its own reverse

davidfarinajr avatar May 19 '21 19:05 davidfarinajr

Codecov Report

Merging #2135 (ace72d4) into main (40b5558) will decrease coverage by 0.01%. The diff coverage is 40.00%.

@@            Coverage Diff             @@
##             main    #2135      +/-   ##
==========================================
- Coverage   48.15%   48.14%   -0.01%     
==========================================
  Files         110      110              
  Lines       30626    30629       +3     
  Branches     7988     7989       +1     
==========================================
  Hits        14747    14747              
- Misses      14351    14353       +2     
- Partials     1528     1529       +1     
Impacted Files Coverage Δ
rmgpy/data/kinetics/family.py 48.05% <40.00%> (-0.06%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar May 19 '21 20:05 codecov[bot]

I tried running the 2-BTP example file and it errored out after about 2 minutes. I'll see if I can figure out why, but here's the error message if you have time to take a look:

Traceback (most recent call last):
  File "/home/moon/rmg/RMG-Py//rmg.py", line 118, in <module>
    main()
  File "/home/moon/rmg/RMG-Py//rmg.py", line 112, in main
    rmg.execute(**kwargs)
  File "/home/moon/rmg/RMG-Py/rmgpy/rmg/main.py", line 925, in execute
    trimolecular_react=self.trimolecular_react)
  File "/home/moon/rmg/RMG-Py/rmgpy/rmg/model.py", line 654, in enlarge
    self.apply_kinetics_to_reaction(reaction)
  File "/home/moon/rmg/RMG-Py/rmgpy/rmg/model.py", line 897, in apply_kinetics_to_reaction
    kinetics, source, entry, is_forward = self.generate_kinetics(reaction)
  File "/home/moon/rmg/RMG-Py/rmgpy/rmg/model.py", line 925, in generate_kinetics
    return_all_kinetics=False)
  File "/home/moon/rmg/RMG-Py/rmgpy/data/kinetics/family.py", line 2711, in get_kinetics
    kinetics, entry = self.get_kinetics_for_template(template, degeneracy, method=estimator)
  File "/home/moon/rmg/RMG-Py/rmgpy/data/kinetics/family.py", line 2628, in get_kinetics_for_template
    return self.estimate_kinetics_using_rate_rules(template, degeneracy)  # This returns kinetics and entry data
  File "/home/moon/rmg/RMG-Py/rmgpy/data/kinetics/family.py", line 2779, in estimate_kinetics_using_rate_rules
    kinetics, entry = self.rules.estimate_kinetics(template, degeneracy)
  File "/home/moon/rmg/RMG-Py/rmgpy/data/kinetics/rules.py", line 622, in estimate_kinetics
    while entry.parent is not None:

The full log of the RMG run is here: RMG.log

sevyharris avatar Sep 01 '21 23:09 sevyharris

Thanks for reviewing this @sevyharris ! Not sure exactly what's going wrong here, but I can take a closer look later this week. I am not sure what version of the database you are using to run the example, but I think we need to use the DB from both https://github.com/ReactionMechanismGenerator/RMG-database/pull/515 and https://github.com/ReactionMechanismGenerator/RMG-database/pull/514 for it to work

davidfarinajr avatar Sep 01 '21 23:09 davidfarinajr

Okay, I've probably got the wrong version of the database. Is there a single database branch that has the changes from both 514 and 515? I was using halogen_kinetics for RMG-database, but I see there's also halogen_training_reactions and only_halogens_families. Are any of these the correct one to use?

Also for RMG-Py I was using the halogens_kinetics branch.

sevyharris avatar Sep 06 '21 19:09 sevyharris