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
the pair of atom that we are calculating the distance between.
=3,5 The DISTANCE action with label d1 calculates a single scalar valued2: DISTANCE
ATOMS
the pair of atom that we are calculating the distance between.
=3,6 The DISTANCE action with label d2 calculates a single scalar valueb: BIASVALUE
ARG
compulsory keyword
the labels of the scalar/vector arguments whose values will be used as a bias on
the system
=d1,d2The BIASVALUE action with label b calculates the following quantities:
Quantity
Description
b.bias
the instantaneous value of the bias potential
b.d1_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. This particular component measures this quantity for the input CV named d1
b.d2_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. This particular component measures this quantity for the input CV named d2
compulsory keyword
the labels of the values that you would like to print to the file
=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 The PRINT action with label # this calculates sine and cosine of a projected component of distancemycos: MATHEVAL
ARG
compulsory keyword
the values input to this function
=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 The MATHEVAL action with label mycos calculates a single scalar valuemysin: MATHEVAL
ARG
compulsory keyword
the values input to this function
=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 The MATHEVAL action with label mysin calculates a single scalar value# 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 nowvv1: MATHEVAL
ARG
compulsory keyword
the values input to this function
=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 The MATHEVAL action with label vv1 calculates a single scalar value# this takes the value calculated with matheval and uses as a biascc: BIASVALUE
ARG
compulsory keyword
the labels of the scalar/vector arguments whose values will be used as a bias on
the system
=vv1The BIASVALUE action with label cc calculates the following quantities:
Quantity
Description
cc.bias
the instantaneous value of the bias potential
cc.vv1_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. This particular component measures this quantity for the input CV named vv1
compulsory keyword
the labels of the values that you would like to print to the file
=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 The PRINT action with label
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.
Compulsory keywords
ARG
the labels of the scalar/vector arguments whose values will be used as a bias on the system
Options
NUMERICAL_DERIVATIVES
( default=off ) calculate the derivatives for these quantities numerically