Action: BIASVALUE
Module | bias |
---|---|
Description | Usage |
Takes the value of one variable and use it as a bias |
Output components
This action calculates the values in the following table. These values can be referenced elsewhere in the input by using this Action's label followed by a dot and the name of the value required from the list below.
Name | Type | Description |
---|---|---|
bias | scalar | the instantaneous value of the bias potential |
_bias | scalar | one or multiple instances of this quantity can be referenced elsewhere in the input file |
Input
The arguments that serve as the input for this action are specified using one or more of the keywords in the following table.
Keyword | Type | Description |
---|---|---|
ARG | scalar/vector | the labels of the scalar/vector arguments whose values will be used as a bias on the system |
Further details and examples
Takes the value of one variable and use it as a bias
This is the simplest possible bias: when you use this method the bias potential is set equal to the scalar-valued argument that was input. This action is useful for creating custom biasing potential, e.g. if you apply a function (see function module) to some collective variable then use the value of this function directly as a bias.
This action is also useful for testing that forces are being calculated correctly. If I wanted to test whether the derivatives calculated by the DISTANCE action are computed correctly I would write a PLUMED input like this one:
d1DISTANCECalculate the distance/s between pairs of atoms. More details ATOMSthe pair of atom that we are calculating the distance between=1,2 BIASVALUETakes the value of one variable and use it as a bias More details ARGthe labels of the scalar/vector arguments whose values will be used as a bias on the system=d1:
I would then run a calculation using driver with the following input:
plumed driveranalyze trajectories with plumed This action has hidden defaults. More details --ixyzthe trajectory in xyz format traj.xyz --debug-forcesoutput a file containing the forces due to the bias evaluated using numerical derivatives and using the analytical derivatives implemented in plumed forces.num
This outputs a file with two columns that both contain the forces that are acting upon the atoms. The first set of forces output are the analytic forces that are implemented within PLUMED. The second set of forces are calcluated numerically using finite difference. If you method is implemented correctly these two sets of forces should be the same.
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
DISTANCECalculate the distance/s between pairs of atoms. More details ATOMSthe pair of atom that we are calculating the distance between=3,5 LABELa label for the action so that its output can be referenced in the input to other actions=d1 DISTANCECalculate the distance/s between pairs of atoms. More details ATOMSthe pair of atom that we are calculating the distance between=3,6 LABELa label for the action so that its output can be referenced in the input to other actions=d2 BIASVALUETakes the value of one variable and use it as a bias More details ARGthe labels of the scalar/vector arguments whose values will be used as a bias on the system=d1,d2 LABELa label for the action so that its output can be referenced in the input to other actions=b PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=d1,d2,b.d1_bias,b.d2_bias
Another thing one can do is ask the system to follow a circle in sin/cos in accordance with a time dependence
tTIMEretrieve the time of the simulation to be used elsewhere More details # this just print cos and sin of time cos : MATHEVALAn alias to the CUSTOM function that can also be used to calaculate combinations of variables using a custom expression. More details ARGthe values input to this function=t VARthe names to give each of the arguments in the function=t FUNCthe function you wish to evaluate=cos(t) PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO sin : MATHEVALAn alias to the CUSTOM function that can also be used to calaculate combinations of variables using a custom expression. More details ARGthe values input to this function=t VARthe names to give each of the arguments in the function=t FUNCthe function you wish to evaluate=sin(t) PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO c1 : COMCalculate the center of mass for a group of atoms. More details ATOMSthe list of atoms which are involved the virtual atom's definition=1,2 c2 : COMCalculate the center of mass for a group of atoms. More details ATOMSthe list of atoms which are involved the virtual atom's definition=3,4 d : DISTANCECalculate the distance/s between pairs of atoms. More details COMPONENTS calculate the x, y and z components of the distance separately and store them as label ATOMSthe pair of atom that we are calculating the distance between=c1,c2 PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=t,cos,sin,d.x,d.y,d.z STRIDE the frequency with which the quantities of interest should be output=1 FILEthe name of the file on which to output these quantities=colvar FMTthe format that should be used to output real numbers=%8.4f # this calculates sine and cosine of a projected component of distance mycos : MATHEVALAn alias to the CUSTOM function that can also be used to calaculate combinations of variables using a custom expression. More details ARGthe values input to this function=d.x,d.y VARthe names to give each of the arguments in the function=x,y FUNCthe function you wish to evaluate=x/sqrt(x*x+y*y) PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO mysin : MATHEVALAn alias to the CUSTOM function that can also be used to calaculate combinations of variables using a custom expression. More details ARGthe values input to this function=d.x,d.y VARthe names to give each of the arguments in the function=x,y FUNCthe function you wish to evaluate=y/sqrt(x*x+y*y) PERIODICif 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 : MATHEVALAn alias to the CUSTOM function that can also be used to calaculate combinations of variables using a custom expression. More details ARGthe values input to this function=mycos,mysin,cos,sin VARthe names to give each of the arguments in the function=mc,ms,c,s FUNCthe function you wish to evaluate=100*((mc-c)^2+(ms-s)^2) PERIODICif 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 : BIASVALUETakes the value of one variable and use it as a bias More details ARGthe labels of the scalar/vector arguments whose values will be used as a bias on the system=vv1 # some printout PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=t,cos,sin,d.x,d.y,d.z,mycos,mysin,cc.vv1_bias STRIDE the frequency with which the quantities of interest should be output=1 FILEthe name of the file on which to output these quantities=colvar FMTthe format that should be used to output real numbers=%8.4f:
Syntax
The following table describes the keywords and options that can be used with this action
Keyword | Type | Default | Description |
---|---|---|---|
ARG | input | none | the labels of the scalar/vector arguments whose values will be used as a bias on the system |
NUMERICAL_DERIVATIVES | optional | false | calculate the derivatives for these quantities numerically |