BIASVALUE
This is part of the bias module

Takes the value of one variable and use it as a bias

This is the simplest possible bias: the bias potential is equal to a collective variable. It is useful to create custom biasing potential, e.g. applying a function (see Functions) to some collective variable then using the value of this function directly as a bias.

Examples

The following input tells plumed to use the value of the distance between atoms 3 and 5 and the value of the distance between atoms 2 and 4 as biases. It then tells plumed to print the energy of the restraint

Click on the labels of the actions for more information on what each action computes
tested on v2.9
d1: DISTANCE 
ATOMS
the pair of atom that we are calculating the distance between.
=3,5 d2: DISTANCE
ATOMS
the pair of atom that we are calculating the distance between.
=3,6 b: BIASVALUE
ARG
the input for this action is the scalar output from one or more other actions.
=d1,d2 PRINT
ARG
the input for this action is the scalar output from one or more other actions.
=d1,d2,b.d1_bias,b.d2_bias

Another thing one can do is asking one system to follow a circle in sin/cos according a time dependence

Click on the labels of the actions for more information on what each action computes
tested on v2.9
t: TIME 
# this just print cos and sin of time
cos: MATHEVAL 
ARG
the input for this action is the scalar output from one or more other actions.
=t
VAR
the names to give each of the arguments in the function.
=t
FUNC
compulsory keyword the function you wish to evaluate
=cos(t)
PERIODIC
compulsory keyword if the output of your function is periodic then you should specify the periodicity of the function.
=NO sin: MATHEVAL
ARG
the input for this action is the scalar output from one or more other actions.
=t
VAR
the names to give each of the arguments in the function.
=t
FUNC
compulsory keyword the function you wish to evaluate
=sin(t)
PERIODIC
compulsory keyword if the output of your function is periodic then you should specify the periodicity of the function.
=NO c1: COM
ATOMS
the list of atoms which are involved the virtual atom's definition.
=1,2 c2: COM
ATOMS
the list of atoms which are involved the virtual atom's definition.
=3,4 d: DISTANCE
COMPONENTS
( default=off ) calculate the x, y and z components of the distance separately and store them as label.x,
ATOMS
the pair of atom that we are calculating the distance between.
=c1,c2 PRINT
ARG
the input for this action is the scalar output from one or more other actions.
=t,cos,sin,d.x,d.y,d.z
STRIDE
compulsory keyword ( default=1 ) the frequency with which the quantities of interest should be output
=1
FILE
the name of the file on which to output these quantities
=colvar
FMT
the format that should be used to output real numbers
=%8.4f # this calculates sine and cosine of a projected component of distance mycos: MATHEVAL
ARG
the input for this action is the scalar output from one or more other actions.
=d.x,d.y
VAR
the names to give each of the arguments in the function.
=x,y
FUNC
compulsory keyword the function you wish to evaluate
=x/sqrt(x*x+y*y)
PERIODIC
compulsory keyword if the output of your function is periodic then you should specify the periodicity of the function.
=NO mysin: MATHEVAL
ARG
the input for this action is the scalar output from one or more other actions.
=d.x,d.y
VAR
the names to give each of the arguments in the function.
=x,y
FUNC
compulsory keyword the function you wish to evaluate
=y/sqrt(x*x+y*y)
PERIODIC
compulsory keyword if the output of your function is periodic then you should specify the periodicity of the function.
=NO # this creates a moving spring so that the system follows a circle-like dynamics # but it is not a bias, it is a simple value now vv1: MATHEVAL
ARG
the input for this action is the scalar output from one or more other actions.
=mycos,mysin,cos,sin
VAR
the names to give each of the arguments in the function.
=mc,ms,c,s
FUNC
compulsory keyword the function you wish to evaluate
=100*((mc-c)^2+(ms-s)^2)
PERIODIC
compulsory keyword if the output of your function is periodic then you should specify the periodicity of the function.
=NO # this takes the value calculated with matheval and uses as a bias cc: BIASVALUE
ARG
the input for this action is the scalar output from one or more other actions.
=vv1 # some printout PRINT
ARG
the input for this action is the scalar output from one or more other actions.
=t,cos,sin,d.x,d.y,d.z,mycos,mysin,cc.vv1_bias
STRIDE
compulsory keyword ( default=1 ) the frequency with which the quantities of interest should be output
=1
FILE
the name of the file on which to output these quantities
=colvar
FMT
the format that should be used to output real numbers
=%8.4f
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
bias the instantaneous value of the bias potential
_bias one or multiple instances of this quantity can be referenced elsewhere in the input file. these quantities will named with the arguments of the bias followed by the character string _bias. These quantities tell the user how much the bias is due to each of the colvars.
Options
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...