From: Ana Celia Araujo Vila Verde (avilaverde_at_engr.psu.edu)
Date: Fri Jan 19 2007 - 07:59:55 CST

Hi,

Try moving the center of mass of your molecule to the origin, performing the rotation and then moving it back to where it was (if it's important).

Ana

_________________________________
Ana Célia Araújo Vila Verde
Penn State University
Department of Chemical Engineering
Fenske Laboratory
University Park, PA 16802
USA
 
 
Phone: +(1) (814) 863-2879
Fax: +(1) (814) 865-7846
avilaverde_at_engr.psu.edu
http://www.che.psu.edu/Faculty/JMaranas/group/avv.html
http://www.gfct.fisica.uminho.pt/Members/acvv
_________________________________

-----Original Message-----
From: owner-vmd-l_at_ks.uiuc.edu [mailto:owner-vmd-l_at_ks.uiuc.edu] On Behalf Of Himanshu Khandelia
Sent: Friday, January 19, 2007 6:42 AM
To: vmd-l_at_ks.uiuc.edu
Subject: vmd-l: rotation to align

Hi,

I am trying to rotate the principal axis of one molecule in my system to
align with the z axis. I use the following, as earlier suggested in the
mailing list:

##############
# if $vec is the principal vector
set M [transvecinv $vec]
$sel move $M
set M [transaxis y -90]
$sel move $M
###############

However, my molecule is not located at the origin, and hence the rotation
(which is around the origin, probably) also results in overall
translation. Is there a straightforward way to prevent overall translation
while trying to implement rotations in NAMD ?

Thank you,

-Himanshu