Distance#
The Distance analysis measures how far apart two groups are along a path or trajectory. It is excellent for tracking contacts, binding-site opening and closing, domain motion, or the approach of two selected features.

Adding the plot#
- Open Path Analyzer.
- Choose Distance in Observable.
- Choose a Path.
- Define Group A and Group B.
- Choose a Distance type.
- Click Add Time Series or Add Histogram.
Inputs#
- Two atom-containing selections are required.
- The available distance types are:
CentroidsMinimumMinimum along XMinimum along YMinimum along Z- In
Centroidsmode, each group is reduced to its centroid, i.e. the simple average of all atom positions. - In the
Minimummodes, Path Analyzer keeps the full atom sets and searches for the minimum pairwise separation instead of replacing the group by a single representative point.
Views#
- Time series: follow the distance along the path.
- Histogram: inspect the distribution of sampled distances.
Key equations#
For the centroid mode, the tracked signal is
\[
d_{\mathrm{centroid}}(t)=\|\mathbf{c}_A(t)-\mathbf{c}_B(t)\|,\qquad
\mathbf{c}_A(t)=\frac{1}{|A|}\sum_{i\in A}\mathbf{r}_i(t)
\]
For minimum-distance modes, Path Analyzer uses
\[
d_{\min}(t)=\min_{i\in A,\ j\in B}\|\mathbf{r}_i(t)-\mathbf{r}_j(t)\|
\]
and the axis-specific variants replace the norm by \(|x_i-x_j|\), \(|y_i-y_j|\), or \(|z_i-z_j|\).
How to read it#
Centroidsis a smooth, high-level descriptor for motion between two groups.Minimumis a better choice when you care about closest contact rather than overall displacement.- Axis-specific minima help separate motion along one preferred direction.
Centroidsuses a geometric average, not a center of mass.- This is different from Angle and Dihedral, where multi-atom groups are converted using centers of mass.
Tip
- Use small selections when you want chemically specific contact tracking.
- Use residues, domains, or chains when you want an interpretable coarse-grained signal.
- Saved Distance analyses work very well as inputs to Custom scatter, 2D density map, or Energy landscape.