From: Bogdan Costescu (bcostescu_at_gmail.com)
Date: Fri Sep 03 2010 - 05:50:40 CDT

Hi!

I'm trying to do some animations that require rotations of single
structures (=no trajectories). Normally I would use 'rotate' to bring
the orientation from the original viewpoint to the desired one.
However I want to align the structure in a particular way with respect
to the viewer, so I use something like:

set M [transvecinv $vector]
molinfo 0 set rotate_matrix [list $M]

which gives me the desired viewpoint. The original viewpoint is either
the one VMD sets automatically after loading the structure or a
previous one obtained through the above procedure. But I haven't found
a way to compute the intermediate rotations needed for the animation.
Is there a "matrix way" of doing it or does one have to peek in $M ?
Either way, if someone has done this already, I would appreciate some
guidance or even better some code.

Cheers,
Bogdan