solvation¶
- mdhelper.openmm.pair.solvation(cutoff: float | Quantity, cutoff_solvation: float | Quantity = None, *, mix: str = 'arithmetic', per_params: list = None, global_params: dict[str, float | Quantity] = None, tab_funcs: dict[str, ndarray[int | float] | Quantity | Discrete2DFunction] = None) CustomNonbondedForce [source]¶
Implements the solvation pair potential.
The solvation energy between particles is given by
\[u_\mathrm{solv}(r_{12})=-S_{12}\left[\left( \frac{\sigma_{12}}{r_{12}}\right)^4 -\left(\frac{\sigma_{12}}{r_\mathrm{cut}}\right)^4\right]\]where \(\sigma_{12}\) is the size of the particle in \(\mathrm{nm}\) and \(S_{12}\) is the solvation strength in \(\mathrm{kJ/mol}\).
After creating the pair potential, particles should be registered using
openmm.openmm.CustomNonbondedForce.addParticle()
.- Parameters:
- cutofffloat or openmm.unit.Quantity
Shared cutoff distance for all nonbonded interactions in the simulation sytem. Must be less than half the minimum periodic simulation box dimension.
Reference unit: \(\mathrm{nm}\).
- cutoff_solvationfloat or openmm.unit.Quantity, optional
Cutoff distance \(r_\mathrm{cut}\) for the solvation potential. Must be less than the shared cutoff distance. If not provided, it is set to the shared cutoff distance.
Reference unit: \(\mathrm{nm}\).
- mixstr, keyword-only, default:
"arithmetic"
Mixing rule for \(\sigma_{12}\) and \(S_{12}\).
Valid values:
"arithmetic"
: Arithmetic mixing rule.\[\begin{split}\begin{gather*} \sigma_{12}=\frac{\sigma_1+\sigma_2}{2}\\ S_{12}=\sqrt{S_1S_2} \end{gather*}\end{split}\]Per-particle parameters: \((\sigma_i, S_i)\).
"geometric"
: Geometric mixing rule.\[\begin{split}\begin{gather*} \sigma_{12}=\sqrt{\sigma_1\sigma_2}\\ S_{12}=\sqrt{S_1S_2} \end{gather*}\end{split}\]Per-particle parameters: \((\sigma_i, S_i)\).
"sigma12 = ...; S12 = ...;"
: Custom mixing rule. The string containing the expressions for \(\sigma_{12}\) and \(S_{12}\) must be written in valid C++ syntax, with any custom global and per-particle parameters and tabulated functions defined in global_params, per_params, and tab_funcs, respectively.
- global_paramsdict, keyword-only, optional
Additional global parameters for use in the definition of \(\sigma_{12}\) and \(S_{12}\).
- per_paramslist, keyword-only, optional
Additional per-particle parameters for use in the definition of \(\sigma_{12}\) and \(S_{12}\).
- tab_funcsdict, keyword-only, optional
Optional tabulated functions for use in the definition of \(\sigma_{12}\) and \(S_{12}\).
- Returns:
- pair_solvopenmm.CustomNonbondedForce
Solvation pair potential.