Dear Bob,


To sum up,
I tried different webBrowsers and OS :

Finally:

a) Using Safari / Mac os Snow Leopard is ok, signed and non signed applet

b) Using Safari / Mac os Lion doesn't work ("You do not have java Applets enabled ...", while 
I have allowed "applications downloaded from anywhere" in the security configuration, 
while the java applet module is activated in "Java preferences" ...)

c) Using Mozilla / Mac os Snow Leopard doesn't work : the Mozilla application is freezing after
the PDB file name is required to the user...

d)  Using Mozilla / Mac os Lion works fine with the non-signed jMol applet, 
but fails with the signed applet


Thanks again for your help!
Have a nice week-end.
Eric



Le 8 oct. 2012 à 20:57, Robert Hanson a écrit :

Oh, right. Maybe not. But that's not the problem. No changes have been made in Jmol.js recently. You agree it's all working at my site, right? Then you just have not got the right files yet. Really all you need are the three files in

http://chemapps.stolaf.edu/jmol/docs/examples-12/test/

and then also

http://chemapps.stolaf.edu/jmol/docs/examples-12/Jmol.js
http://chemapps.stolaf.edu/jmol/docs/examples-12/JmolAppletSigned.jar

Right? That's all that page is using. I have no idea what's going on if that doesn't work for you. Nothing special about our server here....



Bob



On Mon, Oct 8, 2012 at 1:40 PM, eric henon <eric.henon@univ-reims.fr> wrote:
Hi Bob,

Thanks for the archive. Unfortunately, there is no Jmol.js file in this archive.  I downloaded the last
version (13.0.6), and Jmol.js is there ( but some others .js files are lacking compared to the
archive you sent to me (JmolCore-auto.js, JmolCoreTest.js, JmolJSmol.js) ).

However, my jBox application does not run properly on 13.0.6 version: the pdb is not loaded.
It is not a problem of java (I employed FireFox); all the jMol buttons, CheckBox, ... appear,
the jmol applet is sized to 800, but remains empty.  The jMolScript("load 2PO6.pdb")
command seems to be the problem, or maybe also the jMolSetCallback command (?). 

Also, the jMolScript("console") does not appear
so that I cannot debug easily. 

I tried with the 13.0.4, ..., 12.2.34 versions: it does not work (same problem as above described).
It only works with my old 12.2.21 jMol version.
Have you carried out successfully my jMol application using a recent version of jMol ?

Thanks in advance.
Eric





Le 8 oct. 2012 à 01:41, Robert Hanson a écrit :

Glad to hear that. I think it's a problem of not having the up-to-date files. If it is working at my site it's because I have the latest fixes there. So consider extracting the relevant .js files from http://chemapps.stolaf.edu/jmol/Jmol-13.zip

I just realized that I had not been updating some of the JmolJSO JavaScript library files correctly there. So that might be part of it. But they are there now.

Bob




On Sun, Oct 7, 2012 at 3:29 PM, eric henon <eric.henon@univ-reims.fr> wrote:
Hi Bob,

It's very strange because :

1) Actually, that works  (no "lag" problem any more) using your link to the modified jBox.html/Signed

2) One of the difference was that you use "JmolAppletSigned.jar in place of "true" in jmolInitialize method.
But that is not the reason why it works now (I tested sucessfully your code with either true or molAppletSigned.jar)

The other difference was that I put the tweak (buffering the jMolScript instructions) 
in the first tag : <script src=./Jmol.js" type=...> rather than putting it in another <script> tag.
But the jMolScript buffering was working nevertheless.

3) Moreover, curiously, using your link works now fine with my "Lion Safari web Browser".

Let me recall to you that I posted a mail some days ago about this problem, i.e. 
I got the following message "You do not have Java applets enabled in your web Browser..."
when loading this jmol application within my Safari on my Lion i mac
(there is no problem using the Safari on a Snow Leopard Mac os system ...).

Thus, at present time, using

a) "FireFox/Lion Mac os" on my own (local) Jmol application/Signed works fine (no lag, no problem of "enabling java")
b) "Safari /Lion Mac os"   on my own (local) Jmol application/Signed does not work : "You do not have Java applets enabled in your web Browser..."
c) "Safari /Lion Mac os" on your (http) Jmol application/Signed does work ! no problem of "You do not have Java applets enabled in your web Browser..."

Thanks Bob, for your help on the "lag" problem.
If you have any idea concerning the other problem, thanks in advance.

Have a nice evening.
Eric





Le 7 oct. 2012 à 19:38, Robert Hanson a écrit :

Are you seeing the same problem at http://chemapps.stolaf.edu/jmol/docs/examples-12/test/jBox.html ?

(enter

=1crn

in the input box, for instance)


That's working fine for me.

Bob


On Sun, Oct 7, 2012 at 6:56 AM, eric henon <eric.henon@univ-reims.fr> wrote:
Robert,

many thanks for your answer.
It is a very nice "tweak" to buffer jMolScript instructions like that.
I did it.

