Aha, thanks for explaining-- and for correcting/updating the function. It now
runs in JSMol, albeit more slowly than in JMol. So I took out the delay
entirely and it seems to speed it up a little. But it’s not yet fast enough to
make a pretty animation, unfortunately. I assume it is just a matter of time
until it does, since JSMol speed has been improving. It would probably work
very well with a small molecule.
Yes, the delay was originally 0.01, but I had changed it to 1 temporarily when
I was trying to figure things out.
Frieda
On Apr 21, 2014, at 12:53 PM, Robert Hanson <[email protected]> wrote:
> This is probably the ONE big difference between JSmol/HTML5 and JSmol/java:
>
> You cannot execute DELAY within a math call like x=script().
>
> Here is a more JavaScript-like version of that function that also avoids
> calling DELAY within script(). Should work in HTML5 as well as Java. The
> one-second delay seems a bit slow to me; sure you didn't mean 0.01 there?
>
>
> function off2cpk() {
> delay 0.1
> set hermiteLevel 0
> var x = "";
> for ( var i=0; i<91; i = i + 5 ) {
> x += "cpk " + i + "%; delay 1; refresh;"
> }
> script inline @x
> set hermitelevel 4
> delay 0.1
> }
>
> Bob
>
>
>
> On Mon, Apr 21, 2014 at 9:42 AM, Frieda Reichsman <[email protected]> wrote:
> Hi Bob,
>
> The following works for “growing” spacefill when I use the signed applet, but
> not when I use JSMol:
>
> function off2cpk
> delay 0.1
> set hermiteLevel 0
>
> for ( var i=0; i<91; i = i + 5 )
> x = script("cpk " + i + "%; delay 1; refresh;")
> end for
>
> set hermitelevel 4
> delay 0.1
> end function
>
>
>
> Do I need to be doing something differently here?
>
> Frieda
>
>
> ///////////////////////////////////////////
>
> Frieda Reichsman
> Molecules in Motion
> Interactive Molecular Structures
> http://www.moleculesinmotion.com
>
> ///////////////////////////////////////////
>
>
>
>
>
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
> http://p.sf.net/sfu/ExoPlatform
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
>
>
> --
> Robert M. Hanson
> Larson-Anderson 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
>
> ------------------------------------------------------------------------------
> Start Your Social Network Today - Download eXo Platform
> Build your Enterprise Intranet with eXo Platform Software
> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
> Get Started Now And Turn Your Intranet Into A Collaboration Platform
> http://p.sf.net/sfu/ExoPlatform_______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users