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

Reply via email to