From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon Jul 30 2001 - 20:40:28 CDT

Dear Mauricio,
  Probably the best way to do this in the current versions of VMD
is to calculate the required rotations to place the three
atoms into the plane you want them to be in. You can calculate
the sin/cos/tan of these angles by projecting the atom coordinates for the
two reference atoms onto an axis centered on the third atom. If you
think of making a triangle from the "origin" atom, to a reference atom,
and then to the axis you want to rotate it onto, you could get the
sin/cos/tan values, call acos/asin/atan to get the angle back, and then
perform two rotations each for the two reference atoms. I think that would
work fine, but I haven't thought about it very hard yet, need to draw it
out to make sense of it really. The point is, you can calculate the required
rotations to orient the molecule as you desire and then apply them to the
molecule. Since VMD only lets you rotate about the principle axes with its
built-in commands, I believe it will take at least 3 rotations to get the
job done if it were able to rotate about an arbitrary axis, you could
probably do it with two, maybe even one. Let me know if you have more
questions about this, and I can provide more help. At the very least,
I could take time to draw it out and give you a more detailed response
with the right equations and an example...
I'm in a hurry so I've got to run for now.

Thanks for using VMD!
  John Stone
  johns_at_ks.uiuc.edu

On Mon, Jul 30, 2001 at 03:08:39PM -0700, Mauricio Carrillo-Tripp wrote:
> Hi, i would like to know if it is possible to do the following:
> I'm displaying a MD run from a dcd charmm file. The problem
> is that as the run pass by, the molecule rotates randomly.
> I would like to fix a certain atom on the origin, another on the
> x axis, and a third one on the x-y plane, in such a way that
> those three atoms are always on a fixed plane so when I play
> de MD the molecule wont rotate.
> Or, is there another way for fixing it?
> thank you.
>
> ______________________________________________________________________
>
> Mauricio Carrillo Tripp
> PhD Biophysics
> CCF-UNAM
>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349              
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078