On May 23, 2006, at 11:54 a, 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..


hi Sam,

I still use messagecallback, in this fashion:

1. add a messagecallback param to the applet tag. the messagecallback function that I use saves messages into a js array.

2. add a button that calls javascript function1. this function clears the array from (1), then sends the 'show orientation' command to Jmol, then calls function2.

3. function2 reads the messages array and parses out the desired coordinates. I post mine into a textarea, but you can just as easily save it into a js variable.


this method is obviously dependent on a working messagecallback, which does not work on some browsers. Bob Hanson was developing some alternatives to callbacks but I don't know the status of that stuff - you can check the list archives.


best,

tim


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


--
Timothy Driscoll                                em: [EMAIL PROTECTED]
molvisions - see. grasp. learn.                 ph: 919-368-2667
<http://www.molvisions.com/>                    im: molvisions
usa:virginia:blacksburg                         tx: [EMAIL PROTECTED]

"Had 'em and we lost 'em."





-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to