SORT
This is part of the function module

This function can be used to sort colvars according to their magnitudes.

Description of components

This function sorts its arguments according to their magnitudes. The lowest argument will be labelled label.1, the second lowest will be labelled label.2 and so on.

Examples

The following input tells plumed to print the distance of the closest and of the farthest atoms to atom 1, chosen among atoms from 2 to 5

Click on the labels of the actions for more information on what each action computes
tested on master
d12: DISTANCE 
ATOMS
the pair of atom that we are calculating the distance between.
=1,2 d13: DISTANCE
ATOMS
the pair of atom that we are calculating the distance between.
=1,3 d14: DISTANCE
ATOMS
the pair of atom that we are calculating the distance between.
=1,4 d15: DISTANCE
ATOMS
the pair of atom that we are calculating the distance between.
=1,5 sort: SORT
ARG
the input for this action is the scalar output from one or more other actions.
=d12,d13,d14,d15 PRINT
ARG
the input for this action is the scalar output from one or more other actions.
=sort.1,sort.4
Glossary of keywords and components
Options
NUMERICAL_DERIVATIVES

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

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