Re: [Jmol-users] Jmol scripting speed in JSmol/HTML5

2015-12-22 Thread Rolf Huehne
On 12/22/2015 03:18 AM, Robert Hanson wrote:
> BTW, that's because "{" will be read as a JavaScript statement grouping:
>
>   {
> var x = 3;
> ...
>   }
>
> By putting "0," before that, you guarantee that it is read as an object.
>
> You can also use
>
> y = javascript('JSON.parse(\"'+x+'"\")')
>
> where x is JSON encoded. I could imagine that would be a bit faster,
> because it is using a more restricted vocabulary.
>
Thanks, Bob. The tip with adding '0,' did work in JSmol/HTML5.

'JSON.parse' didn't work. There was the same error message as with just 'x'.

With JSmol/Java none of the variants seems to work. Either the Java 
plugin crashed or nothing seemed to happen (no CPU load), although JSmol 
stayed blocked for at least an hour (I stopped waiting).

Regards,
Rolf


-- 

Rolf Huehne
Postdoc

Leibniz Institute on Aging - Fritz Lipmann Institute (FLI)
Beutenbergstrasse 11
07745 Jena, Germany

Phone:   +49 3641 65 6205
Fax: +49 3641 65 6210
E-Mail:  rhue...@leibniz-fli.de
Website: http://www.leibniz-fli.de

   Scientific Director: Prof. Dr. K. Lenhard Rudolph
Head of Administration: Dr. Daniele Barthel
Chairman of Board of Trustees: Burkhard Zinner

VAT No: DE 153 925 464
Register of Associations: No. 230296, Amtsgericht Jena
Tax Number: 162/141/08228


--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] Bug in 12/21 build?

2015-12-22 Thread Eric Martz

Hi Bob,

The good news is that the 12/21 build almost passed all my tests in 
FirstGlance.


Incidentally, while JSmol reports itself as 14.*4*.1_2015.12.*21*, 
Jmol_S reports itself as 14.*5*.1_2015.12.*16*.


So far I only noticed one place that both JSmol and Jmol_S hiccup. It 
only happens once, the first time I do a certain operation in 
FirstGlance, and only if I do a certain sequence. Sounds like an 
initialization problem?


This problem occurs in the 12/21 and 12/20 builds, but NOT in the 12/15 
build.


Before I spend more time on this (and trying to make something where you 
can reproduce this), maybe the info below is enough?


Jmol_S freezes with no message in the Java or Jmol Consoles.

JSmol says with set debugscript on
color dots none;
script ERROR: TypeError: this.bsColixSet is null J.shapespecial.Dots set 
color


and generates

TypeError: this.bsColixSet is null try/catch path:
0 function (b,d)
 args[0]=TypeError: this.bsColixSet is null
 args[1]=function (){a.instantialize(this,arguments)}
1 JS.ScriptEval.executeCommands(a,b)
 args[0]=false
 args[1]=true
2 JS.ScriptEval.evaluateCompiledScript(a,b,c,e,f,p)
 args[0]=false
 args[1]=false
 args[2]=true
 args[3]=false
 args[4]=null
 args[5]=false
3 JS.ScriptManager.evalStringWaitStatusQueued(a,b,c,e,f)
 args[0]=JSON
 args[1]=set echo middle center; font echo 100 sanserif bold; color e...
 args[2]=+scriptStarted,+scriptStatus,+scriptEcho,+scriptTerminated
 args[3]=false
 args[4]=false
4 JV.Viewer.evalStringWaitStatusQueued(a,b,c,g,f)
 args[0]=JSON
 args[1]=set echo middle center; font echo 100 sanserif bold; color e...
 args[2]=+scriptStarted,+scriptStatus,+scriptEcho,+scriptTerminated
 args[3]=false
 args[4]=false
5 JV.Viewer.evalWait(a,b,c)
 args[0]=JSON
 args[1]=set echo middle center; font echo 100 sanserif bold; color e...
 args[2]=+scriptStarted,+scriptStatus,+scriptEcho,+scriptTerminated
6 JV.Viewer.scriptWait(a)
 args[0]=set echo middle center; font echo 100 sanserif bold; color e...
7 JU.GenericApplet.scriptProcessor(a,b,d)
 args[0]=set echo middle center; font echo 100 sanserif bold; color e...
 args[1]=null
 args[2]=1
8 scriptWait(a,b)
 args[0]=set echo middle center; font echo 100 sanserif bold; color e...
 args[1]=null
9 function ()
 args[0]=set echo middle center; font echo 100 sanserif bold; color e...
 args[1]=null

-Eric
--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol scripting speed in JSmol/HTML5

2015-12-22 Thread Robert Hanson
This is JavaScript only.

On Tue, Dec 22, 2015 at 1:55 PM, Rolf Huehne  wrote:

