All Pages
CONSTANT

Return a constant quantity.

Useful in combination with functions.

Compulsory keywords
VALUE The value of the constant
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

one: CONSTANT VALUE=1.0
two: CONSTANT VALUE=2.0
dis: DISTANCE ATOMS=1,2
sss: SORT ARG=one,dis,two
PRINT ARG=sss.2

(See also DISTANCE, SORT, and PRINT).