PROJECTION_ON_AXIS
This is part of the colvar module

Calculate a position based on the projection along and extension from a defined axis.

This variable takes 3 input atoms or pseudoatoms, using the two AXIS_ATOMS to define a linear vector. The position of the ATOM is then calculated relative to this vector, with two output components. The projection on the axis (proj) is the distance along the axis from the ATOM to the origin. The extension (ext) is the orthogonal distance between the ATOM and the axis.

Examples

This command tells plumed to define an axis, by calculating a vector that passes through atom 1 and atom 2. The position of atom 3 as a projection along this vector is calculated and printed to COLVAR1. At the same time, the perpendicular distance of atom 3 from the axis, the extension, is printed to COLVAR2.

Click on the labels of the actions for more information on what each action computes
tested on master
poa: PROJECTION_ON_AXIS 
AXIS_ATOMS
The atoms that define the direction of the axis of interest.
=1,2
ATOM
The atom whose position we want to project on the axis of interest.
=3

A particular application of this variable could be to study the motion of a ligand relative to its binding pocket on a protein. In this set of commands, the anchor points a1 and a2 are defined using example atom numbers within the protein. As a2 is attempting to be as close as possible to the center of the binding pocket, a COM is used when there are no suitable protein atoms. Similarly, a COM is used to define the position of the ligand in lig1. The calculated projection of lig1 along the axis defined between a1 and a2 is printed to COLVAR1. The calculated perpendicular extension of lig1 from the axis defined between a1 and a2 is printed to COLVAR2.

Click on the labels of the actions for more information on what each action computes
tested on master
a1: GROUP 
ATOMS
the numerical indexes for the set of atoms in the group.
=3754 # Anchor point 1 a2: COM
ATOMS
the list of atoms which are involved the virtual atom's definition.
=3019,4329,4744 # Anchor point 2 lig1: COM
ATOMS
the list of atoms which are involved the virtual atom's definition.
=5147-5190 # Ligand pp: PROJECTION_ON_AXIS
AXIS_ATOMS
The atoms that define the direction of the axis of interest.
=a1,a2
ATOM
The atom whose position we want to project on the axis of interest.
=lig1
Glossary of keywords and components
The atoms involved can be specified using
AXIS_ATOMS The atoms that define the direction of the axis of interest. For more information on how to specify lists of atoms see Groups and Virtual Atoms
ATOM The atom whose position we want to project on the axis of interest. 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