Sam, I recommend using Jmol-new.js and Jmol 10.x. With that what you desire is trivial and requires no callbacks at all, just:

var orientationInfo = jmolGetPropertyAsArray("orientationInfo")

This does the equivalent of:

orientationInfo=new Array()
orientationInfo.moveTo="moveto 1.0 -345 -938 -23 64.8;"
orientationInfo.rotateZYZ="reset; rotate z -160.7; rotate y 64.8; rotate z 159.0;"
orientationInfo.transYPercent=0
orientationInfo.transXPercent=0
orientationInfo.zoom=100
orientationInfo.rotateXYZ="reset; rotate x -35.1; rotate y -58.6; rotate z 18.5;"

you can check this out at

http://www.stolaf.edu/people/hansonr/jmol/test/proto/new.htm

by fiddling with the model and then clicking on [orientationInfo]

to see this information displayed in the box on the lower left.

Bob Hanson


Samuel Flores wrote:

Hi Tim,

Thanks for your help.  Show orientation works fine on the console window.
However, if I want to query the orientation and save the output in some
variable for later use, how would I do that?  I am trying to make an easy
point and click interface for the user..


Sam
Samuel Flores
Graduate Student
Gerstein Lab Office:
Bass 437
266 Whitney Avenue
New Haven, CT 06520 203.432.5405 Home: 28 Pearl Street
New Haven, CT 06511
cell: 203.747.2682
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Timothy
Driscoll
Sent: Monday, May 22, 2006 10:50 PM
To: [email protected]
Subject: Re: [Jmol-users] save orientation?

On May 22, 2006, at 10:23 p, Samuel Flores wrote:


Hi Guys,

I'm trying to write some code to let the viewer rotate the molecule to their liking, then have a high resolution image made based on that orientation. B I wonder if there is some way to track and output the on-screen orientation. Once I know what rotations were applied in jmol, I can re-apply the same rotations in pymol to make my high-res image. Is it possible to track the
angular orientation in this way?


hi Sam,

you can accomplish this with

show orientation

and messagecallback (or something similar from Bob's arsenal). the command gives a well-formed string that is easily parsable.

hth,

tim

--

Robert M. Hanson, [EMAIL PROTECTED], 507-646-3107
Professor of Chemistry, St. Olaf College
1520 St. Olaf Ave., Northfield, MN 55057
mailto:[EMAIL PROTECTED]
http://www.stolaf.edu/people/hansonr

"Imagination is more important than knowledge."  - Albert Einstein


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to