IMP logo
Public Member Functions | Static Public Member Functions
IMP::atom::ForceSwitch Class Reference

Detailed Description

Smooth interaction scores by switching the derivatives (force switch).

This function leaves the scores unaffected for distances below or equal to min_distance, returns zero for distances above max_distance, and between the two thresholds smoothes the score such that its first derivatives drop linearly, i.e. the score is simply multiplied by

\[ \left\{ \begin{array}{ll} 1 & d \leq d_{min} \\ \frac{(d_{max} - d)^2 (d_{max} + 2d - 3d_{min})} {(d_{max} - d_{min})^3} & d_{min} < d \leq d_{max} \\ 0 & d > d_{max} \\ \end{array} \right. \]

where $d$ is the distance, and $d_{min}$ and $d_{max}$ are the thresholds set in the ForceSwitch constructor.

This behavior is roughly equivalent to CHARMM's force switch nonbonded interaction smoothing (which is also the smoothing mechanism used by MODELLER).

See also:
CoulombPairScore

Examples: charmm forcefield verbose, charmm forcefield

+ Inheritance diagram for IMP::atom::ForceSwitch:

List of all members.

Public Member Functions

 ForceSwitch (double min_distance, double max_distance)
double operator() (double score, double distance) const
 Smooth the score at a given distance.
DerivativePair operator() (double score, double deriv, double distance) const
 Smooth the score and its first derivative at a given distance.

Static Public Member Functions

static ForceSwitchget_from (IMP::base::Object *o)

Member Function Documentation

double IMP::atom::ForceSwitch::operator() ( double  score,
double  distance 
) const
virtual

Smooth the score at a given distance.

Returns:
the smoothed score.

Implements IMP::atom::SmoothingFunction.

DerivativePair IMP::atom::ForceSwitch::operator() ( double  score,
double  deriv,
double  distance 
) const
virtual

Smooth the score and its first derivative at a given distance.

Returns:
a DerivativePair containing the smoothed score and its first derivative.

Implements IMP::atom::SmoothingFunction.


The documentation for this class was generated from the following file:

Generated on Tue May 22 2012 23:33:27 for IMP by doxygen 1.8.1