On 04/05/2015 05:58 AM, Robert Hanson wrote:
> Rolf, I think you could have a lot of fun  with the "JavaScript" functions
> Jmol provides. Jmol never does loops like that. Instead it initializes a
> "three-dimensional binary tree" -- we call it a "binary forest" :)  -- and
> you specify a point and a radius, then iterate until done. It is far far
> faster. The class is java.bspt.Bspf. It could be used outside of Jmol, I
> think.
>
Currently I would rather try to add the minimization algorithm to Java 
than to Javascript since it should work fast for Java and Javascript.
But it will take quite some time until I can start with that.

As a first step I replaced my current grid implementation by using the 
"within" command. Now there is already a small gain with 100 atoms. and 
with ~1200 atoms 100 iterations need 400 seconds compared to 980 seconds 
without optimization and 1400 seconds with my grid implementation (being 
still slower than without grid).

> I did some minor tweaks of the FOR command, and I also added what I think
> is a nice syntax that loops 2-3 times faster than (i=1; i < n; i++)
>
> for (var i FROM [1 10000] ) {
> ...increments up
> }
>
> for (var i FROM [10 -1]) {
> ...increments down
> }
>
Very nice Bob, thank you. I observe the same speedup with IcedTea Java.

> bug fix: for (var i in hashArray) {....}  broken (also in 14.2; not fixed
> there)
I thought this didn't work because it wasn't implemented since it wasn't 
mentioned in the 'for' documentation.
Q: Does 'i' contain the hash key (as in Perl) or the value?

Regards,
Rolf

-- 

Rolf Huehne
Postdoc

Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI)
Beutenbergstrasse 11
07745 Jena, Germany

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

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

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


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to