Add plane harmonic restraint#
Restraining atoms to lie on a 2D plane with harmonic potential wells in OpenMM.
The function molsysmt.third_party.openmm.forces.add_plane_harmonic_restraint() tethers selected atoms to a defined planar geometry.
Added in version 1.0.0.
API documentation
Follow this link for a detailed description of the input arguments, raised errors, and returned objects: molsysmt.third_party.openmm.forces.add_plane_harmonic_restraint().
Basic usage#
Let’s add a planar harmonic restraint:
import molsysmt as msm
molsys = msm.convert(msm.systems['Trp-Cage']['1l2y.h5msm'], to_form='molsysmt.MolSys')
force = msm.third_party.openmm.forces.add_plane_harmonic_restraint(molsys, point='[0,0,0] nm', normal_vector=(0,0,1), selection=[0], force_constant='500 kJ/(mol*nm**2)', return_force=True)
print('Plane harmonic restraint created:', type(force))
[0. 0. 0.] nm
Plane harmonic restraint created: <class 'openmm.openmm.CustomExternalForce'>
See also
openmm.Simulation: OpenMM Simulation form adapter in MolSysMT.
openmm.System: OpenMM System container in MolSysMT.
Convert: Converting molecular systems with
molsysmt.basic.convert().