-
Notifications
You must be signed in to change notification settings - Fork 229
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
Fix to solvation thermo for lone pairs #364
Conversation
I just added a commit that actually looks up the radical correction to A. Goes along with my pull request on RMG-database ReactionMechanismGenerator/RMG-database#62 |
Did you see my pull request on your master branch? |
Modified procedures to change lone pairs to radicals based on the atom's valency, and then saturate the radicals with hydrogens. When unsaturating, we re-add a radical correction to the H-bonding parameter 'A'. Eventually, a radical library will be added for this, but for now, every Oxygen radical that had been saturated will be corrected with a value of -0.345, which is the value for -OH and -OOH. Added a couple of unit tests.
Checks in solvation radical database for the proper correction to 'A'.
Wanted to test ammonia to see that lone pair saturation doesn't saturate ammonia which is neutral.. However the R group for nitrogen does not have data.
@connie I merged in your pull request and rebased onto official master. I added in data for N3sH2 (which was missing for some reason), but I didn't add data to the top nodes. I don't think it's a good idea; theoretically, there should be a Platts group for every heavy atom group we encounter. If we are falling up to the top node and we just put zeroes for everything, we won't get an error, and then we won't see that we are missing data. The database branch is now ready to merge too (and I think the Travis test should pass when it is). |
Fix to solvation thermo for lone pairs
This addresses issue #342 .
When a lone pair is encountered, we turn it into two unpaired electrons for the purpose of adding hydrogens and looking up the solvation thermo of the saturated structure. But we only replace the lone pairs based on the usual valency of the atom. For example for CH2(S) we would replace that lone pair to make sum(unpaired electrons + bonds + charge) be equal to 4. But for H2O we wouldn't replace the lone pairs on Oxygen.
When we "unsaturate" the radicals, we should also correct the "A" H-bonding parameter that we previously calculated for the saturated structure. In the future we can have a radical solute library in the database, which "cancels" out the A value that we got from the molecule, as in RMG-Java. As a quick fix for right now, I am only correcting oxygen radicals, with a value of -0.345. 0.345 is the A value for -OH and -OOH. In the RMG-Java database, we have one additional entry for O in carboxylic acids; in RMG-Py, we will also need values for N and S radicals.
Also, an old fixup to the documentation that I never committed.