Module MMTK.ForceFields.Restraints

This module contains harmonic restraint terms that can be added to any force field.

Example:

from MMTK import * from MMTK.ForceFields import Amber94ForceField from MMTK.ForceFields.Restraints import HarmonicDistanceRestraint

universe = InfiniteUniverse() universe.protein = Protein(bala1) force_field = Amber94ForceField() + HarmonicDistanceRestraint(universe.protein[0][1].peptide.N, universe.protein[0][1].peptide.O, 0.5, 10.) universe.setForceField(force_field)


Class HarmonicDistanceRestraint: Harmonic distance restraint between two atoms

Constructor: HarmonicDistanceRestraint(atom1, atom2, distance, force_constant)

atom1, atom2

the two atoms whose distance is restrained

distance

the distance at which the restraint is zero

force_constant

the force constant of the restraint term

The functional form of the restraint is |force_constant|*((r1-r2).length()-|distance|)**2, where r1 and r2 are the positions of the two atoms.


Class HarmonicAngleRestraint: Harmonic angle restraint between three atoms

Constructor: HarmonicAngleRestraint(atom1, atom2, atom3, angle, force_constant)

atom1, atom2, atom3

the three atoms whose angle is restrained; atom2 is the central atom

angle

the angle at which the restraint is zero

force_constant

the force constant of the restraint term

The functional form of the restraint is |force_constant|*(phi-|angle|)**2, where phi is the angle |atom1|-|atom2|-|atom3|.


Class HarmonicDihedralRestraint: Harmonic dihedral angle restraint between three atoms

Constructor: HarmonicDihedralRestraint(atom1, atom2, atom3, atom4, angle, force_constant)

atom1, atom2, atom3, atom4

the four atoms whose dihedral angle is restrained; atom2 and atom3 are on the common axis

angle

the dihedral angle at which the restraint is zero

force_constant

the force constant of the restraint term

The functional form of the restraint is |force_constant|*(phi-|distance|)**2, where phi is the dihedral angle |atom1|-|atom2|-|atom3|-|atom4|.