Add T-Dependent and ML Options for Solvation Corrections #2798
+377
−200
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.
Summary
This PR adds new options to RMG's liquid-phase thermochemistry pipeline, allowing users to enable temperature-dependent solvation correction and choose between LSER- or ML-based methods. Previously, RMG only supported LSER correction and did not support temperature dependence or ML-based corrections.
Motivation or Problem
Description of Changes
Add
MLSolvation
class tormgpy/data/solvation.py
MLEstimator
class inmlEstimator.py
.mlSolvation
block in the input file, with parameters:T_dep
: Boolean to enable temperature-dependent model.method
: One ofSoluteGC
,SoluteML
, orDirectML
– specifying how to compute 298 K solvation properties.get_solvation_correction()
uses the selected approach to compute solvation corrections at 298K.generate_solvation_model()
returns either aTDepModel
orStaticModel
, depending on theT_dep
flag.Modify
rmgpy/thermo/thermoengine.py
andrmgpy/species.py
submit
function now includes a definition ofsolvationthermo
when a system is in the liquid phase.solvationthermo
is constructed usinggenerate_solvation_model()
underMLSolvation
.species.py
to store and accesssolvationthermo
.Add solvation correction to
rmgpy/reaction.py
rmgpy/thermo/thermoengine.py
. However, this approach posed challenges when integrating temperature-dependent models.rmgpy/reaction.py
at the point where thedGrxn
(Gibbs free energy of reaction) is calculated. A solvation correction thermddGsolv
(solvation free energy of reaction) is computed based on the solvation free energies of reactants and products. These values are from thesolvationthermo
of each species.Update in
test/rmgpy/data/solvationTest.py
Skip collision limit violation check in the liquid phase
rmgpy/rmg/main.py
are now skipped for reactions in the liquid phase because the check sweeps temperatures up to 2000K, but temperature-dependent solvation models are only valid below the solvent's critical temperature.Testing
T_dep=True
yields aTDepModel
andT_dep=False
returns aStaticModel
.method
parameter correctly alters the computed solvation correction (SoluteGC
,SoluteML
, orDirectML
). However, bothSoluteML
andDirectML
are currently implemented as dummy methods that return zero correction.