From: Margaret Shun Cheung (mscheung_at_ipst.umd.edu)
Date: Wed Apr 12 2006 - 13:30:05 CDT

Dear Peter,
It had worked beautifully!
Thank you very much!
Sincerely,
Margaret

On Wed, 12 Apr 2006, Peter Freddolino wrote:

> Dear Margaret,
> you can do this by using the VMD matrix routines, documented at
> http://www.ks.uiuc.edu/Research/vmd/current/ug/node172.html.
>
> 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.
>
> Hopefully this will work for you.
> Best,
> Peter
>
> Margaret Shun Cheung wrote:
>
>> Dear Peter,
>>
>> Thank you for your email. I knew the vector of the long axis of my
>> molecule. I would like to rotate/transform my molecule so that eventually
>> this vector will align with (0,0,z). After the transformation, I can use
>> this new set of coordinates as an input file in NAMD for pulling at (0,0,z)
>> direction.
>> Thank you very much!
>> Sincerely,
>> Margaret
>>
>> On Wed, 12 Apr 2006, Peter Freddolino wrote:
>>
>>> Dear Margaret,
>>> to be clear, do you know what the long axis is and just want to know how
>>> to move things right, or do you not know what the longest axis is?
>>> Peter
>>>
>>> Margaret Shun Cheung wrote:
>>>
>>>>
>>>> Dear VMD wizards,
>>>>
>>>> I want rotate my aspherical molecule such that its long axis will be
>>>> aligned to the z- axis. Is there a VMD script that can be used for this
>>>> purpose?
>>>> Thank you very much!
>>>> Sincerely,
>>>> Margaret S. Cheung,
>>>> Ph. D. Postdoctoral Fellow,
>>>>
>>>> ------------------------------------------------------------
>>>> Room 2117 Tel: (301) 405-4892
>>>> Inst. for Phys. Sci. & Tech. Fax: (301) 314-9404
>>>> University of Maryland http://glue.umd.edu/~mscheung
>>>> College Park, MD 20742-2431 email: mscheung_at_ipst.umd.edu
>>>> ------------------------------------------------------------
>>>
>>>
>>
>> Margaret S. Cheung,
>> Ph. D. Postdoctoral Fellow,
>>
>> ------------------------------------------------------------
>> Room 2117 Tel: (301) 405-4892
>> Inst. for Phys. Sci. & Tech. Fax: (301) 314-9404
>> University of Maryland http://glue.umd.edu/~mscheung
>> College Park, MD 20742-2431 email: mscheung_at_ipst.umd.edu
>> ------------------------------------------------------------
>

Margaret S. Cheung,
Ph. D. Postdoctoral Fellow,

------------------------------------------------------------
Room 2117 Tel: (301) 405-4892
Inst. for Phys. Sci. & Tech. Fax: (301) 314-9404
University of Maryland http://glue.umd.edu/~mscheung
College Park, MD 20742-2431 email: mscheung_at_ipst.umd.edu
------------------------------------------------------------