openmmtools.testsystems.ConstraintCoupledHarmonicOscillator¶
- class openmmtools.testsystems.ConstraintCoupledHarmonicOscillator(K=Quantity(value=1.0, unit=kilojoule / nanometer**2 * mole), d=Quantity(value=1.0, unit=nanometer), mass=Quantity(value=39.948, unit=dalton), **kwargs)[source]¶
Create a pair of particles in 3D harmonic oscillator wells, coupled by a constraint.
- Parameters:
- Kopenmm.unit.Quantity, optional, default=1.0 * unit.kilojoules_per_mole / unit.nanometer**2
harmonic restraining potential
- dopenmm.unit.Quantity, optional, default=1.0 * unit.nanometer
distance between harmonic oscillators. Default is Amber GAFF c-c bond.
- massopenmm.unit.Quantity, default=39.948 * unit.amu
particle mass
Notes
The natural period of a harmonic oscillator is T = sqrt(m/K), so you will want to use an integration timestep smaller than ~ T/10.
Examples
Create a constraint-coupled harmonic oscillator with specified mass, distance, and spring constant.
>>> ccho = ConstraintCoupledHarmonicOscillator() >>> mass = 12.0 * unit.amu >>> d = 5.0 * unit.angstroms >>> K = 1.0 * unit.kilocalories_per_mole / unit.angstroms**2 >>> ccho = ConstraintCoupledHarmonicOscillator(K=K, d=d, mass=mass) >>> system, positions = ccho.system, ccho.positions
- Attributes:
system
openmm.SystemThe openmm.System object corresponding to the test system.
positions
listThe openmm.unit.Quantity object containing the particle positions, with units compatible with openmm.unit.nanometers.
Methods
reduced_potential_expectation
(...)Calculate the expected potential energy in state_sampled_from, divided by kB * T in state_evaluated_in.
serialize
()Return the System and positions in serialized XML form.
- __init__(K=Quantity(value=1.0, unit=kilojoule / nanometer**2 * mole), d=Quantity(value=1.0, unit=nanometer), mass=Quantity(value=39.948, unit=dalton), **kwargs)[source]¶
Abstract base class for test system.
- Parameters:
Methods
__init__
([K, d, mass])Abstract base class for test system.
reduced_potential_expectation
(...)Calculate the expected potential energy in state_sampled_from, divided by kB * T in state_evaluated_in.
serialize
()Return the System and positions in serialized XML form.
Attributes
analytical_properties
A list of available analytical properties, accessible via 'get_propertyname(thermodynamic_state)' calls.
mdtraj_topology
The mdtraj.Topology object corresponding to the test system (read-only).
name
The name of the test system.
positions
The openmm.unit.Quantity object containing the particle positions, with units compatible with openmm.unit.nanometers.
system
The openmm.System object corresponding to the test system.
topology
The openmm.app.Topology object corresponding to the test system.