Add allowed plane region#
Constraining atoms to a half-space bounded by a 3D plane using custom OpenMM forces.
The function molsysmt.third_party.openmm.forces.add_allowed_plane_region() adds a custom potential force that penalizes target atoms when they cross outside a specified planar boundary.
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_allowed_plane_region().
Basic usage#
Let’s add an allowed plane half-space boundary to an OpenMM System:
import molsysmt as msm
molsys = msm.convert(msm.systems['Trp-Cage']['1l2y.h5msm'], to_form='molsysmt.MolSys')
force = msm.third_party.openmm.forces.add_allowed_plane_region(molsys, point='[0,0,0] nm', normal_vector=(0,0,1), selection=[0], force_constant='5000 kJ/(mol*nm**2)', return_force=True)
print('Allowed plane restraint created:', type(force))
Allowed plane 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().