All Pages
switchingfunction

Functions that measure whether values are less than a certain quantity. Functions that measure whether values are less than a certain quantity.

Switching functions \(s(r)\) take a minimum of one input parameter \(d_0\). For \(r \le d_0 \quad s(r)=1.0\) while for \(r > d_0\) the function decays smoothly to 0. The various switching functions available in plumed differ in terms of how this decay is performed.

Where there is an accepted convention in the literature (e.g. COORDINATION) on the form of the switching function we use the convention as the default. However, the flexibility to use different switching functions is always present generally through a single keyword. This keyword generally takes an input with the following form:

KEYWORD={TYPE <list of parameters>}

The following table contains a list of the various switching functions that are available in plumed 2 together with an example input.

TYPE FUNCTION EXAMPLE INPUT DEFAULT PARAMETERS
RATIONAL \( s(r)=\frac{ 1 - \left(\frac{ r - d_0 }{ r_0 }\right)^{n} }{ 1 - \left(\frac{ r - d_0 }{ r_0 }\right)^{m} } \) {RATIONAL R_0= \(r_0\) D_0= \(d_0\) NN= \(n\) MM= \(m\)} \(d_0=0.0\), \(n=6\), \(m=12\)
EXP \( s(r)=\exp\left(-\frac{ r - d_0 }{ r_0 }\right) \) {EXP R_0= \(r_0\) D_0= \(d_0\)} \(d_0=0.0\)
GAUSSIAN \( s(r)=\exp\left(-\frac{ (r - d_0)^2 }{ 2r_0^2 }\right) \) {GAUSSIAN R_0= \(r_0\) D_0= \(d_0\)} \(d_0=0.0\)
SMAP \( s(r) = \left[ 1 + ( 2^{a/b} -1 )\left( \frac{r-d_0}{r_0} \right)\right]^{-b/a} \) {SMAP R_0= \(r_0\) D_0= \(d_0\) A= \(a\) B= \(b\)} \(d_0=0.0\)

For all the switching functions in the above table one can also specify a further (optional) parameter using the parameter keyword D_MAX to assert that for \(r>d_{\textrm{max}}\) the switching function can be assumed equal to zero.