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)
Constructor: HarmonicDistanceRestraint(atom1, atom2, distance, force_constant)
the two atoms whose distance is restrained
the distance at which the restraint is zero
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.
Constructor: HarmonicAngleRestraint(atom1, atom2, atom3, angle, force_constant)
the three atoms whose angle is restrained; atom2 is the central atom
the angle at which the restraint is zero
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|.
Constructor: HarmonicDihedralRestraint(atom1, atom2, atom3, atom4, angle, force_constant)
the four atoms whose dihedral angle is restrained; atom2 and atom3 are on the common axis
the dihedral angle at which the restraint is zero
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|.