Herráez Sánchez Angel wrote:
>Eran wrote:
>
>
>>I'd like to save a state as a script in such a way that when that
>>state-script is recalled on a Jmol applet already displaying
>>something, that state-script will load without affecting the spin-
>>state of the applet
>>
>>
>
>Hello
>
>Easiest way: if the script is saved to a file, edit it and remove the spin
>command from the state-script.
>
>
>
won't work -- loading the file resets any spinning, and you can't .
>Otherwise, I think you can use "show spin" to read the spin state before
>calling the state, then issue it after the script.
>
>
that's the way to do it.
JavaScript:
var spinState = jmolEvaluate('script("show spin")'))
gets you something like:
spinX = 0;spinY = 30;spinZ = 0;spinFps = 30;
spin 20.0 {2.3090453 0.0 0.0} {1.3767258 1.136295 0.6437832};
which can then later be used.
or Jmol script, not JavaScript:
spinState = script("show spin");
script "mysavedstate.spt";
print script(spinState);
The "print" doesn't do anything, but it allows the script now saved in
spinState to be executed.
>I did something similar for a "Foolproof spin toggle" you can see at
>http://wiki.jmol.org:81/index.php/Recycling_Corner#.22Foolproof.22_spin_toggle
>That may give you an idea.
>
>
>
>------------------------------------------------------------------------
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by: Splunk Inc.
>Still grepping through log files to find problems? Stop.
>Now Search log events and configuration files using AJAX and a browser.
>Download your FREE copy of Splunk now >> http://get.splunk.com/
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Jmol-users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
--
Robert M. Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users