This is part of the multicolvar module |
Calculate an angle.
This command can be used to compute the angle between three atoms. Alternatively if four atoms appear in the atom specification it calculates the angle between two vectors identified by two pairs of atoms.
If three atoms are given, the angle is defined as:
\[ \theta=\arccos\left(\frac{ {\bf r}_{21}\cdot {\bf r}_{23}}{ |{\bf r}_{21}| |{\bf r}_{23}|}\right) \]
Here \( {\bf r}_{ij}\) is the distance vector among the i-th and the j-th listed atom.
If four atoms are given, the angle is defined as:
\[ \theta=\arccos\left(\frac{ {\bf r}_{21}\cdot {\bf r}_{34}}{ |{\bf r}_{21}| |{\bf r}_{34}|}\right) \]
Notice that angles defined in this way are non-periodic variables and their value is limited by definition between 0 and \(\pi\).
The vectors \( {\bf r}_{ij}\) are by default evaluated taking periodic boundary conditions into account. This behavior can be changed with the NOPBC flag.
This command tells plumed to calculate the angle between the vector connecting atom 1 to atom 2 and the vector connecting atom 2 to atom 3 and to print it on file COLVAR1. At the same time, the angle between vector connecting atom 1 to atom 2 and the vector connecting atom 3 to atom 4 is printed on file COLVAR2.
a: ANGLEATOMS=1,2,3 # equivalently one could state: # a: ANGLE ATOMS=1,2,2,3 b: ANGLEthe list of atoms involved in this collective variable (either 3 or 4 atoms).ATOMS=1,2,3,4 PRINTthe list of atoms involved in this collective variable (either 3 or 4 atoms).ARG=acompulsory keyword the labels of the values that you would like to print to the fileFILE=COLVAR1 PRINTthe name of the file on which to output these quantitiesARG=bcompulsory keyword the labels of the values that you would like to print to the fileFILE=COLVAR2the name of the file on which to output these quantities
This final example instructs plumed to calculate all the angles in the first coordination spheres of the atoms. The bins for a normalized histogram of the distribution is then output
a1: ANGLESGROUP=1-38Calculate angles for each distinct set of three atoms in the groupHISTOGRAM={GAUSSIAN LOWER=0.0 UPPER=pi NBINS=20}calculate a discretized histogram of the distribution of values.SWITCH={GAUSSIAN R_0=1.0} PRINTthe switching function specifies that only those bonds that have a length that is less than a certain threshold are consideredARG=a1.*compulsory keyword the labels of the values that you would like to print to the fileFILE=colvarthe name of the file on which to output these quantities
Quantity | Description |
.#!value | the ANGLE for each set of three atoms that were specified |
In addition the following quantities can be calculated by employing the keywords listed below
Quantity | Keyword | Description |
lessthan | LESS_THAN | the number of colvars that have a value less than a threshold |
morethan | MORE_THAN | the number of colvars that have a value more than a threshold |
altmin | ALT_MIN | the minimum value of the cv |
min | MIN | the minimum colvar |
max | MAX | the maximum colvar |
between | BETWEEN | the number of colvars that have a value that lies in a particular interval |
highest | HIGHEST | the largest of the colvars |
lowest | LOWEST | the smallest of the colvars |
sum | SUM | the sum of the colvars |
mean | MEAN | the mean of the colvars |
GROUP | Calculate angles for each distinct set of three atoms in the group |
GROUPA | A group of central atoms about which angles should be calculated |
GROUPB | When used in conjunction with GROUPA this keyword instructs plumed to calculate all distinct angles involving one atom from GROUPA and two atoms from GROUPB. The atom from GROUPA is the central atom. |
GROUPC | This must be used in conjunction with GROUPA and GROUPB. All angles involving one atom from GROUPA, one atom from GROUPB and one atom from GROUPC are calculated. The GROUPA atoms are assumed to be the central atoms |
HIGHEST | ( default=off ) this flag allows you to recover the highest of these variables. |
LOWEST | ( default=off ) this flag allows you to recover the lowest of these variables. |
SUM | ( default=off ) calculate the sum of all the quantities. |
MEAN | ( default=off ) calculate the mean of all the quantities. |
SWITCH | the switching function specifies that only those bonds that have a length that is less than a certain threshold are considered |
LESS_THAN | calculate the number of variables that are less than a certain target value. This quantity is calculated using \(\sum_i \sigma(s_i)\), where \(\sigma(s)\) is a switchingfunction.. You can use multiple instances of this keyword i.e. LESS_THAN1, LESS_THAN2, LESS_THAN3... |
MORE_THAN | calculate the number of variables that are more than a certain target value. This quantity is calculated using \(\sum_i 1 - \sigma(s_i)\), where \(\sigma(s)\) is a switchingfunction.. You can use multiple instances of this keyword i.e. MORE_THAN1, MORE_THAN2, MORE_THAN3... |
ALT_MIN | calculate the minimum value. To make this quantity continuous the minimum is calculated using \( \textrm{min} = -\frac{1}{\beta} \log \sum_i \exp\left( -\beta s_i \right) \) The value of \(\beta\) in this function is specified using (BETA= \(\beta\)). |
MIN | calculate the minimum value. To make this quantity continuous the minimum is calculated using \( \textrm{min} = \frac{\beta}{ \log \sum_i \exp\left( \frac{\beta}{s_i} \right) } \) The value of \(\beta\) in this function is specified using (BETA= \(\beta\)) |
MAX | calculate the maximum value. To make this quantity continuous the maximum is calculated using \( \textrm{max} = \beta \log \sum_i \exp\left( \frac{s_i}{\beta}\right) \) The value of \(\beta\) in this function is specified using (BETA= \(\beta\)) |
BETWEEN | calculate the number of values that are within a certain range. These quantities are calculated using kernel density estimation as described on histogrambead.. You can use multiple instances of this keyword i.e. BETWEEN1, BETWEEN2, BETWEEN3... |
HISTOGRAM | calculate a discretized histogram of the distribution of values. This shortcut allows you to calculates NBIN quantites like BETWEEN. |