From: Jacob Kirkensgaard (kirkensgaard_at_life.ku.dk)
Date: Tue Feb 16 2010 - 15:21:21 CST

thanks john!
you're my vmd hero

all the best
jacob

On Feb 16, 2010, at 5:25 PM, John Stone wrote:

>
> Hi,
> You can compute this for a given molecule by transforming the
> default view direction { 0 0 -1 } by the inverse of the molecule's
> rotation matrix:
> set R [lindex [molinfo top get rotate_matrix] 0]
> set viewdir [coordtrans [measure inverse $R] {0 0 -1}]
>
> You can similarly compute the position of the camera in molecule
> coordinates by applying the right transformations to the original
> camera position in world coordinates.
>
> Cheers,
> John
>
> On Tue, Feb 16, 2010 at 10:58:24AM +0100, Jacob Kirkensgaard wrote:
>> Hi all
>>
>> I simply can't find the command for this: Is there not a command to get the current view direction in orthographic mode. For example the default start view is along the z axis and the answer would be [0 0 -1].
>>
>> Thanks, your help is greatly appreciated
>> Jacob
>
> --
> 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
>
>