| Module |
matrixtools |
| Description |
Usage |
| Do a voronoi analysis |
  |
| output value |
type |
| a matrix in which element ij is equal to one if the ij component of the input matrix is lower than all the ik elements of the matrix where k is not j and zero otherwise |
matrix |
Details and examples
Do a voronoi analysis
This shortcut allows you to perform a Voronoi analysis.
The input to this action is a rectangular matrix that describes the distances between two sets of points.
The points for which this action is receiving distances between could be atom positions or they could represent the
dissimilarities between various trajectory frames that have been stored using COLLECT_FRAMES.
In the example below the matrix of input distances are distances between the positions of atoms:
dThe DISTANCE_MATRIX action with label d calculates the following quantities:| Quantity | Type | Description |
| d | matrix | a matrix containing the weights for the bonds between each pair of atoms |
: DISTANCE_MATRIXCalculate a matrix of distances between atoms. This action has hidden defaults. More details GROUPAwhen you are calculating the adjacency matrix between two sets of atoms this keyword is used to specify the atoms along with the keyword GROUPB=1-10 GROUPBwhen you are calculating the adjacency matrix between two sets of atoms this keyword is used to specify the atoms along with the keyword GROUPA=11-100
d: DISTANCE_MATRIXCalculate a matrix of distances between atoms. This action uses the defaults shown here. More details GROUPAwhen you are calculating the adjacency matrix between two sets of atoms this keyword is used to specify the atoms along with the keyword GROUPB=1-10 GROUPBwhen you are calculating the adjacency matrix between two sets of atoms this keyword is used to specify the atoms along with the keyword GROUPA=11-100 NL_CUTOFF The cutoff for the neighbor list=0.0 NL_STRIDE The frequency with which we are updating the atoms in the neighbor list=1 CUTOFF ignore distances that have a value larger than this cutoff=-1
vThe VORONOI action with label v calculates the following quantities:| Quantity | Type | Description |
| v | matrix | a matrix in which element ij is equal to one if the ij component of the input matrix is lower than all the ik elements of the matrix where k is not j and zero otherwise |
: VORONOIDo a voronoi analysis This action is a shortcut. More details ARGthe distance/adjacency matrix that should be used to perform the voronoi analysis=d
# v: VORONOI ARG=d
vThe NEIGHBORS action with label v calculates the following quantities:| Quantity | Type | Description |
| v | matrix | a matrix in which the ij element is one if the ij-element of the input matrix is one of the NLOWEST/NHIGHEST elements on that row of the input matrix and zero otherwise |
: NEIGHBORSBuild a matrix with ones in for the N nearest neighbours of an atom More details NLOWEST in each row of the output matrix set the elements that correspond to the n lowest elements in each row of the input matrix equal to one=1 ARGthe label of an adjacency/distance matrix that will be used to find the nearest neighbors=d
# --- End of included input --- onesThe ONES action with label ones calculates the following quantities:| Quantity | Type | Description |
| ones | vector | a vector of ones with the required number of elements |
: ONESCreate a constant vector with all elements equal to one This action is a shortcut. More details SIZEthe number of ones that you would like to create=90
# ones: ONES SIZE=90
onesThe CONSTANT action with label ones calculates the following quantities:| Quantity | Type | Description |
| ones | vector | the constant value that was read from the plumed input |
: CONSTANTCreate a constant value that can be passed to actions More details NOLOG do not report all the read in scalars in the log VALUESthe numbers that are in your constant value=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
# --- End of included input --- cThe MATRIX_VECTOR_PRODUCT action with label c calculates the following quantities:| Quantity | Type | Description |
| c | vector | the vector that is obtained by taking the product between the matrix and the vector that were input |
: MATRIX_VECTOR_PRODUCTCalculate the product of the matrix and the vector More details ARGthe label for the matrix and the vector/scalar that are being multiplied=v,ones
PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=c FILEthe name of the file on which to output these quantities=colvar
The VORONOI action outputs a rectangular matrix, , with the same shape as the input matrix, .
is 1 if is the shortest distance in row .
The arguments that serve as the input for this action are specified using one or more of the keywords in the following table.
| Keyword |
Type |
Description |
| ARG |
matrix |
the distance/adjacency matrix that should be used to perform the voronoi analysis |
Full list of keywords
The following table describes the keywords and options that can be used with this action
| Keyword |
Type |
Default |
Description |
| ARG |
input |
none |
the distance/adjacency matrix that should be used to perform the voronoi analysis |