Skip to content
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

Allow hasStatMech to assess atomic molecules #1513

Merged
merged 1 commit into from
Jan 3, 2019

Conversation

goldmanm
Copy link
Contributor

Previously, hasStatMech would return True for any molecule with one atom, even if the E0 parameter was None. This raises issues when creating pdep networks from NASA polynomials in arkane since E0 is necessary. At the same time, this method does not check E0 parameters even for polyatomic
molecules.

This commit reworks hasStatMech to differentiate between atomic molecules, which it only checks the E0 parameter, and polyatomic molecules, which it checks both E0 and the number of modes.

I have tested the arkane example methoxy, which deals with atomic hydrogen, and this commit results in no change in that result. This commit does result in a fix when the user inputs an atomic molecule into the arkane input file given its NASA polynomial.

Reviewer Tips

Look over the code and let me know if anything should be added/fixed/etc.

@alongd
Copy link
Member

alongd commented Jan 2, 2019

@goldmanm, the code looks good, strange that the tests failed. Could you rebase and push, so we'll give the tests a second trial?

@alongd alongd self-requested a review January 2, 2019 14:30
Previously, hasStatMech would return True for any molecule with
one atom, even if the E0 parameter was None. This raises issues
when creating pdep networks since E0 is necessary. At the same
time, this method does not check E0 parameters even for polyatomic
molecules.

This commit reworks hasStatMech to differentiate between atomic
molecules, which it only checks the E0 parameter, and polyatomic
molecules, which it checks both E0 and the number of modes.
@goldmanm goldmanm force-pushed the hasStatMech_for_atomic_molecules branch from 88630d6 to ffd76ed Compare January 2, 2019 20:17
@codecov
Copy link

codecov bot commented Jan 2, 2019

Codecov Report

Merging #1513 into master will increase coverage by 0.04%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1513      +/-   ##
==========================================
+ Coverage   42.04%   42.08%   +0.04%     
==========================================
  Files         165      165              
  Lines       27821    27823       +2     
  Branches     5667     5668       +1     
==========================================
+ Hits        11697    11710      +13     
+ Misses      15340    15328      -12     
- Partials      784      785       +1
Impacted Files Coverage Δ
rmgpy/species.py 0% <0%> (ø) ⬆️
rmgpy/data/kinetics/family.py 58.58% <0%> (+0.29%) ⬆️
rmgpy/data/statmech.py 27.72% <0%> (+2.64%) ⬆️

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 d45415c...ffd76ed. Read the comment docs.

@goldmanm
Copy link
Contributor Author

goldmanm commented Jan 2, 2019

@alongd Seems like the tests passed this time.

Copy link
Member

@alongd alongd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome

@alongd alongd merged commit a70bd44 into master Jan 3, 2019
@alongd alongd deleted the hasStatMech_for_atomic_molecules branch January 3, 2019 00:04
@alongd alongd removed the Status: Ready for Review PR is complete and ready to be reviewed label Jan 3, 2019
@mliu49 mliu49 mentioned this pull request May 15, 2019
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants