-
Notifications
You must be signed in to change notification settings - Fork 227
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
Resonance structures of adsorbates don't put radicals on the surface. #1828
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1828 +/- ##
==========================================
- Coverage 47.16% 47.12% -0.05%
==========================================
Files 88 88
Lines 23189 23189
Branches 6033 6033
==========================================
- Hits 10938 10928 -10
- Misses 11103 11110 +7
- Partials 1148 1151 +3
Continue to review full report at Codecov.
|
I think the changes themselves look good, and the approach seems to make sense physically. I'm wondering if this has any dangerous consequences. The first thing that comes to mind is conservation of electrons/multiplicity. If a surface species has one resonance structure with a radical and one without, then you could get what appears to be a radical recombination with a stable species or H abstraction from a radical. I guess it wouldn't matter when simulating though. Also, would this result in any weird thermo estimates? Since we take the structure with the lowest H298. |
29507f2
to
4aae76c
Compare
Some strange things showing up that I don't understand but are quite possibly related to this. One problem: radical adsorbates still showing up
and a vdW one
and a biradical vdW adsorbed
Another weird thing:
that is a duplicate of a species that's already there
These are copied from the chemkin/species_dictionary.txt file. |
4aae76c
to
16f605d
Compare
Note to self: Gas phase radicals should not adsorb via van-der-Waals. |
f11caa5
to
f59c39d
Compare
If you can't find adsorption energy group value, log the adjacency list of the molecule.
Tiny change. Increases readability and presumably speed.
This may hide bugs, or it may be exactly the right thing to do. I'm not entirely sure. But it currently seems like a good idea. The presumption is: surface sites of metals should not have unpaired or pairs of electrons - they just have a big sea of delocalized electrons at their disposal. See #1820
…multiplicity. When a metal surface is involved, your adsorbate may have different multiplicity in different resonance forms because you may hybridize a radical onto the metal where it "disappears". It is an attempt to address #1820
Trying to forbid them using the forbidden structures doesn't seem to be working (a bug in is_subgraph_isomorphic?) but making the top level node have multiplicity [1,3] excludes anything with multiplicity 2 and seems to work on a generate_reactions level. Probably a better solution anyway, as it's inefficient to match the node, apply the recipe, generate the products, and *then* discard them as forbidden.
f59c39d
to
6f9803c
Compare
Changing base and attempting to rebase. Would be nice to get these fixes and tests in, if possible. |
@rwest there is a simple conflict to resolve and then this PR can be evaluated for merging. Please resolve if still worth doing, or close otherwise. |
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. |
Motivation or Problem
See #1820 for details.
Synopsis:
resonance structure generation was shuffling radicals and double bonds around and ending up with a radical on a surface site
X
. This adsorbate (with a radical onX
) then failed to match anything in the adsorption thermochemistry tree and raised a thermo error.Description of Changes
The fix proposed in this PR is: if you try to increment the radical (or lone pair) count on a surface site, it has no effect.
This has a consequence that some resonance structures of an adsorbate have unpaired electrons and some don't. In order for such Species to be passed back and forth through multiprocessing, the
__init__
method ofSpecies
needed modifying to allow different multiplicities when creating a species; this is only permitted for adsorbates.Testing
A few large models with heterogeneous surface chemistry have been run without any errors.
Modified a unit test as needed. Ran unit tests.
Other
Also includes a couple of small fixes made along the way: one tiny change to make code more readable and fast, and one to improve diagnostic error logging.