Unfortunately, the "lag" problem remains when using jmolInitialize(".", true); (signed Applet mode)
whatever using the Safari or FireFox web browser.

Did you observe the same problem ?

Thanks again.
Eric


Le 6 oct. 2012 à 22:12, Robert Hanson a écrit :

Eric, there are a number of problems with that page. I don't know about the signed/unsigned business, but first let's get this part fixed:

//   calculate the three dimensions of the box
     jmolScript("Vx = (V1.x - V5.x)");
     jmolScript("Vy = (V1.y - V5.y)");
     jmolScript("Vz = (V1.z - V5.z)");
     jmolScript("a = sqrt(Vx*Vx + Vy*Vy + Vz*Vz)");

     jmolScript("Vx = (V1.x - V3.x)");
     jmolScript("Vy = (V1.y - V3.y)");
     jmolScript("Vz = (V1.z - V3.z)");
     jmolScript("b = sqrt(Vx*Vx + Vy*Vy + Vz*Vz)");

     jmolScript("Vx = (V1.x - V2.x)");
     jmolScript("Vy = (V1.y - V2.y)");
     jmolScript("Vz = (V1.z - V2.z)");
     jmolScript("c = sqrt(Vx*Vx + Vy*Vy + Vz*Vz)");


//   calculate the box volume
     jmolScript("volume = a * b * c ");
     vol=jmolEvaluate("volume%1");
     aa =jmolEvaluate("a%1");
     bb =jmolEvaluate("b%1");
     cc =jmolEvaluate("c%1");


This will not work properly and is very inefficient. First, get all those script calls into one string:

"Vx = (V1.x - V5.x);Vy = (V1.y - V5.y);Vz = (V1.z - V5.z);a = sqrt(Vx*Vx + Vy*Vy + Vz*Vz);Vx = (V1.x - V3.x)..."

With that in mind, you should probably just use:

"V1.distance(V5)"

But the more important thing is that jmolScript is asynchronous, and jmolEvaluate is not. Really what you want is this:

a = jmolEvaluate(V1.distance(V5))
b = jmolEvaluate(V1.distance(V3))
c = jmolEvaluate(V1.distance(V2))
vol = a * b * c

you can do the rounding in JavaScript.


But.... on the other hand, it will work fine with just this little tweak:

At the top of your script tag, add this to buffer the script into Jmol:

jmolScript0 = jmolScript;

script = ""
jmolScript = function(a) {
    // buffer these into jmol -- jmolScript() by itself clears the buffer
  if (a) {
      script += ";" + a;
  } else {
      jmolScript0(script);
      script = "";
  }
}

then add

jmolScript()

just before     

vol=jmolEvaluate("volume%1");

and just at the end of the drawBox() function.

You should be all set.

Really a very cool page!

Bob





On Fri, Oct 5, 2012 at 11:20 PM, eric henon <eric.henon@univ-reims.fr> wrote:
Dear all,

once more I meet one
problem using my jMol code (attached).

When using the signed applet,
the applet becomes very very slow.

For example,
rotating my box into the jMol windows
(I built a box that I can translate, rotate, scale)
takes about 3-4s for each rotation, while
it is quasi-instantaneous using the unsigned applet.

Thus, only adding the true parameter in the jmolInitialize
method substantially influences the performance
of the applet.

Is it a "standard" behavior ?

Thanks in advance.
Best regards.
Eric Henon





------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers




--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
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


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Eric Henon
Professeur
Universite de Reims Champagne-Ardenne
Institut de Chimie Moleculaire de Reims
http://www.univ-reims.fr/ICMR
CNRS UMR 6229
UFR des Sciences Exactes et Naturelles
BP 1039
51687 Reims Cedex 2 (France)                            
Tél./Fax : + 33 (0) 3 26 91 84 97
eric.henon@univ-reims.fr


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers




--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
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


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Eric Henon
Professeur
Universite de Reims Champagne-Ardenne
Institut de Chimie Moleculaire de Reims
http://www.univ-reims.fr/ICMR
CNRS UMR 6229
UFR des Sciences Exactes et Naturelles
BP 1039
51687 Reims Cedex 2 (France)                            
Tél./Fax : + 33 (0) 3 26 91 84 97
eric.henon@univ-reims.fr


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers




--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
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


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Eric Henon
Professeur
Universite de Reims Champagne-Ardenne
Institut de Chimie Moleculaire de Reims
http://www.univ-reims.fr/ICMR
CNRS UMR 6229
UFR des Sciences Exactes et Naturelles
BP 1039
51687 Reims Cedex 2 (France)                            
Tél./Fax : + 33 (0) 3 26 91 84 97
eric.henon@univ-reims.fr


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers




--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
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


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Eric Henon
Professeur
Universite de Reims Champagne-Ardenne
Institut de Chimie Moleculaire de Reims
http://www.univ-reims.fr/ICMR
CNRS UMR 6229
UFR des Sciences Exactes et Naturelles
BP 1039
51687 Reims Cedex 2 (France)                            
Tél./Fax : + 33 (0) 3 26 91 84 97
eric.henon@univ-reims.fr