> On 12/22/2015 03:18 AM, Robert Hanson wrote:
> > BTW, that's because "{" will be read as a JavaScript statement grouping:
> >
> >   {
> > var x = 3;
> > ...
> >   }
> >
> > By putting "0," before that, you guarantee that it is read as an object.
> >
> > You can also use
> >
> > y = javascript('JSON.parse(\"'+x+'"\")')
> >
> > where x is JSON encoded. I could imagine that would be a bit faster,
> > because it is using a more restricted vocabulary.
> >
> Thanks, Bob. The tip with adding '0,' did work in JSmol/HTML5.
>
> 'JSON.parse' didn't work. There was the same error message as with just
> 'x'.
>
> With JSmol/Java none of the variants seems to work. Either the Java
> plugin crashed or nothing seemed to happen (no CPU load), although JSmol
> stayed blocked for at least an hour (I stopped waiting).
>
> Regards,
> Rolf
>
>
> --
>
> Rolf Huehne
> Postdoc
>
> Leibniz Institute on Aging - Fritz Lipmann Institute (FLI)
> Beutenbergstrasse 11
> 07745 Jena, Germany
>
> Phone:   +49 3641 65 6205
> Fax: +49 3641 65 6210
> E-Mail:  rhue...@leibniz-fli.de
> Website: http://www.leibniz-fli.de
>
>Scientific Director: Prof. Dr. K. Lenhard Rudolph
> Head of Administration: Dr. Daniele Barthel
> Chairman of Board of Trustees: Burkhard Zinner
>
> VAT No: DE 153 925 464
> Register of Associations: No. 230296, Amtsgericht Jena
> Tax Number: 162/141/08228
>
>
>
> --
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>



-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Department 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
--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Bug in 12/21 build?

2015-12-22 Thread Robert Hanson
sounds very familiar. I did move two lines of code relating to bsColixSet
and did not test dots.

On Tue, Dec 22, 2015 at 8:00 PM, Eric Martz 
wrote:

> Hi Bob,
>
> The good news is that the 12/21 build almost passed all my tests in
> FirstGlance.
>
> Incidentally, while JSmol reports itself as 14.*4*.1_2015.12.*21*, Jmol_S
> reports itself as 14.*5*.1_2015.12.*16*.
>
> So far I only noticed one place that both JSmol and Jmol_S hiccup. It only
> happens once, the first time I do a certain operation in FirstGlance, and
> only if I do a certain sequence. Sounds like an initialization problem?
>
> This problem occurs in the 12/21 and 12/20 builds, but NOT in the 12/15
> build.
>
> Before I spend more time on this (and trying to make something where you
> can reproduce this), maybe the info below is enough?
>
> Jmol_S freezes with no message in the Java or Jmol Consoles.
>
> JSmol says with set debugscript on
> color dots none;
> script ERROR: TypeError: this.bsColixSet is null J.shapespecial.Dots set
> color
>
> and generates
>
> TypeError: this.bsColixSet is null try/catch path:
> 0 function (b,d)
>  args[0]=TypeError: this.bsColixSet is null
>  args[1]=function (){a.instantialize(this,arguments)}
> 1 JS.ScriptEval.executeCommands(a,b)
>  args[0]=false
>  args[1]=true
> 2 JS.ScriptEval.evaluateCompiledScript(a,b,c,e,f,p)
>  args[0]=false
>  args[1]=false
>  args[2]=true
>  args[3]=false
>  args[4]=null
>  args[5]=false
> 3 JS.ScriptManager.evalStringWaitStatusQueued(a,b,c,e,f)
>  args[0]=JSON
>  args[1]=set echo middle center; font echo 100 sanserif bold; color e...
>  args[2]=+scriptStarted,+scriptStatus,+scriptEcho,+scriptTerminated
>  args[3]=false
>  args[4]=false
> 4 JV.Viewer.evalStringWaitStatusQueued(a,b,c,g,f)
>  args[0]=JSON
>  args[1]=set echo middle center; font echo 100 sanserif bold; color e...
>  args[2]=+scriptStarted,+scriptStatus,+scriptEcho,+scriptTerminated
>  args[3]=false
>  args[4]=false
> 5 JV.Viewer.evalWait(a,b,c)
>  args[0]=JSON
>  args[1]=set echo middle center; font echo 100 sanserif bold; color e...
>  args[2]=+scriptStarted,+scriptStatus,+scriptEcho,+scriptTerminated
> 6 JV.Viewer.scriptWait(a)
>  args[0]=set echo middle center; font echo 100 sanserif bold; color e...
> 7 JU.GenericApplet.scriptProcessor(a,b,d)
>  args[0]=set echo middle center; font echo 100 sanserif bold; color e...
>  args[1]=null
>  args[2]=1
> 8 scriptWait(a,b)
>  args[0]=set echo middle center; font echo 100 sanserif bold; color e...
>  args[1]=null
> 9 function ()
>  args[0]=set echo middle center; font echo 100 sanserif bold; color e...
>  args[1]=null
> 
> -Eric
>
>
> --
>
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>


-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Department 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
--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol-14.4.1_2015.12.21

2015-12-22 Thread Robert Hanson
Bonus issue!

(just use jsmol)

On Mon, Dec 21, 2015 at 10:40 PM, Jaime Prilusky <
jaime.prilu...@weizmann.ac.il> wrote:

> Please check the build. There’s inside jsmol.zip two folders, jsmol and
> jsmol2
>
>
> On 22 Dec 2015, at 6:21 AM, Robert Hanson  wrote:
>
> Jmol-14.4.1_2015.12.21-binary.zip
> 
>
> JmolVersion="14.4.1_2015.12.21"
>
> bug fix: color [0xff] should not be case-sensitive -- [0Xff]
> should be OK
> bug fix: set spin fps ... fails
> bug fix: array handling for labels very inefficient
> bug fix: y = javascript("x") only creates string equivalent of x, not
> actual numerical/object values
> bug fix: y = javascript("x") draws "x" from wrapped anonymous function
> using eval() instead of global context using window.eval()
>
> code: (JavaScript) adding use of typedArray.buffer.slice
> code: (JavaScript) adding use of array.slice and implementing Java  byte[]
> as JavaScript Int8Array()
>
>
> --
> Robert M. Hanson
> Larson-Anderson Professor of Chemistry
> Chair, Department 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
>
>
> --
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
>
>
> --
>
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>


-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Department 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
--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users