On 08/03/2011 03:04 PM, Daniel Carbajo wrote:
> Hello everyone,
> is it possible to save a Jmol session in terms of proteins loaded, their
> displays (cartoon, spacefill...), residues selected, labels, etc. in one php
> page so everything is restored in another? Can I save the session
> specifications into a file that is read by another php page? I am trying
> with save/restore ORIENTATION saveName, but does not seem to be working.
The "save state" command does this.
(see 
http://jena3d.fli-leibniz.de/ImgLibPDB/Jena3D/doc/jmol_scripting/index.htm#save 
)

But you will need the "signed" Jmol applet to be able to write it 
directly into a file.

With the "unsigned" Jmol applet you can open the Jmol console, display 
the state (by clicking on a button) and copy+paste the state into a text 
editor and save it into a file.
But depending on the combination of Java, browser and operating system 
version there might be copy+paste problems.

With both applet types you could read the state information with 
javascript and then send the data to a server for storage:

state = jmolGetPropertyAsString("stateInfo");

Depending on the location of the other PHP page and the directory 
organization at this site it might be becessary to adapt the state 
script to the new location before it is loaded properly.

Regards,
Rolf

------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to