This is part of the colvar module

Calculate the components of the position of an atom.

Notice that single components will not have the proper periodicity! If you need the values to be consistent through PBC you should use SCALED_COMPONENTS, which defines values that by construction are in the -0.5,0.5 domain. This is similar to the equivalent flag for DISTANCE. Also notice that by default the minimal image distance from the origin is considered (can be changed with NOPBC).

This variable should be used with extreme care since it allows to easily go into troubles. See comments below.

This variable can be safely used only if Hamiltonian is not invariant for translation (i.e. there are other absolute positions which are biased, e.g. by position restraints) and cell size and shapes are fixed through the simulation.

If you are not in this situation and still want to use the absolute position of an atom you should first fix the reference frame. This can be done e.g. using FIT_TO_TEMPLATE.

Click on the labels of the actions for more information on what each action computes
tested on master
# align to a template
compulsory keyword a file in pdb format containing the reference structure and the atoms involved in the CV.
=ref.pdb p: POSITION
the atom number.
the input for this action is the scalar output from one or more other actions.

The reference position is specified in a pdb file like the one shown below

ATOM      3  HT3 ALA     2      -1.480  -1.560   1.212  1.00  1.00      DIA  H
ATOM      9  CAY ALA     2      -0.096   2.144  -0.669  1.00  1.00      DIA  C
ATOM     10  HY1 ALA     2       0.871   2.385  -0.588  1.00  1.00      DIA  H
ATOM     12  HY3 ALA     2      -0.520   2.679  -1.400  1.00  1.00      DIA  H
ATOM     14  OY  ALA     2      -1.139   0.931  -0.973  1.00  1.00      DIA  O
Glossary of keywords and components
Description of components

By default this Action calculates the following quantities. These quantities can be referenced elsewhere in the input by using this Action's label followed by a dot and the name of the quantity required from the list below.

Quantity Description
x the x-component of the atom position
y the y-component of the atom position
z the z-component of the atom position

In addition the following quantities can be calculated by employing the keywords listed below

Quantity Keyword Description
a SCALED_COMPONENTS the normalized projection on the first lattice vector of the atom position
b SCALED_COMPONENTS the normalized projection on the second lattice vector of the atom position
c SCALED_COMPONENTS the normalized projection on the third lattice vector of the atom position
The atoms involved can be specified using
ATOM the atom number. For more information on how to specify lists of atoms see Groups and Virtual Atoms
NUMERICAL_DERIVATIVES ( default=off ) calculate the derivatives for these quantities numerically
NOPBC ( default=off ) ignore the periodic boundary conditions when calculating distances

( default=off ) calculate the a, b and c scaled components of the position separately and store them as label.a, label.b and label.c