openmmtools.forcefactories.restrain_atoms¶
- openmmtools.forcefactories.restrain_atoms(thermodynamic_state, sampler_state, restrained_atoms, sigma=Quantity(value=3.0, unit=angstrom))[source]¶
Apply a soft harmonic restraint to the given atoms.
This modifies the
ThermodynamicState
object.- Parameters
- thermodynamic_stateopenmmtools.states.ThermodynamicState
The thermodynamic state with the system. This will be modified.
- sampler_stateopenmmtools.states.SamplerState
The sampler state with the positions.
- topologymdtraj.Topology or openmm.Topology
The topology of the system.
- atoms_dslstr
The MDTraj DSL string for selecting the atoms to restrain.
- sigmaopenmm.unit.Quantity, optional
Controls the strength of the restrain. The smaller, the tighter (units of distance, default is 3.0*angstrom).