-
Notifications
You must be signed in to change notification settings - Fork 225
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
Cat fixes - vdw radicals, bidentates, resonance #2136
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2136 +/- ##
==========================================
- Coverage 47.24% 47.23% -0.01%
==========================================
Files 89 89
Lines 24151 24169 +18
Branches 6302 6309 +7
==========================================
+ Hits 11409 11417 +8
- Misses 11531 11539 +8
- Partials 1211 1213 +2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think everything here looks fine. There definitely shouldn't be any bidentate things matching with vdw families.
I don't think the best thing to do is to trash species after we generate charges/radicals/lone pairs on surface sites, but to prevent rmg from suggesting them in the first place.
Yes, I agree. The fix on this PR is a band-aid to prevent RMG from crashing, and we should avoid generating these types of structures in the first place. I think the filter on this PR is a sensible solution until we figure out how we want to generate resonance structs for adsorbates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think everything here looks fine. There definitely shouldn't be any bidentate things matching with vdw families.
I don't think the best thing to do is to trash species after we generate charges/radicals/lone pairs on surface sites, but to prevent rmg from suggesting them in the first place.Yes, I agree. The fix on this PR is a band-aid to prevent RMG from crashing, and we should avoid generating these types of structures in the first place. I think the filter on this PR is a sensible solution until we figure out how we want to generate resonance structs for adsorbates
Yes, sorry, I forgot to change the bubble from comment to approve!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, I agree with you and emily that this is a band-aid but hopefully when we have our surface resonance meetup with franklin we can revisit this. I tried it with an NO2/O2 on pt111 input file just to make sure it wouldn't give any errors. I had two concerns but other wise it looks ok
- the commented out logging in resonance.py (see my other comment)
- should we update the resonanceTest so we capture what we are doing for charged gas/surface and radical surface species?
Yes, we should add unit test that makes resonance structs with radicals on |
There was a problem hiding this 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 the fixes!
There was a comment up thread that a unit test should be added. Are we waiting for that before merging, or has it been done and I missed it? |
I still need to add that unit test before merging. I also might get rid of the logging or change it to debug because it looks ugly in the RMG log files. I'm also not completely satisfied with the way the filter works (makes bad structs then removes them). I can prevent them from being made, but I am not sure if that is a better long term solution since we may drastically change how resonance generation works for adsorbates 🤔 |
ea0f9a4
to
31b1feb
Compare
I added the unit test. I think the resonance fix on this PR is ok since it fixes a bug, but we should revisit resonance for adsorbates in the future. |
getting strange chemkin error in integration tests 🤔 |
do not generate resonance for charges species, ensure input charge equals output charge, and discard adsorbates with radicals, lone pairs or charges on `X`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I requested you check one thing (atom label swaps), and chris had a comment (about logging stuff)) that's not been resolved yet. Otherwise looks good to me. So, very nearly ready to merge.
One of the places where reactions that are their own reverse need to be hard-coded into RMG-Py
`Surface_Abstraction_Single_vdW` is generating products in the forward direction that violate the multiplcity of the template products
logging this as a warning clutters the RMG log files and it is not something the user should worry about
Thanks for the review Richard. Your label swaps for |
Doing it this way, the string formatting is not evaluated if you aren't actually going to log the debug statements (usually the case, as we normally don't run in verbose mode). Should be marginally quicker.
This was meant to be catalysis fixes, and yet the regression tests are showing a change in a gas phase molecule's thermo:
is this a false alarm? Could we have somehow changed from ring(Cyclopropene) to ring(oxirene) by tweaking a resonance algorithm, or is this a prior non-deterministic bug in RMG and we got unlucky? Looking at the code diff again, I can't think of anything that would cause this change. So maybe it's random? ...and so I check the issue tracker and sure enough: #2010 So, I'm satisfied it's not our fault, and am approving this PR. |
Motivation or Problem and Description of Changes
vdw radicals - We previously implemented a multiplicity check to ensure products in the reverse direction match the multiplicity of the template reactants . However, we are getting vdw products that do not obey multiplicity restriction in the forward direction (Undeterminable Kinetics Error of Surface_Abstraction_vdW family #2122) , so we also need to check this direction as well.
radicals on X - if resonance generation puts radicals/lone pairs/or a formal charge on
X
, RMG crashes. I added a commit on this PR to filter out these structuresbidentate vdw - We were getting bidentate vdw structures. This PR makes them forbidden for surface families
Testing
added unit test for forbidden vdw bidentates and successfully built an ammonia cat oxidation model that was previously crashing.