From: Giacomo Fiorin (
Date: Thu Nov 17 2022 - 08:03:42 CST

Hi Dimuthu, can you describe how distanceXY is not working?

The distanceXY and distanceZ functions have the option of defining a
dynamic axis instead of a fixed one, via the option ref2. But since there
is no equivalent option to define the orthogonal plane to the axis, one
straightforward way would be to use a fittingGroup inside the definition of
both groups involved:*sec:colvar_atom_groups_ref_frame__;Iw!!DZ3fjg!7Li6Pu8_W9gnVU2T4c64jj-9gU687FJL60a2-njjAD8OIe0rSH0davjVDnVQEpTgdegAZR370DzU0YGGK2s9uEipzw$

It's easiest is if you test things interactively using a recent alpha
version of VMD and the Dashboard:*sec:dashboard__;Iw!!DZ3fjg!7Li6Pu8_W9gnVU2T4c64jj-9gU687FJL60a2-njjAD8OIe0rSH0davjVDnVQEpTgdegAZR370DzU0YGGK2twydZnyQ$

Lastly, if you just want to do analysis, it may also be convenient to just
align the whole trajectory onto a reference where the TRP rings are
parallel to the XY plane. This is very easy with the RMSD Trajectory Tool
and suitable selections.

And of course, all of the above can be done with Tcl scripting: the core of
the computation isn't complex at all, and how to write Tcl scripts in VMD
is well documented.


On Thu, Nov 17, 2022 at 12:03 AM Kodituwakku,Dimuthu Nirmani <> wrote:

> Hello,
> I'm trying to calculate the projection of each carbohydrate C atom on the
> ring plane of TRP along the trajectory. Is there a way to achieve this
> through tcl scripting on VMD? distanceXY in colvars seems to be doing a
> similar thing, but it doesn't seem to be working for me.
> Appreciate any suggestions!
> Thank you!
> -Dimuthu

This message discusses the usage of Colvars, a software library that is
distributed with VMD, but is independently developed and maintained.
Please see;!!DZ3fjg!7Li6Pu8_W9gnVU2T4c64jj-9gU687FJL60a2-njjAD8OIe0rSH0davjVDnVQEpTgdegAZR370DzU0YGGK2vp4LkPYw$  for further information.