From: David Horita (horita_at_ncifcrf.gov)
Date: Wed Dec 09 1998 - 17:00:54 CST

I have an MD run where I'd like to be able to follow the distance
between two atoms and display it in a corner of the VMD graphics window
so it will be visible & updated when I make a movie of the trajectory.
At the moment, I'm sufficiently baffled by the scripting language to not
know how to do this.
1. I can get a line drawn between two atoms, with the distance
displayed in the middle of the line using the label button. What is the
script equivalent (I haven't figured out the atom selection part of
'label add Bonds').
2. The vecdist routine (manual section 16.1) seems like it should be
useful. How do I send input to it without using the foreach command -
if I only want to determine the distance between atom X and Y, rather
than over a larger collection as in the macro?
doing:
vmd > set sel [atomselect top "name CA and resid 32"]
vmd > set coords [$sel get {x y z}]
gives
vmd > list $coords
Info) { {40.139999 0.444000 0.237000}}
so $coords is not a 3 element vector. How do I equate a variable with
the xyz coordinates
such that I can use it as an argument to vecdist (or vecsub, for that
matter)?
Thanks for any help,
Dave Horita