-
Notifications
You must be signed in to change notification settings - Fork 230
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
fixed the solvation GAV heuristic #1832
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1832 +/- ##
==========================================
- Coverage 43.98% 43.94% -0.05%
==========================================
Files 83 83
Lines 21581 21565 -16
Branches 5653 5652 -1
==========================================
- Hits 9492 9476 -16
+ Misses 11043 11029 -14
- Partials 1046 1060 +14
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.
The code changes look good to me. Does the existing unit test check values? Do you expect substantial changes in the resulting solvation corrections with this change?
@mliu49 The existing unit test checks the value, but the species in the test does not have any resonance structure, so the value did not change with this code. I addded a unit test that estimates the solvation energy of a species using its various resonance structures in molecule list and check that the one calculated by the |
c20f207
to
e6a704f
Compare
For solute data group additivity, instead of averaging over all resonance structures in species.molecule list, only get the solute data estimation for the first item in species.molecule list as it corresponds to the most stable resonance structure found by gas-phase thermo estimation. This heutristic is chosen so the solvation GAV method is consistent with the gas phase thermo GAV method.
I simplified some lines in the existing solvation unit test
A unit test is added to check that the solute data are estimated correctly using the GAV for the species with multiple resonance structures. For the species with resonance structures, the estimated solute data / solvation energy should match those estimated for the first item in the species's molecule list.
e6a704f
to
cbf446f
Compare
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.
Thanks! I think this looks good.
Motivation or Problem
Solvation group additivity was estimating solute data by averaging over all molecules in species.molecule list (so it was averaging over all resonance structure). However, when the solvation solute groups were fitted from the experimental values, they were fitted using the SMILES of the most stable resonance structure in gas phase. Therefore, averaging over all resonance structures is not a correct way. Instead, it should be estimating solute data from only the most stable structure found by gas-phase.
Extra Note:
Once might be concerned that the most stable resonance structure might change in liquid phase. But the change in the resonance structures when a species is solvated is already reflected in the experimental solvation energies, which are measured for a certain species in general, not for its particular resonance structures. Since we fitted the solute group to these experimental solvation energies using the SMILES of the most stable gas phase resonance structures, we should be consistent with using the same SMILES when we estimate the solute data.
Description of Changes
In
def get_solute_data_from_groups
, instead of iterating over all molecules and averaging, it only calculates the solute data for the first item in the molecule list,species.molecule[0]
as it is the SMILES of the most stable gas phase resonance structure found.Testing
I did not add any test since the unittest for
get_solute_data_from_groups
already exists.I can add more unittests if necessary.
Reviewer Tips
Suggestions for verifying that this PR works or other notes for the reviewer.