ReactionMechanismGenerator / ARC

ARC - Automatic Rate Calculator
https://reactionmechanismgenerator.github.io/ARC/index.html
MIT License
43 stars 21 forks source link

Fix Reaction.get_element_mass() #609

Closed alongd closed 1 year ago

alongd commented 1 year ago

The get_element_mass method in Reaction iterates through the elements of the reactants and returns the mass of the respective elements. However, it doesn't take into account that when a reaction has two identical reactant (e.g., OH + OH <=> H2O2), ARC only stores one instance of the reactant species to avoid running duplicate identical QM jobs. This method was fixed and it uses now the get_reactants_and_products method that considers identical reactants/products. A test was added.

codecov[bot] commented 1 year ago

Codecov Report

Merging #609 (e6628a0) into main (b7fc76f) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #609   +/-   ##
=======================================
  Coverage   72.17%   72.17%           
=======================================
  Files          97       97           
  Lines       25559    25560    +1     
  Branches     5390     5390           
=======================================
+ Hits        18446    18449    +3     
+ Misses       5754     5753    -1     
+ Partials     1359     1358    -1     
Impacted Files Coverage Δ
arc/reaction.py 68.85% <100.00%> (ø)
arc/reaction_test.py 78.24% <100.00%> (+0.03%) :arrow_up:

... and 1 file with indirect coverage changes

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