Fix to solvation thermo for lone pairs #364
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.