COMBINE

This is part of the function module |

Calculate a polynomial combination of a set of other variables.

The functional form of this function is

\[ C=\sum_{i=1}^{N_{arg}} c_i (x_i-a_i)^{p_i} \]

The coefficients c, the parameters a and the powers p are provided as vectors.

Notice that COMBINE is not able to predict which will be periodic domain of the computed value automatically. The user is thus forced to specify it explicitly. Use PERIODIC=NO if the resulting variable is not periodic, and PERIODIC=A,B where A and B are the two boundaries if the resulting variable is periodic.

- Examples

The following input tells plumed to print the distance between atoms 3 and 5 its square (as computed from the x,y,z components) and the distance again as computed from the square root of the square.

Click on the labels of the actions for more information on what each action computes

dist:DISTANCEATOMS=3,5the pair of atom that we are calculating the distance between.COMPONENTS( default=off ) calculate the x, y and z components of the distance separately and store them as label.x,distance2:COMBINEARG=the input for this action is the scalar output from one or more other actions.dist.x,dist.y,dist.zPOWERS=2,2,2compulsory keyword ( default=1.0 )the powers to which you are raising each of the arguments in your functionPERIODIC=NOcompulsory keywordif the output of your function is periodic then you should specify the periodicity of the function.distance:COMBINEARG=the input for this action is the scalar output from one or more other actions.distance2POWERS=0.5compulsory keyword ( default=1.0 )the powers to which you are raising each of the arguments in your functionPERIODIC=NO PRINTcompulsory keywordif the output of your function is periodic then you should specify the periodicity of the function.ARG=the input for this action is the scalar output from one or more other actions.distance,distance2

(See also PRINT and DISTANCE).

The following input tells plumed to add a restraint on the cube of a dihedral angle. Notice that since the angle has a periodic domain -pi,pi its cube has a domain -pi**3,pi**3.

Click on the labels of the actions for more information on what each action computes

t:TORSIONATOMS=1,3,5,7the four atoms involved in the torsional anglec:COMBINEARG=the input for this action is the scalar output from one or more other actions.tPOWERS=3compulsory keyword ( default=1.0 )the powers to which you are raising each of the arguments in your functionPERIODIC=-31.0062766802998,31.0062766802998 RESTRAINTcompulsory keywordif the output of your function is periodic then you should specify the periodicity of the function.ARG=the input for this action is the scalar output from one or more other actions.cKAPPA=10compulsory keyword ( default=0.0 )specifies that the restraint is harmonic and what the values of the force constants on each of the variables areAT=0compulsory keywordthe position of the restraint

- Glossary of keywords and components

- Compulsory keywords

PERIODIC | if the output of your function is periodic then you should specify the periodicity of the function. If the output is not periodic you must state this using PERIODIC=NO |

COEFFICIENTS | ( default=1.0 ) the coefficients of the arguments in your function |

PARAMETERS | ( default=0.0 ) the parameters of the arguments in your function |

POWERS | ( default=1.0 ) the powers to which you are raising each of the arguments in your function |

- Options

NUMERICAL_DERIVATIVES | ( default=off ) calculate the derivatives for these quantities numerically |

NORMALIZE | ( default=off ) normalize all the coefficients so that in total they are equal to one |

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... |