From: Bogdan Costescu (bcostescu_at_gmail.com)
Date: Sat Sep 04 2010 - 05:35:41 CDT

Hi Eduardo and John!

Thanks for the helpful suggestions!
I have looked at all scripts on the VMD website including
view_change_render when looking for something else, but somehow I
didn't make the connection that this would solve my current problem. I
haven't tried it yet, but it's very likely that it will do exactly
what I had in mind. And the link that John has sent explains how it
works :-)

Cheers,
Bogdan

On Fri, Sep 3, 2010 at 6:16 PM, Eduardo <chucruz_at_ks.uiuc.edu> wrote:
> 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
>
>