INPLANEDISTANCES

This is part of the multicolvar module |

Calculate distances in the plane perpendicular to an axis

Each quantity calculated in this CV uses the positions of two atoms, this indices of which are specified using the VECTORSTART and VECTOREND keywords, to specify the orientation of a vector, \(\mathbf{n}\). The perpendicular distance between this vector and the position of some third atom is then computed using:

\[ x_j = |\mathbf{r}_{j}| \sin (\theta_j) \]

where \(\mathbf{r}_j\) is the distance between one of the two atoms that define the vector \(\mathbf{n}\) and a third atom (atom \(j\)) and where \(\theta_j\) is the angle between the vector \(\mathbf{n}\) and the vector \(\mathbf{r}_{j}\). The \(x_j\) values for each of the atoms specified using the GROUP keyword are calculated. Keywords such as MORE_THAN and LESS_THAN can then be used to calculate the number of these quantities that are more or less than a given cutoff.

- Description of components

When the label of this action is used as the input for a second you are not referring to a scalar quantity as you are in regular collective variables. The label is used to reference the full set of quantities calculated by the action. This is usual when using MultiColvar functions. Generally when doing this the previously calculated multicolvar will be referenced using the DATA keyword rather than ARG.

This Action can be used to calculate the following scalar quantities directly. These quantities are calculated by employing the keywords listed below. These quantities can then be referenced elsewhere in the input file by using this Action's label followed by a dot and the name of the quantity. Some amongst them can be calculated multiple times with different parameters. In this case the quantities calculated can be referenced elsewhere in the input by using the name of the quantity followed by a numerical identifier e.g. *label*.lessthan-1, *label*.lessthan-2 etc. When doing this and, for clarity we have made the label of the components customizable. As such by using the LABEL keyword in the description of the keyword input you can customize the component name

Quantity | Keyword | Description |

altmin | ALT_MIN | the minimum value. This is calculated using the formula described in the description of the keyword so as to make it continuous. |

between | BETWEEN | the number/fraction of values within a certain range. This is calculated using one of the formula described in the description of the keyword so as to make it continuous. You can calculate this quantity multiple times using different parameters. |

highest | HIGHEST | the lowest of the quantitities calculated by this action |

lessthan | LESS_THAN | the number of values less than a target value. This is calculated using one of the formula described in the description of the keyword so as to make it continuous. You can calculate this quantity multiple times using different parameters. |

lowest | LOWEST | the lowest of the quantitities calculated by this action |

max | MAX | the maximum value. This is calculated using the formula described in the description of the keyword so as to make it continuous. |

mean | MEAN | the mean value. The output component can be refererred to elsewhere in the input file by using the label.mean |

min | MIN | the minimum value. This is calculated using the formula described in the description of the keyword so as to make it continuous. |

moment | MOMENTS | the central moments of the distribution of values. The second moment would be referenced elsewhere in the input file using label.moment-2, the third as label.moment-3, etc. |

morethan | MORE_THAN | the number of values more than a target value. This is calculated using one of the formula described in the description of the keyword so as to make it continuous. You can calculate this quantity multiple times using different parameters. |

- The atoms involved can be specified using

VECTORSTART | The first atom position that is used to define the normal to the plane of interest. For more information on how to specify lists of atoms see Groups and Virtual Atoms |

VECTOREND | The second atom position that is used to defin the normal to the plane of interest. For more information on how to specify lists of atoms see Groups and Virtual Atoms |

- Or alternatively by using

GROUP | The set of atoms for which you wish to calculate the in plane distance |

- Options

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

NOPBC | ( default=off ) ignore the periodic boundary conditions when calculating distances |

SERIAL | ( default=off ) do the calculation in serial. Do not parallelize |

LOWMEM | ( default=off ) lower the memory requirements |

TIMINGS | ( default=off ) output information on the timings of the various parts of the calculation |

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\)). The final value can be referenced using label.altmin. You can use multiple instances of this keyword i.e. ALT_MIN1, ALT_MIN2, ALT_MIN3... The corresponding values are then referenced using label.altmin-1, label.altmin-2, label.altmin-3... |

LOWEST | this flag allows you to recover the lowest of these variables. The final value can be referenced using label.lowest |

HIGHEST | this flag allows you to recover the highest of these variables. The final value can be referenced using label.highest |

MEAN | take the mean of these variables. The final value can be referenced using label.mean. You can use multiple instances of this keyword i.e. MEAN1, MEAN2, MEAN3... The corresponding values are then referenced using label.mean-1, label.mean-2, label.mean-3... |

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\)) The final value can be referenced using label.min. You can use multiple instances of this keyword i.e. MIN1, MIN2, MIN3... The corresponding values are then referenced using label.min-1, label.min-2, label.min-3... |

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\)) The final value can be referenced using label.max. You can use multiple instances of this keyword i.e. MAX1, MAX2, MAX3... The corresponding values are then referenced using label.max-1, label.max-2, label.max-3... |

LESS_THAN | calculate the number of variables less than a certain target value. This quantity is calculated using \(\sum_i \sigma(s_i)\), where \(\sigma(s)\) is a switchingfunction. The final value can be referenced using label.lessthan. You can use multiple instances of this keyword i.e. LESS_THAN1, LESS_THAN2, LESS_THAN3... The corresponding values are then referenced using label.lessthan-1, label.lessthan-2, label.lessthan-3... |

MORE_THAN | calculate the number of variables more than a certain target value. This quantity is calculated using \(\sum_i 1.0 - \sigma(s_i)\), where \(\sigma(s)\) is a switchingfunction. The final value can be referenced using label.morethan. You can use multiple instances of this keyword i.e. MORE_THAN1, MORE_THAN2, MORE_THAN3... The corresponding values are then referenced using label.morethan-1, label.morethan-2, label.morethan-3... |

BETWEEN | calculate the number of values that are within a certain range. These quantities are calculated using kernel density estimation as described on histogrambead. The final value can be referenced using label.between. You can use multiple instances of this keyword i.e. BETWEEN1, BETWEEN2, BETWEEN3... The corresponding values are then referenced using label.between-1, label.between-2, label.between-3... |

HISTOGRAM | calculate a discretized histogram of the distribution of values. This shortcut allows you to calculates NBIN quantites like BETWEEN. The final value can be referenced using label.histogram. You can use multiple instances of this keyword i.e. HISTOGRAM1, HISTOGRAM2, HISTOGRAM3... The corresponding values are then referenced using label.histogram-1, label.histogram-2, label.histogram-3... |

MOMENTS | calculate the moments of the distribution of collective variables. The \(m\)th moment of a distribution is calculated using \(\frac{1}{N} \sum_{i=1}^N ( s_i - \overline{s} )^m \), where \(\overline{s}\) is the average for the distribution. The moments keyword takes a lists of integers as input or a range. Each integer is a value of \(m\). The final calculated values can be referenced using moment- \(m\). |

- Examples

The following input can be used to calculate the number of atoms that have indices greater than 3 and less than 101 that are within a cylinder with a radius of 0.3 nm that has its long axis aligned with the vector connecting atoms 1 and 2.

d1: INPLANEDISTANCES VECTORSTART=1 VECTOREND=2 GROUP=3-100 LESS_THAN={RATIONAL D_0=0.2 R_0=0.1} PRINT ARG=d1.lessthan FILE=colvar