NLINKS
This is part of the multicolvar module

Calculate number of pairs of atoms/molecules that are "linked"

In its simplest guise this coordinate calculates a coordination number. Each pair of atoms is assumed "linked" if they are within some cutoff of each other. In more complex applications each entity is a vector and this quantity measures whether pairs of vectors are (a) within a certain cutoff and (b) if the two vectors have similar orientations. The vectors on individual atoms could be Steinhardt parameters (see Q3, Q4 and Q6) or they could describe some internal vector in a molecule.

Examples

The following calculates how many bonds there are in a system containing 64 atoms and outputs this quantity to a file.

Click on the labels of the actions for more information on what each action computes
tested on v2.7
d1: DENSITY 
SPECIES
this keyword is used for colvars such as coordination number.
=1-64 dd: NLINKS
GROUP
.
=d1
SWITCH
This keyword is used if you want to employ an alternative to the continuous switching function defined above.
={RATIONAL D_0=1.3 R_0=0.2} PRINT
ARG
the input for this action is the scalar output from one or more other actions.
=dd
FILE
the name of the file on which to output these quantities
=colvar

The following calculates how many pairs of neighboring atoms in a system containing 64 atoms have similar dispositions for the atoms in their coordination sphere. This calculation uses the dot product of the Q6 vectors on adjacent atoms to measure whether or not two atoms have the same ``orientation"

Click on the labels of the actions for more information on what each action computes
tested on v2.7
q6: Q6 
SPECIES
this keyword is used for colvars such as coordination number.
=1-64
SWITCH
This keyword is used if you want to employ an alternative to the continuous switching function defined above.
={RATIONAL D_0=1.3 R_0=0.2} dd: NLINKS
GROUP
.
=q6
SWITCH
This keyword is used if you want to employ an alternative to the continuous switching function defined above.
={RATIONAL D_0=1.3 R_0=0.2} PRINT
ARG
the input for this action is the scalar output from one or more other actions.
=dd
FILE
the name of the file on which to output these quantities
=colvar
Glossary of keywords and components
The atoms involved can be specified using
GROUP . For more information on how to specify lists of atoms see Groups and Virtual Atoms
Or alternatively by using
GROUPA
GROUPB
Compulsory keywords
NN ( default=6 ) The n parameter of the switching function
MM ( default=0 ) The m parameter of the switching function; 0 implies 2*NN
D_0 ( default=0.0 ) The d_0 parameter of the switching function
R_0 The r_0 parameter of the switching function
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 use MPI
TIMINGS ( default=off ) output information on the timings of the various parts of the calculation
LOWMEM

( default=off ) lower the memory requirements

SWITCH This keyword is used if you want to employ an alternative to the continuous switching function defined above. The following provides information on the switchingfunction that are available. When this keyword is present you no longer need the NN, MM, D_0 and R_0 keywords.