HarmonicCoupling¶
- class openxps.couplings.HarmonicCoupling(collective_variable, dynamical_variable, force_constant)[source]¶
A harmonic coupling between a dynamical variable and a collective variable.
The coupling energy is given by:
\[U = \frac{1}{2} \kappa \left(s - q({\bf r})\right)^2\]where \(s\) is an extended dynamical variable, \(q({\bf r})\) is a physical collective variable, and \(\kappa\) is a coupling constant.
- Parameters:
collective_variable (CollectiveVariable) – The collective variable used in the coupling.
dynamical_variable (DynamicalVariable) – The dynamical variable used in the coupling.
force_constant (Quantity) – The force constant for the coupling.
Examples
>>> from copy import copy >>> import cvpack >>> import openxps as xps >>> from openmm import unit >>> dvmass = 3 * unit.dalton * (unit.nanometer / unit.radian)**2 >>> phi = cvpack.Torsion(6, 8, 14, 16, name="phi") >>> phi_s = xps.DynamicalVariable( ... "phi_s", unit.radian, dvmass, xps.CircularBounds() ... ) >>> kappa = 1000 * unit.kilojoule_per_mole / unit.radian**2 >>> xps.HarmonicCoupling(phi, phi_s, kappa) HarmonicCoupling("0.5*kappa_phi_phi_s*((phi-phi_s-6.28...*floor(...))^2)")