From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Aug 25 2004 - 09:29:13 CDT

Eckhart,
  Besides the rotation and centering matrices, you'll also need to
make molscript and VMD use the same projection matrix, which is probably
the trickiest part. If the projection matrix isn't the same, then you'll
get different degrees of perspective out of Molscript and VMD. You could
probably start out by doing a simple orthographic projection, until you
get them lined up with regard to all of the other matrices, then when that
works, you could move up to doing the projection matrix. If molscript has
an orthographic projection mode, I'd suggest trying that quickly to see
how different the views are when that issue is eliminated. Let me know
where things stand once you've tried that, and I can help you deal with
getting the perspective projections to line up.

  John

On Wed, Aug 25, 2004 at 11:05:04AM +0200, Eckhart Guthöhrlein wrote:
> On Tue, Aug 24, 2004 at 09:41:23AM -0500, John Stone wrote:
> > Probably the easiest method for obtaining the same view in VMD and
> > in molscript is to supply the same view transformation matrices to both
> > programs. If it is easy for you to take the view transform from VMD and
> > apply it in molscript, then this sounds like the way to go. You can
> > retrieve all of the VMD transformation matrices like this:
> > molinfo top get center_matrix
> > molinfo top get rotate_matrix
> > molinfo top get scale_matrix
> > molinfo top get global_matrix
> >
> > Let us know if you need help making this work.
>
> I have tried 'molinfo top get rotate_matrix', giving me
> {{0.514088 -0.724840 -0.458611 0.000000} {0.659784 -0.007478 0.751419
> 0.000000} {-0.548089 -0.688879 0.474391 0.000000} {0.000000 0.000000
> 0.000000 1.000000}}
>
> Then in molscript:
> transform atom * by rotation
> 0.514088 -0.724840 -0.458611
> 0.659784 -0.007478 0.751419
> -0.548089 -0.688879 0.474391
>
> This indeed gives me rather similar, but not identical views. What is
> missing? I am not interested in the scale matrix, but maybe I have to
> make use of the global and center matrix, but how? I tried some things
> with molscript's transform by centre, but without success.
>
> Regards,
> Eckhart

-- 
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