This is part of the function module |
Compute a piece wise straight line through its arguments that passes through a set of ordered control points.
For variables less than the first (greater than the last) point, the value of the first (last) point is used.
\[ \frac{y_{i+1}-y_i}{x_{i+1}-x_i}(s-x_i)+y_i ; if x_i<s<x_{i+1} \]
\[ y_N ; if x>x_{N-1} \]
\[ y_1 ; if x<x_0 \]
Control points are passed using the POINT0=... POINT1=... syntax as in the example below
If one argument is supplied, it results in a scalar quantity. If multiple arguments are supplied, it results in a vector of values. Each value will be named as the name of the original argument with suffix _pfunc.
dist1: DISTANCEATOMS=1,10 dist2: DISTANCEthe pair of atom that we are calculating the distance between.ATOMS=2,11 pw: PIECEWISEthe pair of atom that we are calculating the distance between.POINT0=1,10compulsory keyword This keyword is used to specify the various points in the function above..POINT1=2,PIcompulsory keyword This keyword is used to specify the various points in the function above..POINT2=3,10compulsory keyword This keyword is used to specify the various points in the function above..ARG=dist1 ppww: PIECEWISEthe input for this action is the scalar output from one or more other actions.POINT0=1,10compulsory keyword This keyword is used to specify the various points in the function above..POINT1=2,PIcompulsory keyword This keyword is used to specify the various points in the function above..POINT2=3,10compulsory keyword This keyword is used to specify the various points in the function above..ARG=dist1,dist2 PRINTthe input for this action is the scalar output from one or more other actions.ARG=pw,ppww.dist1_pfunc,ppww.dist2_pfuncthe input for this action is the scalar output from one or more other actions.
By default this Action calculates the following quantities. These quantities can be referenced elsewhere in the input by using this Action's label followed by a dot and the name of the quantity required from the list below.
Quantity | Description |
_pfunc | one or multiple instances of this quantity can be referenced elsewhere in the input file. These quantities will be named with the arguments of the function followed by the character string _pfunc. These quantities tell the user the values of the piece wise functions of each of the arguments. |
POINT | This keyword is used to specify the various points in the function above.. You can use multiple instances of this keyword i.e. POINT1, POINT2, POINT3... |
NUMERICAL_DERIVATIVES | ( default=off ) calculate the derivatives for these quantities numerically |
ARG | the input for this action is the scalar output from one or more other actions. The particular scalars that you will use are referenced using the label of the action. If the label appears on its own then it is assumed that the Action calculates a single scalar value. The value of this scalar is thus used as the input to this new action. If * or *.* appears the scalars calculated by all the proceeding actions in the input file are taken. Some actions have multi-component outputs and each component of the output has a specific label. For example a DISTANCE action labelled dist may have three components x, y and z. To take just the x component you should use dist.x, if you wish to take all three components then use dist.*.More information on the referencing of Actions can be found in the section of the manual on the PLUMED Getting Started. Scalar values can also be referenced using POSIX regular expressions as detailed in the section on Regular Expressions. To use this feature you you must compile PLUMED with the appropriate flag.. You can use multiple instances of this keyword i.e. ARG1, ARG2, ARG3... |