CONSTANT
This is part of the colvar module

Return one or more constant quantities with or without derivatives.

Useful in combination with functions that takes in input constants or parameters.

Examples

The following input instructs plumed to compute the distance between atoms 1 and 2. If this distance is between 1.0 and 2.0, it is printed. If it is lower than 1.0 (larger than 2.0), 1.0 (2.0) is printed

Click on the labels of the actions for more information on what each action computes
tested on v2.9
cn: CONSTANT 
VALUES
The values of the constants
=1.0,2.0 dis: DISTANCE
ATOMS
the pair of atom that we are calculating the distance between.
=1,2 sss: SORT
ARG
the input for this action is the scalar output from one or more other actions.
=cn.v-0,dis,cn.v-1 PRINT
ARG
the input for this action is the scalar output from one or more other actions.
=sss.2

In case you want to pass a single value you can use VALUE:

Click on the labels of the actions for more information on what each action computes
tested on v2.9
cn: CONSTANT 
VALUE
The value of the constant
=1.0 dis: DISTANCE
ATOMS
the pair of atom that we are calculating the distance between.
=1,2 sss: SORT
ARG
the input for this action is the scalar output from one or more other actions.
=cn,dis PRINT
ARG
the input for this action is the scalar output from one or more other actions.
=sss.1
Glossary of keywords and components
Description of components

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
v the # value
Options
NOPBC ( default=off ) ignore the periodic boundary conditions when calculating distances
NODERIV

( default=off ) Set to TRUE if you want values without derivatives.

VALUES The values of the constants
VALUE The value of the constant