From: Eduardo (chucruz_at_ks.uiuc.edu)
Date: Fri Sep 03 2010 - 11:16:26 CDT

There is a tcl script (view_change_render) that you can use. Just go
to:

http://www.ks.uiuc.edu/Research/vmd/script_library/

Regards;

Eduardo

On Sep 3, 2010, at 5:50 AM, Bogdan Costescu wrote:

> 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