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.
Examples
Click on the labels of the actions for more information on what each action computes
the pair of atom that we are calculating the distance between.
=1,10 The DISTANCE action with label dist1 calculates a single scalar valuedist2: DISTANCE
ATOMS
the pair of atom that we are calculating the distance between.
=2,11 The DISTANCE action with label dist2 calculates a single scalar valuepw: PIECEWISE
POINT0
compulsory keyword
This keyword is used to specify the various points in the function above..
=1,10
POINT1
compulsory keyword
This keyword is used to specify the various points in the function above..
=2,PI
POINT2
compulsory keyword
This keyword is used to specify the various points in the function above..
=3,10
ARG
the input to this function.
=dist1The PIECEWISE action with label pw calculates a single scalar valueppww: PIECEWISE
POINT0
compulsory keyword
This keyword is used to specify the various points in the function above..
=1,10
POINT1
compulsory keyword
This keyword is used to specify the various points in the function above..
=2,PI
POINT2
compulsory keyword
This keyword is used to specify the various points in the function above..
=3,10
ARG
the input to this function.
=dist1,dist2The PIECEWISE action with label ppww calculates the following quantities:
Quantity
Description
ppww.dist1_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. This particular component measures this quantity for the input CV named dist1
ppww.dist2_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. This particular component measures this quantity for the input CV named dist2
the pair of atom that we are calculating the distance between.
=1,10 The DISTANCE action with label dist1 calculates a single scalar valuedist2: DISTANCE
ATOMS
the pair of atom that we are calculating the distance between.
=2,11 The DISTANCE action with label dist2 calculates a single scalar valuepw: PIECEWISE_SCALAR
ARG
the input for this action is the scalar output from one or more other actions.
=dist1
POINT0
compulsory keyword
This keyword is used to specify the various points in the function above..
=1,10
POINT1
compulsory keyword
This keyword is used to specify the various points in the function above..
=2,PI
POINT2
compulsory keyword
This keyword is used to specify the various points in the function above..
=3,10 The PIECEWISE_SCALAR action with label pw calculates a single scalar valueppww: PIECEWISE_SCALAR
ARG
the input for this action is the scalar output from one or more other actions.
=dist1,dist2
POINT0
compulsory keyword
This keyword is used to specify the various points in the function above..
=1,10
POINT1
compulsory keyword
This keyword is used to specify the various points in the function above..
=2,PI
POINT2
compulsory keyword
This keyword is used to specify the various points in the function above..
=3,10 The PIECEWISE_SCALAR action with label ppww calculates the following quantities:
Quantity
Description
ppww.dist1_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. This particular component measures this quantity for the input CV named dist1
ppww.dist2_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. This particular component measures this quantity for the input CV named dist2
the input for this action is the scalar output from one or more other actions.
=pw,ppww.dist1_pfunc,ppww.dist2_pfuncThe PRINT action with label
Glossary of keywords and components
Description of components
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.
Compulsory keywords
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...
Options
ARG
the input to this function. You can use multiple instances of this keyword i.e. ARG1, ARG2, ARG3...