Action: ANGLE
Module | colvar |
---|---|
Description | Usage |
Calculate one or multiple angle/s. | |
output value | type |
the ANGLE involving these atoms | scalar/vector |
Input
The atoms that serve as the input for this action are specified using one or more of the keywords in the following table.
Keyword | Type | Description |
---|---|---|
ATOMS | atoms | the list of atoms involved in this collective variable (either 3 or 4 atoms) |
Further details and examples
Calculate one or multiple angle/s.
The following input instructs PLUMED to calculate and print the angle between the vector connecting atom 2 and atom 1 and the vector connecting atom 2 and atom 3.
a1ANGLECalculate one or multiple angle/s. More details ATOMSthe list of atoms involved in this collective variable (either 3 or 4 atoms)=1,2,3 PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=a1 FILEthe name of the file on which to output these quantities=colvar:
In other words, the angle that is output by the input above is calculated as:
θ=arccos(r21⋅r23|r21||r23|)
Here rij is the vector connecting the ith and jth atoms, which by default is evaluated in a way that takes periodic boundary conditions into account. If you wish to disregard the PBC you can use the NOPBC flag.
Alternatively, we can instruct PLUMED to calculate the angle between the vectors connecting atoms 1 and atom 2 and atoms 3 and atom 4 by using the following input:
a3ANGLECalculate one or multiple angle/s. More details ATOMS1the list of atoms involved in this collective variable (either 3 or 4 atoms)=1,2,3 ATOMS2the list of atoms involved in this collective variable (either 3 or 4 atoms)=4,5,6 ATOMS3the list of atoms involved in this collective variable (either 3 or 4 atoms)=7,8,9 PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=a3 FILEthe name of the file on which to output these quantities=colvar:
It is common to assume when using this feature that all the angles being computed are indistinguishable so it makes sense to perform the same series of operations on every element of the output vector. The input file below is more approrpriate if the angles are not indistinguishable:
a4ANGLECalculate one or multiple angle/s. More details ATOMSthe list of atoms involved in this collective variable (either 3 or 4 atoms)=1,2,3 a5 : ANGLECalculate one or multiple angle/s. More details ATOMSthe list of atoms involved in this collective variable (either 3 or 4 atoms)=4,5,6 a6 : ANGLECalculate one or multiple angle/s. More details ATOMSthe list of atoms involved in this collective variable (either 3 or 4 atoms)=7,8,9 PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=a4,a5,a6 FILEthe name of the file on which to output these quantities=colvar:
Syntax
The following table describes the keywords and options that can be used with this action
Keyword | Type | Default | Description |
---|---|---|---|
ATOMS | input | none | the list of atoms involved in this collective variable (either 3 or 4 atoms) |
NUMERICAL_DERIVATIVES | optional | false | calculate the derivatives for these quantities numerically |
NOPBC | optional | false | ignore the periodic boundary conditions when calculating distances |