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

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

Description of components

By default this Action calculates the following quantities. These quanties 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
Options
NUMERICAL_DERIVATIVES ( default=off ) calculate the derivatives for these quantities numerically
NOPBC ( default=off ) ignore the periodic boundary conditions when calculating distances
SCALED_COMPONENTS

( 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

Examples
# align to a template
FIT_TO_TEMPLATE REFERENCE=ref.pdb
p: POSITION ATOM=3
PRINT ARG=p.x,p.y,p.z