From: Peter Freddolino (petefred_at_ks.uiuc.edu)
Date: Fri Jun 05 2009 - 19:53:16 CDT

Hi Navendu,
please see
http://www.ks.uiuc.edu/Research/vmd/script_library/scripts/orient/
Best,
peter

Navendu bhatnagar wrote:
> Hello all,
>
> I need to align my molecule to the principal axes. When going through
> the mailing lists I came across a script / method to perform this shared
> by Peter.
>
> The message is as follows :
>
> */For example, for your case, if the long axis of your molecule is along
> the /
> /> vector {a b c}, you can rotate it to align it with the z axis as
> follows: /
> /> /
> /> set sel [atomselect top all] /
> /> set M [transvecinv {a b c}] /
> /> $sel move $M /
> /> set M [transaxis y -90] /
> /> $sel move $M /
> /> /
> /> This performs your task in two steps: transvec inv rotates your
> vector to be /
> /> along the x axis, and then transaxis rotates about the y axis to
> align your /
> /> vector with z. /*
>
> I want to use the above script but I am not sure on how to get the
> vector corresponding to the long axis of my molecule.
>
> Please share the ideas / suggestions on this.
>
> Thanks,
>
>
>
> NAVENDU BHATNAGAR
>