From: Andrew Dalke (dalke_at_bioreason.com)
Date: Thu Apr 15 1999 - 23:18:33 CDT

Charles Schwieters <schwitrs_at_cbel.cit.nih.gov> asked:
> Because the translate operation does not modify either molecule's
> center transformation, the molecules now rotate about different
> axes. This behavior is not what I was expecting, and I'm having
> difficulty finding a justification for it.
>
> My questions are: is this behavior intended? Why?

I see Justin <justin_at_ks.uiuc.edu> already answered the question
of how to get the behaviour you want (use the "MoveMolecule" mode
from the "Pick Item" option).

As to why the current behaviour exists, let me give some background
first. VMD uses the following transformations

  center -> scale -> rotate -> final offset

The mouse translation is done by changing the final offset
transformation. This means that all molecules get moved across
the screen by the same amount. The translations are in "world
space".

The MoveMolecule translations are done in the centering transformation
(though in reality the coordinates are changed and not the centering
matrix, but they have the same effect.) These transformation are
in molecule space. In fact, to make the various Move* commands work,
we need to compute the inverse transform to bring the mouse
position (from world space) into molecule space.

The problem is every molecule has a different inverse transformation.
So it is easier for us to implement what we did than to compute
all the inverse transforms every time.

But it that's the only reason it would be a lousy excuse.

Consider instead the different behaviours you can get from what we
did. Each molecule can have its own center. With as you propose,
there can be only a single center (if different molecules have
different centers then they'll rotate differently around their
centers).

This isn't needed if you are just looking at the strict physical
model, but it is very helpful in combination with the "fixed" mode
for comparing two structures/systems in the same display.

For example, take the first and final structures from a simulation.
They should have the same center of mass, which is close to the center
of the average of the min and max x,y,z values, which is where VMD
puts the center. Load the two molecules and they will be on top of
each other. If you want them side by side you can do pretty much
what you did:

  move both left
  fix #1
  move #2 to the right
  unfix #2

(if they aren't centered around exactly the same place, you can
change the centering point).

Then you can rotate the two molecules at the same time and compare
them, or fix one and move the other around, then vice versa. The
only other way to do that would be to run two sessions of VMD.

See Fig. 1 of http://www.ks.uiuc.edu/Research/cell_motility/actin/
for an example of why you would want to compare two models in such
a non-physical way.

There is no way you could build that image and have both molecules
with the same center, which means you must allow different rotation
axes.

I hope this answered your question about that behaviour of VMD.

                                                Andrew Dalke
                                                dalke_at_acm.org