Re: [Jmol-users] Console Again

2017-07-28 Thread Rolf Huehne

Am 28.07.17 um 20:14 schrieb Otis Rothenberger:

Rolf and Angel,

OK, I’m close. Rolf, I’m taking a JS shortcut with your function, but I
think it’s valid.


1) $("#jmolApplet0_console").css("top",20);
$("#jmolApplet0_console").css("left",20);
$("#jmolApplet0_console").css("position","fixed")

Obediently, snaps the console to 20, 20, but it’s not position:fixed.
Rather it click-touch/ leaps, and then drags.

Otis, I am not sure what you mean by "it click-touch/ leaps, and then 
drags".


Do you mean that the user can still move it around by dragging it?
Or does it really don't stay at it's position when you scroll down?

"fixed" in the CSS sense doesn't mean that it cannot be moved by a 
handle, which is similar to what you are doing with your Javascript 
commands. It just means that it stays at it's position if the page is 
scrolled vertically or horizontally.


Regards,
Rolf

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Console Again

2017-07-28 Thread Rolf Huehne

Am 28.07.17 um 18:35 schrieb Otis Rothenberger:

All,

I had some confused wording in my previous note!

Here’s my dilemma expressed more concisely: If the console is visible,
then the following have no affect:

$("#JmolApplet0_console").css("position","fixed”);

$("#JmolApplet0_console").css("position","fixed", "important");

This is true with or without my adding  to my page.

Also, $("#JmolApplet0_console").length equals zero, which suggests that
the div of that name does not exist.

Again, this is all with the console visible.

It does work for me in JSmol 14.18.1 (Javascript). My guess would be 
that the applet ID is not correct. Maybe a case problem "jmolApplet0"?


In the following example the 'console' function is redefined and takes 
four parameters (the last two must be provided in quotes):


1) X-position
2) Y-position
3) position mode ("fixed", "absolute")
4) applet ID

My applet ID is "jmolJSnet3D".
It works for me if the console is closed or already open.

--- Example -
function console(x,y,mode,appletID) {
  if ("" + x == "") {
x = 20;
  }
  if ("" + y == "") {
y = 20;
  }
  if (mode == "") {
mode = "absolute");
  }
  if (appletID == "") {
appletID = "jmolApplet0";
  }
  console;
  command = '$("#' + appletID + '_console").css("top",' + x + '); $("#' 
+ appletID + '_console").css("left",' + y + '); $("#' + appletID + 
'_console").css("position","' + mode + '");';

  javascript @command;
}

console(20,20,"fixed","jmolJSnet3D");
-

Regards,
Rolf

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] png files created in jsmol

2017-07-22 Thread Rolf Huehne

Am 22.07.17 um 10:04 schrieb João Palhoto Matos:

Hello!

I use jmol inside SageMath which I build from source. Currently this is
Sage 7.6 which comes with  jmol-14.6.1_2016.07.11 from which it uses
jsmol. When producing a 3d graphic one has the option of saving or
exporting files in various formats from a context menu. One of them is
PNG files, namely "export PNG image". The files produced in this manner
fail to pass testing with the pngcheck utility. Opening the file with
gimp and exporting to png format one ends up with a smaller file without
apparent image quality loss which is considered OK by pngcheck. Is this
intended behavior and the file getting some extra information, or some bug?

It is a special Jmol feature. As default, images saved in PNG format are 
actually saved in PNGJ format (see 
https://chemapps.stolaf.edu/jmol/docs/#writeimagesandframes). This means 
everything needed to get back the 3D model in the representation shown 
in the image is included.


You can easily check this by opening the image in Jmol/JSmol.

This behaviour can be switched off by the command 'set imageState off' 
and back on by 'set imageState on'.


Regards,
Rolf


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] No atom picking with modifier keys

2017-07-13 Thread Rolf Huehne

Am 10.07.17 um 19:16 schrieb Rolf Huehne:

Am 07.07.17 um 04:37 schrieb Robert Hanson:

should be working  now -- check what I just released today. I was having
trouble because I missed this in my own documentation: /In the
explanations given below, it is presumed that we have *set picking
SELECT GROUP*/


I checked 14.20.1 today but nothing has chnged.

My 'pickAction' function is shown below and only prints anything if no
modifier key is pressed while the left mouse button is pressed:

function pickAction() {
  var modifiers   = "" + _mouseModifiers;

  if (_atompicked >= 0) {
var pickedAtomIndex = _atompicked;
var pickedNode  = {atomindex=@pickedAtomIndex};

var modifierToString = {};
modifierToString["16"] = "NONE";
modifierToString["17"] = "SHIFT";
modifierToString["24"] = "ALT";
modifierToString["25"] = "ALT-SHIFT";

var modifierString = "";
if (modifierToString[modifiers] != "") {
  modifierString = modifierToString[modifiers];
}
print "index=" + pickedAtomIndex + "  modifiers=" +
modifierToString[modifiers] + " (" + modifiers + ")";
  } else {
print "modifiers=" + modifierToString[modifiers] + " (" + modifiers
+ ")";
  }
}

I have checked version 14.20.2. Now the pickCallback function is called 
also when a modifier key is pressed, but the read-only variable 
'_mouseModifiers' always contains the value '16' (no modifier).


Also after the commands
"set picking ATOM; set PickingStyle SELECT extendedSelect"
the modifier keys don't work any more as described in the documentation. 
Clicking at an atom now always selects ony the clicked atom.
And after registering additionally a pickCallback function, it is always 
called twice after a single click.


Regards,
Rolf

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] No atom picking with modifier keys

2017-07-10 Thread Rolf Huehne

Am 07.07.17 um 04:37 schrieb Robert Hanson:

should be working  now -- check what I just released today. I was having
trouble because I missed this in my own documentation: /In the
explanations given below, it is presumed that we have *set picking
SELECT GROUP*/


I checked 14.20.1 today but nothing has chnged.

My 'pickAction' function is shown below and only prints anything if no 
modifier key is pressed while the left mouse button is pressed:


function pickAction() {
  var modifiers   = "" + _mouseModifiers;

  if (_atompicked >= 0) {
var pickedAtomIndex = _atompicked;
var pickedNode  = {atomindex=@pickedAtomIndex};

var modifierToString = {};
modifierToString["16"] = "NONE";
modifierToString["17"] = "SHIFT";
modifierToString["24"] = "ALT";
modifierToString["25"] = "ALT-SHIFT";

var modifierString = "";
if (modifierToString[modifiers] != "") {
  modifierString = modifierToString[modifiers];
}
print "index=" + pickedAtomIndex + "  modifiers=" + 
modifierToString[modifiers] + " (" + modifiers + ")";

  } else {
print "modifiers=" + modifierToString[modifiers] + " (" + modifiers 
+ ")";

  }
}

Regards,
Rolf

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] No atom picking with modifier keys

2017-07-06 Thread Rolf Huehne

Am 06.07.17 um 16:26 schrieb Robert Hanson:

I'm not getting any of that to work. Are you?

Yes, all five combinations work for me both in Jmol 14.18.1 Java and 
Javascript on MacOS 10.11.6 (El Capitan) in Safari 9.1.2 and Waterfox 
53.0.3.


Regards,
Rolf


On Wed, Jul 5, 2017 at 11:08 PM, Rolf Huehne <rolf.hue...@leibniz-fli.de
<mailto:rolf.hue...@leibniz-fli.de>> wrote:

Am 06.07.17 um 05:06 schrieb Robert Hanson:

Rolf, what is the expected action of

set pickingStyle select extendedSelect

?

It is described in the scripting documentation:

left-click  selects just that group, like rasmol;
shift-left-clicktoggles the group selected/not selected;
alt-left-click  appends the group to the current selection;
alt-shift-left-clickremoves the group from the current
selection;
left-click off modelexecutes (select none);


Regards,
Rolf


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
<mailto:Jmol-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/jmol-users
<https://lists.sourceforge.net/lists/listinfo/jmol-users>




--
Robert M. Hanson
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



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot



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




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] No atom picking with modifier keys

2017-07-05 Thread Rolf Huehne

Am 06.07.17 um 05:06 schrieb Robert Hanson:

Rolf, what is the expected action of

set pickingStyle select extendedSelect

?

It is described in the scripting documentation:

left-click  selects just that group, like rasmol;
shift-left-clicktoggles the group selected/not selected;
alt-left-click  appends the group to the current selection;
alt-shift-left-clickremoves the group from the current selection;
left-click off modelexecutes (select none);

Regards,
Rolf

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] No atom picking with modifier keys

2017-07-04 Thread Rolf Huehne

Hi Bob,

I would like to implement my own atom pick mode, providing flexibility 
by using modifier keys like (SHIFT, ALT).


In the standard mode, after the commands
"set picking ATOM; set PickingStyle SELECT extendedSelect",
atoms can be picked with one or more modifier keys pressed.

But after the command "set picking on" and setting a callback with the 
command

'set pickCallback "jmolscript: pickAction()'
the callback function 'pickAction' is only called in Jmol 14.18.1 if no 
modifier key is pressed.


Q: Is this a bug or unfortunately the intended behaviour?

Regards,
Rolf

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Java will go from Safari as well as already gone from Opera, FF and Chrome

2017-06-09 Thread Rolf Huehne

Am 09.06.17 um 15:21 schrieb Robert Hanson:

Yes. By "felt" you mean that the browser will manage its threads
relating to tabs and other dyanamic content (e.g. ads), and it may shift
a running JavaScript app to a lower priority more likely than a running
Java application would or, in particular, then a running Java applet would.

When I tested this outside of Jmol with some Javascript it even seemed 
to me that a script run repeatedly was slowed down by the browser 
deliberately, although nothing else did change what would require to 
change the priority.


Regards,
Rolf

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Java will go from Safari as well as already gone from Opera, FF and Chrome

2017-06-09 Thread Rolf Huehne

Am 09.06.17 um 15:21 schrieb Robert Hanson:

I think we're one level off here. You can always run Jmol.jar if you
want Jmol's desktop application, and nothing is going to change about
that. It isn't an applet, so there is no browser issue.

I don't think that Jmol's current desktop application can replace the 
applet. Besides the rich functionality and powerful scripting language 
of Jmol in general, the strength of the applet is the flexibility to 
build any interface for Jmol you want.


Take for example the Jena3D Viewer (http://jena3d.leibniz-fli.de). 
Almost nothing of it's special functionalities could be transferred to 
the current desktop application.



My quick read of the JavaFX tutorial
[docs.oracle.com/javafx/2/overview/jfxpub-overview.htm
] suggests
that it is simply a newer way to build an independent Java desktop
application like Jmol.jar, but it has a wider set of user interface
capability than what we use now (Swing). Thus, they talk about being
able to insert a full-fledged webkit browser into the application, to
use CSS for styling, to dynamically create a user interface -- that sort
of thing.

And although the general Javascript performance is catching up with
Java, my observation is that it the performance is less stable. This
means that a task for example took anything from 60 seconds to 120
seconds (or even more) in the Javascript version, depending on how
the browser 'felt'. In contrast the Java version stably needed about
ten seconds, run on the same system before and after the Javascript
version.

Yes. By "felt" you mean that the browser will manage its threads
relating to tabs and other dyanamic content (e.g. ads), and it may shift
a running JavaScript app to a lower priority more likely than a running
Java application would or, in particular, then a running Java applet would.

A 1:12 performance ratio seems on the outside of what I have observed,
but I am sure that can happen. We are seeing 1:3 to 1:6 commonly.

I'm pretty sure the real benefit would be to use the WebGL option in
JSmol, or at least to develop that further. For example, by merging
NGL's excellent 3D capabilities into JSmol.

Rolf, do you have a sense of whether these slow-downs are rendering
issues? Or do they happen in relation to file opening, model
construction, or surface construction?

Rendering speed differences are rather difficult to quantify. If I 
rotate or zoom into a large structure with many translucent bonds, it is 
rather a qualitative shift: from almost unusable to totally unusable for 
most interactive work.


My quantitative observations are related to running times of Jmol 
scripts. In the Javascript version they run up to about 50 times slower 
than in the Java version. My general impression (a few month ago) was 
that built-in functions were running about 5 times slower than in Java, 
while user-defined functions were running up to 50 times slower.


Regards,
Rolf


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Java will go from Safari as well as already gone from Opera, FF and Chrome

2017-06-09 Thread Rolf Huehne

Am 08.06.17 um 19:44 schrieb Robert Hanson:



On Thu, Jun 8, 2017 at 10:58 AM, Rolf Huehne <rolf.hue...@leibniz-fli.de
<mailto:rolf.hue...@leibniz-fli.de>> wrote:

Am 08.06.17 um 14:41 schrieb Robert Hanson:

RIP,  Java applets.

Since there still are many situations where the superior Java
performance would be helpful (large structures; surfaces; complex
Jmol scripts that are running about 50 times slower in the
Javascript version) it would still be good to have a Java version
with the flexibility of the applet to build customized user interfaces.

sorry, didn't mean to imply that we were dropping applet production.
It's all produced in a few clicks of a button -- Jmol app, Jmol applet,
JmolData, JSmol. So I will keep that happening the same.

I havn't misunderstood that. But an applet can only be of public use if 
there are systems available supporting it.



I am wondering how much effort it would be to extend the applet by a
HTML/CSS rendering and Javascript engine like it is provided by
systems like 'JavaFX - WebView Component
(https://docs.oracle.com/javase/8/javafx/api/toc.htm
<https://docs.oracle.com/javase/8/javafx/api/toc.htm>

https://stackoverflow.com/questions/2438201/pure-java-html-viewer-renderer-for-use-in-a-scrollable-pane

<https://stackoverflow.com/questions/2438201/pure-java-html-viewer-renderer-for-use-in-a-scrollable-pane>),
Oracle Nashorn
(http://www.oracle.com/technetwork/articles/java/jf14-nashorn-2126515.html

<http://www.oracle.com/technetwork/articles/java/jf14-nashorn-2126515.html>),
and HtmlUnit (http://htmlunit.sourceforge.net/
<http://htmlunit.sourceforge.net/>).

I woud guess one of the critical points would be how much of the
Javascript/Applet communication would still be possible in such
application.


I don't know anything about JavaFX, but it's not clear to me there has
been any development on it since 2012 or 2014. Maybe just an idea that
never took off? Do you see some advantage to this?

Since I don't have done any Java programming I will know even less. When 
I spoke to a computer scientist about the problem of dropped NPAPI 
plugin support by an increasing number of browsers, he suggested to 
become independent of any browser by combining the applet with already 
existing Java HTML5/CSS/Javascript engines. I have chosen the example 
engines just to illustrate the idea, not because I know anything 
particular about their suitability.


It seems that Oracle still recommends JavaFX for Desktop applications.
At last that is what the following post about the future of JavaFX from 
2016 (unfortunately in German) suggests: 
https://jaxenter.de/hart-aber-fair-welche-zukunft-hat-javafx-37199 . 
Among other things it describes the reaction of Oracle to a request of 
an interest group of german Java users (iJUG) about the future of 
JavaFX. According to this Oracle recommends it and has an official 
roadmap for it until 2028.


The advantage I see with the general idea is that each Jmol-based web 
service, running in the future with the Javascript version, could also 
be run as a Java desktop application.


And although the general Javascript performance is catching up with 
Java, my observation is that it the performance is less stable. This 
means that a task for example took anything from 60 seconds to 120 
seconds (or even more) in the Javascript version, depending on how the 
browser 'felt'. In contrast the Java version stably needed about ten 
seconds, run on the same system before and after the Javascript version.


Regards,
Rolf

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Java will go from Safari as well as already gone from Opera, FF and Chrome

2017-06-08 Thread Rolf Huehne

Am 08.06.17 um 14:41 schrieb Robert Hanson:

RIP,  Java applets.

Since there still are many situations where the superior Java 
performance would be helpful (large structures; surfaces; complex Jmol 
scripts that are running about 50 times slower in the Javascript 
version) it would still be good to have a Java version with the 
flexibility of the applet to build customized user interfaces.


I am wondering how much effort it would be to extend the applet by a 
HTML/CSS rendering and Javascript engine like it is provided by systems 
like 'JavaFX - WebView Component 
(https://docs.oracle.com/javase/8/javafx/api/toc.htm 
https://stackoverflow.com/questions/2438201/pure-java-html-viewer-renderer-for-use-in-a-scrollable-pane), 
Oracle Nashorn 
(http://www.oracle.com/technetwork/articles/java/jf14-nashorn-2126515.html), 
and HtmlUnit (http://htmlunit.sourceforge.net/).


I woud guess one of the critical points would be how much of the 
Javascript/Applet communication would still be possible in such application.


Regards,
Rolf

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol 14.9.1 - Tiny echo text and hover messages

2017-03-30 Thread Rolf Huehne
Am 17.03.17 um 17:57 schrieb Rolf Huehne:
> Am 17.03.17 um 13:14 schrieb Robert Hanson:
>> Rolf, I cannot reproduce this font problem. I see exactly the same font
>> in 14.4, 14.6, 14.9.1, and 14.10.0.beta. I do see that echos are shifted
>> slightly to the left. So perhaps you can send me more specific commands
>> in order to see the  problem.
>>
> Bob, I also couldn't reproduce the font problem in a simple test
> condition. I am still trying to figure out the conditions when it occurs.
>
Thank you, Bob. In version 14.10.0 the echo text is larger again for me.

Regards,
Rolf

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol Keyboard Interaction

2017-03-29 Thread Rolf Huehne
Am 29.03.17 um 18:21 schrieb Robert Hanson:
> David,
>
> OK, so the beauty of this system is that you can implement any sort of
> additional functionality you want using readily available methods that
> have nothing to do with Jmol or JSmol. It's one of the bonuses of
> working in JavaScript and jQuery.
>
> So, for example, if you want to implement a key listener that
> implements  + and - to actuate zooming, you can do it this way:
>
> c = $("#jmolApplet0_canvas2d")
> c.attr("tabindex", 1)
> c.mouseover(function(){c.focus()})
> c.keypress(function(e){
>   if (e.key == "+")Jmol.script(jmolApplet0, "zoom *1.2")
>   else  if (e.key == "-")Jmol.script(jmolApplet0, "zoom /1.2")
> })
>
> Notice that to accept key events, we must (a) provide a tabindex to the
> canvas and (b) make sure the canvas has focus when we are looking for
> key events.
>
> I would only say that hidden specialized features like this, though
> potentially useful, are not necessarily recommended.
> ​
It looks like the example would only work for the Javascript version. Or 
could it also work for the Java version (with some adjustment)?

Regards,
Rolf

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol Keyboard Interaction

2017-03-29 Thread Rolf Huehne
Am 29.03.17 um 17:37 schrieb Angel Herráez:
> Have you checked Jmol's "navigation mode" ?
> As far as I remember, it  used the keyboard.
> But maybe it is only applicable to the Jmol application.
>
> http://chemapps.stolaf.edu/jmol/docs/#navigate
> http://chemapps.stolaf.edu/jmol/docs/#setnavigation
>
I don't find the navigation mode very suitable as a standard method for 
exploring a structure. In some cases it might be useful but my own 
experiences were rather unsatisfying.

Regards,
Rolf


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol Keyboard Interaction

2017-03-29 Thread Rolf Huehne
Am 28.03.17 um 22:26 schrieb David Hibbitts:
> So the "allowkeystrokes" feature simply lets you send commands to the
> console?
>
> No, that's not useful for me -- I'm sure someone has tried to implement
> navigation-by-keyboard on their jmol-including website before.
>
It would be great if this would be possible. Especially because mouse 
control of Jmol-Java on MacOS became problematic in browsers.

For example could '+/-' for zoom in/out be very handy. The zoom "slider" 
near the right applet border is quite inconvenient. And the only mouse 
binding that does work is on the left mouse button without any 
modifiers. So keyboard commands for translation and Z-rotation could 
also be very helpful.

Regards,
Rolf

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol 14.9.1 - Tiny echo text and hover messages

2017-03-17 Thread Rolf Huehne
Am 17.03.17 um 13:14 schrieb Robert Hanson:
> Rolf, I cannot reproduce this font problem. I see exactly the same font
> in 14.4, 14.6, 14.9.1, and 14.10.0.beta. I do see that echos are shifted
> slightly to the left. So perhaps you can send me more specific commands
> in order to see the  problem.
>
Bob, I also couldn't reproduce the font problem in a simple test 
condition. I am still trying to figure out the conditions when it occurs.

While doing this I noticed another problem in version 14.9.1:

In the Jena3D-Viewer with Jmol-Javascript 
(http://jenalib.leibniz-fli.de/cgi-bin/3d_mapping.pl?CODE=1deh=14.9.1)
 
the cartoon reperesentation looks like intended with ribbonborder and 
alpha-helices shown as helices.
But with Jmol-Java 
(http://jenalib.leibniz-fli.de/cgi-bin/3d_mapping.pl?CODE=1deh=14.9.1&_USE=JAVA)
 
the ribbonborder is missing and the alpha-helices are drawn as "rockets 
without heads".

Regards,
Rolf

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] the announced death of Java - one more push

2017-03-17 Thread Rolf Huehne
Am 17.03.17 um 10:40 schrieb Angel Herráez:
> Dear Jmol users,
>
> You should be aware that *Firefox * has joined the trend to abandon Java
> applets and the latest release can no longer run Jmol in pages. Of
> course, JSmol-html5 is perfectly functional.  Google *Chrome *and
> Microsoft *Edge *are another 2 major browser that cannot run Jmol-Java.
>
> Firefox 52 (released this week) does not support the NPAPI format of
> plug-íns and hence cannot run Java applets, Shockwave Player animations
> (DCR files, Macromedia Director), external PDF viewers inside the
> browser, etc. Running Flash Player animations/videos has been kept as an
> exception.
>
There is a fork of 'Firefox' called 'Waterfox' 
(https://www.waterfoxproject.org/) that stays almost identical to 
'Firefox' but addresses restrictions like these. So at least until the 
NPAPI support code is removed completely Jmol-Java should still run with 
it. And it also enables the 64-bit Java-Plugin on Windows, providing 
more RAM for Jmol if needed.

I havn't tested 'Waterfox 52' yet but the release notes say that the 
restriction of NPAPI support to FLASH were removed.

Regards,
Rolf

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] Jmol 14.9.1 - Tiny echo text and hover messages

2017-03-15 Thread Rolf Huehne
Hi Bob,

in Jmol version 14.9.1 echo text seems to be much smaller than in 
version 14.6.4 or earlier versions.

The command 'font echo 15 sansSerif bold' produces now very tiny text 
for me compared to version 14.6.4. To get a similarly sized text it is 
necessary for me to set the size to approximately '35' instead of '15' 
('font echo 35 sansSerif bold').

And when I hover an atom a flood of messages like this appears in the 
Java console:

script manager starting 0 
Thread[QueueThread0,1,file:jmol-14.9.1/jsmol/java/-threadGroup]
script manager starting 1 
Thread[QueueThread1,1,file:jmol-14.9.1/jsmol/java/-threadGroup]


Kind regards,
Rolf

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] C-P bond not drawn

2017-01-30 Thread Rolf Huehne
Am 30.01.17 um 22:58 schrieb Jörg Saßmannshausen:
> Dear all,
>
> I seem to have a display problem when I am trying to open cartesian (xyz)
> files: quite often the P-C bond is not drawn which means the molecule looks
> wrong.
> If I am using Molden to view the structure it is perfectly ok. Exporting the
> structure from Molden as a xyz file and opening that file in jmol causes this
> problem. However, if I am exporting it as a mol or mol2 file the same 
> structure
> is ok apart from an odd looking pyridine ring (two double bonds or three).
> I usually save the coordinates as a cartesian file as most journals would like
> to have the coordinates of the final geometry as cartesians.
>
> I am aware of the connect command so that would be a way out of it but I would
> have thought that the standart P-C bonds will be drawn automatically
>
> Is there something I do wrong or why does jmol has this problem?
> I am using Jmol-14.8.0 and one of the latests Oracle java on Debian Wheezy.
>
> Any suggestion?
>
I have no experience with 'xyz' files, but maybe the 'autobond' 
parameter is switched off and it could help to switch it on first:

set autobond on;
load example.xyz;

Regards,
Rolf


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] callback for minimize

2017-01-30 Thread Rolf Huehne
Am 30.01.17 um 22:24 schrieb Angel Herráez:
> Dear Jmolers
>
> I'm trying to set an echo that will display after a minimization has finished.
> I prefer not to apply single thread "using set useMinimizationThread false",
> so I thought I could us the callback,
> but I am unable to make it work
>
> Does anyone have a working example?
>
> This is what I've tried, in the Jmol 14.6.4 application's console:
>
> set echo top;
> function mini(a,b,c,d,e,f) { if (b=='done') { echo "finished"; } }
> set minimizationCallback "jmolscript:mini";
> minimize steps 30;
>
> The minimization runs but there is no reporting.
>
> Or "print" instead of "echo" -- no diference
>
Angel, my experience with the 'hoverCallback' in combination with a 
Jmolscript function is that it doesn't get any parameters assigned 
during each callback like it is described for a Javascript function. 
Instead your own values are assigned (e.g.: 'jmolscript: 
hoverAction("start")').
As a workaround I use the '_atomhovered' variable to determine the 
hovered atom.

It seems to be similar for the 'minimizationCallback'. Unfortunatley 
there doesn't seem to be a similar system variable that could be used 
here as a workaround. You might be able to use your own global variable 
to count the minimization steps and use the counter to determine the 
minimization end.

Regards,
Rolf

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Color maps for bonds

2017-01-19 Thread Rolf Huehne
Am 19.01.17 um 05:26 schrieb Max Pinheiro Jr:
> Hi Bob,
>
> The problem that still persist is how to use the values bond lengths to
> assign the colors for each bond. I included a new variable to get the
> bond length inside the for loop: y=x.bonds.length. However, I think the
> variable colors[ ] just accept integer values, right? So, one
> possibility that I check is to convert the bond length into an integer
> using "% 0". But in most of the cases it is necessary to rescale the
> bond length to get more decimal places before to convert into an
> integer. When I tried to run the script with the values of bond length
> times 100 and rounded, this variable used as argument to the colors fall
> out of the range. Do you have any other idea of how to use the bond
> length  as an argument for the colors()?
Max, you could use the following formula to normalize a bond length 
value to the color index range before you convert the bond length value 
to an integer value, e.g.:

minColorIndex=1;
maxColorIndex=32;
minBondlength=0.1;
maxBondLength=1.5;

normalizedBondLength = (bondLength - minBondLength) * maxColorIndex / 
(maxBondLength - minBondLength) + minColorIndex;

If you would like to get directly comparable results between different 
atom sets you should use the same 'minBondLength' and 'maxBondLength' 
values for each atom set and the same 'minColorIndex' and 
'maxColorIndex' value. If you would like to get the maximum color range 
for each atom set instead (loosing comparability) you should determine 
the actual minimum and maximum bond length individually for each atom set.

Regards,
Rolf

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Running Jmol in Linux command line

2016-12-19 Thread Rolf Huehne
Am 19.12.16 um 18:13 schrieb Rolf Huehne:
> Am 19.12.16 um 16:37 schrieb Huan Wang:
>> Dear Jmol developers and users,
>>
>> I am a newbie to Jmol and I have a question on running Jmol in Linux
>> command line.
>>
>> Previously, when I prepared Ramachandran plot, I used Jmol interface to
>> open PDB file and typed command in Jmol console as:
>> /write ramachandran "OUTPUT_FILE_NAME"/
>>
>> That was very low efficient especially when dealing with large amount of
>> PDB files. If Jmol could run in command line in Linux system with Bash
>> Shell script, that would be perfect.
>>
>> Actually, I found a very brief introduction in Jmol Wiki website, where
>> listed some commands for loading PDB file and running script in command
>> line. However, I did not see any command for saving data.
>> http://wiki.jmol.org/index.php/Jmol_Application
>> <http://wiki.jmol.org/index.php/Jmol_Application>
>>
>> I tried to use
>> Jmol -n PDB_FILE -J ramachandran "OUT_PUT_FILE_NAME" -x
>> Howeve, it does not save data.
>>
>> I also tried
>> Jmol -n PDB_FILE -J ramachandran -w "OUT_PUT_FILE_NAME" -x
>> It saved the image file, not data.
>>
>> other trials were:
>> Jmol -n PDB_FILE -J ramachandran > "OUT_PUT_FILE_NAME" -x
>> Jmol -n PDB_FILE -J write -j ramachandran "OUT_PUT_FILE_NAME" -x
>>
>> However, none of them worked as I expected...
>>
>> It would be greatly appreciated if anyone could help me.
>>
> Huan, with the '-J' and '-j' command-line options you must provide the
> same script commands like interactively. Since command-line arguments in
> Linux are separated by white-space you have to enclose the script
> commands in quotes. Like Matt I would also recommend to use
> 'JmolData.jar' for batch processing of multiple PDB files:
>
> java -jar JmolData.jar -j "write ramachandran 'ramachandran_data.txt'"
>
Sorry, I forgot the PDB filename which would be placed at the end of the 
command-line:

java -jar JmolData.jar -j "write ramachandran 'ramachandran_data.txt'" 
PDB_FILE

Regards,
Rolf


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Running Jmol in Linux command line

2016-12-19 Thread Rolf Huehne
Am 19.12.16 um 16:37 schrieb Huan Wang:
> Dear Jmol developers and users,
>
> I am a newbie to Jmol and I have a question on running Jmol in Linux
> command line.
>
> Previously, when I prepared Ramachandran plot, I used Jmol interface to
> open PDB file and typed command in Jmol console as:
> /write ramachandran "OUTPUT_FILE_NAME"/
>
> That was very low efficient especially when dealing with large amount of
> PDB files. If Jmol could run in command line in Linux system with Bash
> Shell script, that would be perfect.
>
> Actually, I found a very brief introduction in Jmol Wiki website, where
> listed some commands for loading PDB file and running script in command
> line. However, I did not see any command for saving data.
> http://wiki.jmol.org/index.php/Jmol_Application
> 
>
> I tried to use
> Jmol -n PDB_FILE -J ramachandran "OUT_PUT_FILE_NAME" -x
> Howeve, it does not save data.
>
> I also tried
> Jmol -n PDB_FILE -J ramachandran -w "OUT_PUT_FILE_NAME" -x
> It saved the image file, not data.
>
> other trials were:
> Jmol -n PDB_FILE -J ramachandran > "OUT_PUT_FILE_NAME" -x
> Jmol -n PDB_FILE -J write -j ramachandran "OUT_PUT_FILE_NAME" -x
>
> However, none of them worked as I expected...
>
> It would be greatly appreciated if anyone could help me.
>
Huan, with the '-J' and '-j' command-line options you must provide the 
same script commands like interactively. Since command-line arguments in 
Linux are separated by white-space you have to enclose the script 
commands in quotes. Like Matt I would also recommend to use 
'JmolData.jar' for batch processing of multiple PDB files:

java -jar JmolData.jar -j "write ramachandran 'ramachandran_data.txt'"

With single quotes as outer quotes the second double quote seems to get 
lost in Jmol 14.6.4 and you must add another double quote:

java -jar JmolData.jar -j 'write ramachandran "ramachandran_data.txt""'

The script commands after '-J' are processed before loading the file, 
while the script commands after '-j' are processed at the end (also 
after a script file called with '-s').

Regards,
Rolf



--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] Setting dots size ignores selection

2016-10-26 Thread Rolf Huehne
Hi all,

it seems that the command 'dots 50%' ignores the current selection 
unexpectedly in Jmol 14.6.4_2016.10.21 (only tested in the latest version).

You can test it at "https://chemapps.stolaf.edu/jmol/jsmol/jsmol.htm; by 
entering the following example commands into the console:

 Example commands 
# Step 1
select all;
dots on;

# Step 2
select oxygen;
dots 50%;
--

After step 2 the size of the dotted spheres of all atoms is reduced, not 
just of the oxygens, as it is the case for 'spacefill 50%'.

Is this the intended behaviour for 'dots' or is it a bug?

Regards,
Rolf

--
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] State reload problem with MMCIF loaded from variable

2016-10-14 Thread Rolf Huehne
Hi Bob,

in Jmol 14.6.4_2016_10_09 (and at least down to version 14.6.2) it 
doesn't work any more to load the state (from SPT and PNGJ file) if the 
model was loaded as MMCIF data from a variable.

But loading MMCIF data from a variable (mmcifdata) still works like this:

   load APPEND "@mmcifdata" FILTER "addBonds";

In the state the command looks like this instead:

   load APPEND @mmcifdata /*options*/  FILTER "addBonds";

Appearantly the missing quotes around the variable name lead the parser 
to take the MMCIF data as a filename resulting in the following 
(cropped) error message:

script ERROR: java.io.FileNotFoundException: ... (file name too long)...

If I add the quotes into the state file it loads correctly.

Regards,
Rolf

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Degradation of complex variables

2016-09-29 Thread Rolf Huehne
Hi all,

forget about it. I have found the problem. Sometimes it already helps to 
explain a problem to someone else to get a different look at it.

The function call querying the array was actually a nested call of 
multiple functions and in one of the functions the parameter was 
accidetally set to a an empty string because the function initially 
wasn't prepared for working with an array as parameter.

Regards,
Rolf

Am 29.09.16 um 12:25 schrieb Rolf Huehne:
> Hi all,
>
> I am observing a strange degradation problem with a complex global
> variable, consisting of nested hashes and arrays (Jmol 14.6.3_2016.09.18):
>
> Immediately after I have added another hash level containing an array
> everything is fine. When I provide the new array as parameter to a
> function it is there. But when I do the same function call again the
> array has become an empty string.
> This is fully reproducible.
>
> I tried to build a simple test system that mimics the levels and how the
> new hash and array are added and queried by another function to
> demonstrate the problem, but wasn't succesful (no degradation).
> The real dataset is quite large. Exported with 'write var' it takes 59
> megabytes of disk space. A compressed version is temporarily available
> at
> http://jenalib.leibniz-fli.de/ImgLibPDB/tmp/network_data_with_genes_of_interest-2016_09_29.txt.gz
> The hash key for the subhash is 'genesOfInterest' and the key for the
> array is 'nodeIds'.
>
> But the system below at least demonstrates the number of hash levels and
> how the new hash and array are added:
>
>  Example system --
> testData = [level2: [level3: {}]]
>
> function fillTest(dataRef, count) {
>var level3   = {};
>var testHash = {};
>for (var i from [1 count]) {
>  testHash[i] = [atomId: i];
>}
>
>level3 = dataRef..level2..level3;
>level3..level4 = {};
>level3..level4..level5 = testHash.array("id").select("(atomId)");
> }
>
> function readTest(testPar) {
>print "type=" + testPar.type;
>print "size=" + testPar.size;
> }
>
> print " 1 =\n" + testData;
> fillTest(testData,5);
> print " 2 =\n" + testData;
> readTest(testData..level2..level3..level4..level5);
>
>  Example output --
>  1 =
> {
>"level2"  :
>{
>  "level3"  :
>  {
>   }
> }
>   }
>  2 =
> {
>"level2"  :
>{
>  "level3"  :
>  {
>"level4"  :
>{
>  "level5"  :
>  [
>1
>2
>3
>4
>5
>  ]
> }
>   }
> }
>   }
> type=array
> size=5
> --
>
> Bob, do you have any idea how this can happen?
>
> Maybe I have made a wrong assumption regarding variables in Jmol:
>
> If a hash is provided as a parameter to a function it is used there by
> reference and it is not created a copy used within the function.
>
> The example above at least shouldn't work without the assumption being true.
>
> The use of the 'level3' variable in the 'fillTest' function is common
> within my system. It is created as a local hash variable to make sure it
> is a hash. And if it is already provided in the parameter hash it is
> replaced by the existing subhash (by reference through '='). If not the
> new hash is inserted at the end of the function into the parameter hash.
> I never observed any problems with this strategy before. The newly added
> data always stayed within the global variable provided as parameter to
> the function.
>
> Regards,
> Rolf
>
>
> --
> ___
> 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


[Jmol-users] Degradation of complex variables

2016-09-29 Thread Rolf Huehne
Hi all,

I am observing a strange degradation problem with a complex global 
variable, consisting of nested hashes and arrays (Jmol 14.6.3_2016.09.18):

Immediately after I have added another hash level containing an array 
everything is fine. When I provide the new array as parameter to a 
function it is there. But when I do the same function call again the 
array has become an empty string.
This is fully reproducible.

I tried to build a simple test system that mimics the levels and how the 
new hash and array are added and queried by another function to 
demonstrate the problem, but wasn't succesful (no degradation).
The real dataset is quite large. Exported with 'write var' it takes 59 
megabytes of disk space. A compressed version is temporarily available 
at 
http://jenalib.leibniz-fli.de/ImgLibPDB/tmp/network_data_with_genes_of_interest-2016_09_29.txt.gz
The hash key for the subhash is 'genesOfInterest' and the key for the 
array is 'nodeIds'.

But the system below at least demonstrates the number of hash levels and 
how the new hash and array are added:

 Example system --
testData = [level2: [level3: {}]]

function fillTest(dataRef, count) {
   var level3   = {};
   var testHash = {};
   for (var i from [1 count]) {
 testHash[i] = [atomId: i];
   }

   level3 = dataRef..level2..level3;
   level3..level4 = {};
   level3..level4..level5 = testHash.array("id").select("(atomId)");
}

function readTest(testPar) {
   print "type=" + testPar.type;
   print "size=" + testPar.size;
}

print " 1 =\n" + testData;
fillTest(testData,5);
print " 2 =\n" + testData;
readTest(testData..level2..level3..level4..level5);

 Example output --
 1 =
{
   "level2"  :
   {
 "level3"  :
 {
  }
}
  }
 2 =
{
   "level2"  :
   {
 "level3"  :
 {
   "level4"  :
   {
 "level5"  :
 [
   1
   2
   3
   4
   5
 ]
}
  }
}
  }
type=array
size=5
--

Bob, do you have any idea how this can happen?

Maybe I have made a wrong assumption regarding variables in Jmol:

If a hash is provided as a parameter to a function it is used there by 
reference and it is not created a copy used within the function.

The example above at least shouldn't work without the assumption being true.

The use of the 'level3' variable in the 'fillTest' function is common 
within my system. It is created as a local hash variable to make sure it 
is a hash. And if it is already provided in the parameter hash it is 
replaced by the existing subhash (by reference through '='). If not the 
new hash is inserted at the end of the function into the parameter hash.
I never observed any problems with this strategy before. The newly added 
data always stayed within the global variable provided as parameter to 
the function.

Regards,
Rolf


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


Re: [Jmol-users] Java Applet Mouse problems in Firefox on MacOS 10.11.6

2016-09-23 Thread Rolf Huehne
Am 23.09.16 um 17:23 schrieb Robert Hanson:
> Hmm. Please investigate what changes were made in Safari or MacOS. I'm
> guessing this is a well-known issue of some sort. Nothing new in Jmol in
> that regard. FYI, we have been told at St. Olaf NOT to upgrade our MacOS
> because there are all sorts of issues that our IT department has found
> that break important aspects of our system here.
>
I have delayed the upgrade as long as possible but at some point I had 
to switch to get rid of some problems even at the risk to get new problems.

Unfortunately I can't tell if it is just Firefox 49.0 on MacOS or El 
Capitan or a combination of both or with Java 1.8.0.

Maybe someone with Mavericks and Firefox 49.0 or 48.0 can check if model 
translation with the mouse still works there.

Regards,
Rolf

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


[Jmol-users] Java Applet Mouse problems in Firefox on MacOS 10.11.6

2016-09-23 Thread Rolf Huehne
Hi all,

I recently upgraded the operating system of my MacBook from 'Mavericks' 
to 'El Capitan' (10.11.6). This included also to upgrade Oracle Java to 
1.8.0_102 and Firefox to 49.0.

In Firefox it is now impossible on my system to translate the model in 
Jmol (14.6.3_2016.09.18, also earlier versions) with the mouse by any of 
the mouse gestures described in the mouse manual 
(http://wiki.jmol.org/index.php/MouseManual):
   a) Shift + double-click and drag the main button
   b) double-click and drag the middle button
   c) Ctrl + drag the secondary button

It also doesn't work any more to bind 'translate' directly to dragging 
of the middle button.

In Safari 9.1.2 all three mouse gestures still work. And in JSmol 
(Javascript) they also work in Firefox.

In the Jmol application the mouse gestures also work.

In addition, the mouse wheel doesn't work for zooming in Jmol both in 
Firefox and Safari. Instead the window is scrolled down. It also doesn't 
help to click first into the applet window before using the mouse wheel. 
But this already happened with Mavericks.

Kind regards,
Rolf

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


[Jmol-users] show vdw User in Jmol 14.6.2

2016-09-01 Thread Rolf Huehne
Hi all,

the command 'show vdw User' doesn't work any more in Jmol 
14.6.2_2016_08_28 (I tried also 'show vanderWaals User'):

--- Error Message --
script ERROR: bad argument count

   show vanderWaals "user"


It used to work at least until version 14.4.4_2016_03_13:

 Command output, truncated --
User
1   4.0 H
2   4.0 He
3   4.0 Li
4   4.0 Be
5   4.0 B
-

Although I couldn't find the command in the documentation I found at 
least a thread in the jmol-users archive describing the introduction in 
version 11.5.12:
   https://sourceforge.net/p/jmol/mailman/message/18730186/

Regards,
Rolf

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


Re: [Jmol-users] Wildcard for atom properties

2016-06-22 Thread Rolf Huehne
On 06/22/2016 09:02 PM, Kubasik, Matthew A. wrote:
> Rolf,
>
> Sorry, I switched conventions, which is confusing everything.
>
> So, yes, "print {atomno=3}.a?"  works to print atom properties with names 
> beginning with "a", but I thought "print {atomno=3}.?" would give ALL atom 
> properties.
>
> Same as, "print @3.a?"  works, but I thought "print @3.?" would print all 
> atom properties.
>
> Am I wrong about this?  Perhaps I am.
>
It seems like the shortcut notations for getting all properties at once 
are broken (or the documentation is wrong). But the longer versions 
still work for me:

   print getProperty("atomInfo",{atomno=3});
   print getProperty("atomInfo",{@3});

Regards,
Rolf

> Matt
>
> 
> From: Rolf Huehne [rolf.hue...@leibniz-fli.de]
> Sent: Wednesday, June 22, 2016 2:53 PM
> To: jmol-users@lists.sourceforge.net
> Subject: Re: [Jmol-users] Wildcard for atom properties
>
> On 06/22/2016 08:25 PM, Kubasik, Matthew A. wrote:
>> Bob and List,
>>
>> Using the stand alone app on a Mac (10.11.5), I cannot seem to get the 
>> wildcard for atom properties to work as I would expect from
>>
>> http://chemapps.stolaf.edu/jmol/docs/index.htm?ver=14.6.0_2016.06.14#atomproperties.
>>
>> The doc says print {atomno=3}.a?  will give the atom properties that begin 
>> with "a".  This works.
>>
>> The doc also says print @3.?  will give all atom properties.  But print @3.? 
>> gives  "0.0".
>>
> Matt, it looks like typo for me. I guess the 'a' got lost and it should
> be 'print @3.a?', which works for me.
>
> 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:  rolf.hue...@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
>
>
> --
> Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
> --
> Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>


-- 

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:  rolf.hue...@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


--
Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Wildcard for atom properties

2016-06-22 Thread Rolf Huehne
On 06/22/2016 08:25 PM, Kubasik, Matthew A. wrote:
> Bob and List,
>
> Using the stand alone app on a Mac (10.11.5), I cannot seem to get the 
> wildcard for atom properties to work as I would expect from
>
> http://chemapps.stolaf.edu/jmol/docs/index.htm?ver=14.6.0_2016.06.14#atomproperties.
>
> The doc says print {atomno=3}.a?  will give the atom properties that begin 
> with "a".  This works.
>
> The doc also says print @3.?  will give all atom properties.  But print @3.? 
> gives  "0.0".
>
Matt, it looks like typo for me. I guess the 'a' got lost and it should 
be 'print @3.a?', which works for me.

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:  rolf.hue...@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


--
Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] JmolApplet.jar

2016-05-18 Thread Rolf Huehne
Am 18.05.16 um 22:41 schrieb Robert Hanson:
> I like the idea of an examples subdirectory; of course all my web links
> to chemapps will break in that case. Or I would have to duplicate
> everything there. I guess I could do that. But it complicates things.
>
Bob, I guess if you could convince the server administrator to install 
some rewrite rules you could avoid having to duplicate everything to 
keep the links intact.

Regards,
Rolf

--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] JmolApplet.jar

2016-05-18 Thread Rolf Huehne
On 05/18/2016 11:38 AM, Angel Herráez wrote:
> I certainly would prefer to have Java available in the distribution. For large
> proteins and complexes there is still a significant difference in performance.
>
I would agree with Angel. I still prefer the Java version because of the 
much better performance with larger structures. And the performance is 
also independent of the browser performance. I frequently get drops in 
performance even with smaller protein structures, depending on how busy 
the browser currently is (coping for example with all the background 
tasks from ads or other animations inside visited pages).
But being able to provide the HTML5 alternative is also important.

> Maybe the nonsigned variant can be dropped / separated into the other
> download
>
> On the other hand, I would vote for not having the extra files in the
> distribution like examples, scripts, copy of jQuery etc
> Just leave what is needed for an operative JSmol, HTML5+Java
>
I am not sure if this will really be more advantageous than 
disadvantageous, except for the quite large 'data' directory. And I 
thought jQuery is needed for an operative JSmol.
Maybe it would be sufficient to have a clearer separation between 
necessary and optional/documentational stuff.

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:  rolf.hue...@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


--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Background Color

2016-04-22 Thread Rolf Huehne
On 04/22/2016 10:39 PM, Otis Rothenberger wrote:
> Does anyone know how to GET the existing background color in Jmol Script? I 
> looked through the getProperty docs, and I can’t see any access to the 
> existing background color. I can set a global in the load script to solve the 
> problem, but I curious about an “in house” option that might be available to 
> get this color.
>
It is in the 'General Parameters' list and can be checked and set, e.g.:

   print backgroundColor
   SET backgroundColor "green"

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:  rolf.hue...@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


--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] RasMol terms

2016-04-14 Thread Rolf Huehne
On 04/14/2016 07:19 PM, Robert Hanson wrote:
> Phil, you should check out DSSR. It is amazing! Sorry this is not
> documented yet:
>
> new feature: select shortcuts for nucleic acid structures
>-- for example: select junctions; select kissingloops
>-- activated after load =/dssr or calculate structure dssr
>-- includes:
>  "@bulges within(dssr,'bulges')",
>  "@coaxStacks within(dssr,'coaxStacks')",
>  "@hairpins within(dssr,'hairpins')",
>  "@hbonds within(dssr,'hbonds')",
>  "@helices within(dssr,'helices')",
>  "@iloops within(dssr,'iloops')",
>  "@isoCanonPairs within(dssr,'isoCanonPairs')",
>  "@junctions within(dssr,'junctions')",
>  "@kissingLoops within(dssr,'kissingLoops')",
>  "@multiplets within(dssr,'multiplets')",
>  "@nonStack within(dssr,'nonStack')",
>  "@nts within(dssr,'nts')",
>  "@naChains within(dssr,'naChains')",
>  "@pairs within(dssr,'pairs')",
>  "@ssSegments within(dssr,'ssSegments')",
>  "@stacks within(dssr,'stacks')",
>  "@stems within(dssr,'stems')",
>
>
>
> load =1d66/dssr
> $ print _M.dssr.pairs.select("(nt*) where bp='C-G' or bp='G-C'")
> |1|E|DG|38
> |1|D|DC|1
> |1|E|DG|37
> |1|D|DC|2
> ...
> |1|D|DG|19
>
> $ x= _M.dssr.pairs.select("(nt*) where bp='C-G' or bp='G-C'")
> $ select x
>
>
> Works for RNA and DNA
>
I tried 'select within(dssr,"basePairs")' and 'select 
within(basepair,"GCAT")' for PDB entry '3cro' at
http://chemapps.stolaf.edu/jmol/jsmol/jsmol.htm (see examples below) and 
didn't get the expected results.

In example 1 also about 300 protein atoms were selected, and in example 
2 also about 900 protein atoms were selected.

In example 3 two basepairs were not recognized, but at least no protein 
atoms were selected. Adding 'calculate structure dssr' didn't make a 
difference.

- Example 1 
load =3cro
calculate structure dssr
cartoon only
selectionhalos on
select within(dssr,"basePairs")

- Example 2 
load =3cro/dssr
cartoon only
selectionhalos on
select within(dssr,"basePairs")

- Example 3 
load =3cro
cartoon only
selectionhalos on
select within(basepair,"GCAT")


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:  rolf.hue...@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


--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Cannot load PDBs from RCSB in Chrome -used to work

2016-04-11 Thread Rolf Huehne
On 04/11/2016 02:27 PM, Luciano Abriata wrote:
> Hello,
> I am having a strange problem. If visited from Chrome, my website cannot 
> retrieve PDB files from the PDB (load command), neither from the server nor 
> locally.
> However... it does work in Firefox, it did work in Chrome at least 1-2 months 
> ago, and last, I see other JSmol sites working ok in Chrome. The latter fact 
> makes me think I did something dirty that saw the light now because of some 
> update at the PDB or Chrome... (BTW, I have this problem with old and with 
> the latest JSmol versions).
> In the canvas HTML object in Chrome, the load command gives me:
> Unrecognized file format for filehttp://www.rcsb.org/pdb/files/1xpb.pdb.gz  
> (example)
> NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 
> 'http://www.rcsb.org/pdb/files/1xpb.pdb.gz'
>
>
>
> Any ideas what the problem could be, or what I should pay attention to?
> Many many thanks!
> Luciano
Luciano, it looks like a problem that was solved recently and discussed 
on this list a few weeks ago "[Jmol-users] New path for RCSB files 
causes Jmol error" (see 
"https://sourceforge.net/p/jmol/mailman/message/34960913/;).

According to this you need Jmol version 14.4.4_2016.03.24 or above. If 
you already have installed this version there might be a caching problem 
and files from an earlier version might interfere with the newer 
version. In this case you should empty the browser cache, restart the 
browser, and try again.

Since there can be released several new bug fix versions within a few 
days the term 'latest versions' is not a good choice. It is always 
better to provide the exact version number(s) in a help request.

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:  rolf.hue...@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


--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/
gampad/clk?id=1444514301=/ca-pub-7940484522588532
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Symbols

2016-04-04 Thread Rolf Huehne
On 04/04/2016 09:05 PM, Philip Bays wrote:
> Some days/weeks ago someone posted the symbols used for the various databases 
> (i.e. $  for NCl)   I cannot find that post which I know I saved:-(  Can 
> someone refresh it for me.
>
Phil, have you looked at the scripting documentation for the 'load' 
command ("http://chemapps.stolaf.edu/jmol/docs/?ver=14.4#load;)?

The 'File types' section seems to be pretty comprehensive, also with the 
special syntax options like for example '$',':','='.

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:  rolf.hue...@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


Re: [Jmol-users] Jmol use

2016-03-29 Thread Rolf Huehne
On 03/29/2016 02:41 PM, Robert Hanson wrote:
> no adjustment. I don't know how to do that.
>
> OK, so "real" is an ambiguous term here
> ​
As far as I know, the information is collected by some javascript code 
in pages using the Jmol Javascript library. So maybe crawlers aren't 
counted anyway. But since nowadays a lot of page content is generated on 
the fly with Javascript I wouldn't be surprised if crawler engines would 
also process Javascript.

We are collecting the combination user-agent/IP and search the 
user-agent string for a match to the regular expression 
'bot\/|yahoo|spider'. It could be refined for detecting more rare 
crawlers but it seems to work pretty well.

It should also be possible to examine the 'user-agent' string with 
Javascript and adjust the counting process.

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:  rolf.hue...@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


--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Really Old Question

2016-03-26 Thread Rolf Huehne
Am 26.03.16 um 15:07 schrieb Otis Rothenberger:
> Bob,
>
> I was reviewing some old code, and an atomindex vs atomno  question came up. 
> If I load methane, the following results:
>
> print {*}[0].atomno returns 5
> print {*}[1].atomno returns 1
> print {*}[2].atomno returns 2
> print {*}[3].atomno returns 3
> print {*}[4].atomno returns 4
> print {*}[5].atomno returns 5
>
> I understand the difference between atomindex and atomno, but I’m not sure of 
> the “meaning” of {*}[0].atomno.
>
Otis, array queries with index '0' provide the last array element in Jmol.

> The reason that I’m curious is that I do atom number renumbering during some 
> editing (multiple models in window), and I’m not sure that I’m doing it 
> correctly:
>
> for (var i = 1; i < {*}.length +1; i++){ {*}[i].atomno = i };
>
> This is a case where nothing seems broken, but I’m suddenly concerned about 
> my method because of that {*}[0].atomno
>
It should be fine because you start with index '1'.

But you should consider using the new faster 'for' loop syntax:

 Old syntax --
load =1deh;
startTime = now();
for (var i = 1; i < {*}.length +1; i++){
  {*}[i].atomno = i
}
print format(" (%.2f sec)", now(startTime) / 1000);

  (2.00 sec)

 New syntax --
load =1deh;
startTime = now();
x={*};
for (var i from [1  x.size]){
   x[i].atomno = i
}
print format(" (%.2f sec)", now(startTime) / 1000);

  (1.00 sec)
--

Regards,
Rolf

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol use

2016-03-25 Thread Rolf Huehne
Am 25.03.16 um 19:26 schrieb Robert Hanson:
> Wow, this is for real. Since Jan, 2014, recorded use of JSmol:
> Inline image 1
>
Bob, are these numbers corrected for crawler access?

At least at our Jena3D server there are about 300,000 crawler page 
accesses per year (actual JSmol calls not separated from other calls of 
the CGI scipt).

Regards,
Rolf

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] Side effect of set echo all

2016-03-02 Thread Rolf Huehne
Hi Bob,

I noticed a side effect of the command 'set echo all' in Jmol 
14.4.3_2016.02.28: after it, the command 'background echo' sets the text 
color instead of the background color, illustrated in the example below.

The result of part 1 is, as expected: a black text without background.
Setting the background in part 2 works as expected, resulting in a black 
text with yellow background.
But part 3 surprisingly results in a red text with yellow background.
Setting the text color still works in part 4.
Part 5 shows that the side effect is recoverable by setting a specific 
echo, resulting in a black text with red background.

 Example - part 1 --
set echo top left;
background echo none;
color echo black;
echo "Color Test";

--- Example - part 2 --
background echo yellow;

--- Example - part 3 --
set echo all;
background echo red;

--- Example - part 4 --
color echo black;

--- Example - part 5 --
set echo top left;
background echo red;
---

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:  rolf.hue...@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


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Try / catch not working for file loading

2016-03-01 Thread Rolf Huehne
On 03/01/2016 03:54 PM, Robert Hanson wrote:
> It's harder than you think. There are several other messages that can come
> up besides 404 that would signify a file read failure [
> https://en.wikipedia.org/wiki/List_of_HTTP_status_codes]
>
Yes I know. I rather thought to use the very few success codes (maybe 
only '200', but even this will be no guarantee) and regard everything 
else as error.

> try/catch is primarily for *Jmol scripting errors. *Just like try/catch in
> JavaScript is for JavaScript errors, and try/catch in Java is for Java
> errors. To the extent that a Java error results in a command failure in
> Jmol, they will be caught. But Java errors are rare in running Jmol code.
> It is true that Java errors (actually Java *exceptions*) occur for the LOAD
> and WRITE commands and in that case do trigger try/catch errors.
>
> With the LOAD command, we are not catching 404 or any such message. Jmol
> just discovers that there is no such file format. So try/catch is catching
> a Jmol scripting error, not technically the Java exception. The load()
> function works the same. It's just that there is no Jmol processing that
> goes on to check the file's validity, so there is no catch.
>
Thank you for the detailed explanation, Bob. I think it would be a good 
idea to update the 'try / catch' documentation with some of this 
information. Especially because the example there is on catching file 
load errors, leading easily into the wrong direction (as you could see).

> Since you know what kind of files you are after, you can add your own THROW
> command:
>
> try{
>x = load("asfadf")
>if (x.find("404") || x.find("Exception")) throw x
>//...more here...
> } catch(e) {
>   print "load() error: " + e
> }
>
Actually it is not that easy for me because advanced/admin users will be 
able to extend my system to read other kinds of files and write their 
own parsers. File loading and parsing are separated and I was rather 
aiming at the more fundamental problems like 'file not found'.

Since I thought 'try / catch' would already be able to do what I would 
need and there might just be a bug in there, I havn't tried yet to come 
up with a different solution. You are right that I could build something 
on my own. But as always when standard output and standard error are 
mixed, it will be notbe easy to distinguish between output and error 
(especially with very flexible input options).

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:  rolf.hue...@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


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Try / catch not working for file loading

2016-02-29 Thread Rolf Huehne
Am 29.02.16 um 23:10 schrieb Robert Hanson:
> I believe that is the correct behavior. It's just that in the case of
> the JavaScript version of the applet you get an HTML error message, and
> in Java you get a Java error message. Your code is just printing that
> error message (fileData).
>
> But I see. you were expecting load("") to throw an error instead.
> That does make sense to me. But, if you think about it, there's no way
> for the applet to know what the HTML will be that defines a "file not
> found" error. These messages vary a lot. It is tested when you actually
> /load /the file, because we know in that case what the options are, and
> those error messages are not of them.
>
> But with load("") the file to load could be anything, including a
> file that reports exactly that HTML. So it never throws an error, and
> you just have to check to make sure yourself that you have the data you
> expect.
>
I am confused.
Isn't a Java exception exactly what a 'try / catch' is intended for?
And in the case of a http request : couldn't Jmol use the http response 
code (e.g.: 200 => ok, 404 => file not found) to recognize errors?

Regards,
Rolf

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] Try / catch not working for file loading

2016-02-29 Thread Rolf Huehne
Hi Bob,

'try / catch' doesn't seem to work in Jmol 14.4.3_2016.02.17 
(application and applet at
http://chemapps.stolaf.edu/jmol/jsmol/jsmol.htm) if it is used to check 
loading a text file using the 'load' function.

 Example code 
function loadTest(fileName) {
   var fileData = [];
   while(true) {
  try {
fileData = load(fileName);
  } catch(e) {
print e;
print "ERROR: could not load file '" + fileName + "'";
return fileData;
  }
  print "NOTE: loaded file '" + fileName + "' succesfully";
  break;
   }
   return fileData;
}

x=loadTest("wrongFilename.txt");
print x;

--- Output from application ---
NOTE: loaded file 'wrongFilename.txt' succesfully
java.io.FileNotFoundException: wrongFilename.txt (No such file or directory)

--- Output from applet  ---
NOTE: loaded file 'wrongFilename.txt' succesfully


404 Not Found

Not Found
The requested URL /jmol/jsmol/wrongFilename.txt was not found on this 
server.

Apache Server at chemapps.stolaf.edu Port 80

-------

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:  rolf.hue...@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


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] Hash keys sometimes transformed to lower-case

2016-02-25 Thread Rolf Huehne
Hi Bob,

once again I have found a situation where the case of hash keys is 
changed during the hash definition.

It seems that the words 'function' and 'process' (and maybe others?) 
trigger the key conversion to lower-case in a hash definition if no 
quotes are used, tested in Jmol 14.4.3_2016.02.17 and 14.4.1_2015.12.16:

 Example code 
hashTest = [Component: "mediumturquoise",
 Function:  "lightskyblue",
 Process:   "deepskyblue"
];
print hashTest;

hashTest = ["Component": "mediumturquoise",
 "Function": "lightskyblue",
 "Process": "deepskyblue"
];
print hashTest;

 Example output --
{
   "Component"  :  "mediumturquoise"
   "function"  :  "lightskyblue"
   "process"  :  "deepskyblue"
  }

{
   "Component"  :  "mediumturquoise"
   "Function"  :  "lightskyblue"
   "Process"  :  "deepskyblue"
  }
--

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:  rolf.hue...@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


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Variable name for pov output

2016-02-16 Thread Rolf Huehne
On 02/16/2016 07:41 PM, Max Pinheiro Jr wrote:
> Dear all,
>
> I am trying to do a script for jmol that export the povray files using
> variable output names defined by some properties of a given molecular
> orbital. For example, I would like to get an output file named with the
> symmetry of the orbital. To do that, the latest lines of my jmol script is
> like this:
>
> x = getProperty("auxiliaryInfo.models[1].modata.mos")
>
> sym = x[21]["symmetry"]
>
> write POVRAY o...@sym.pov
>
> I checked that the command echo return the correct value for my variable
> "sym" but the command write seems to does not recognize the variable such
> that the output name is "o...@sym.pov".
>
> Please, does somebody know how to export a povray file using variables to
> define the output file name? What is the right command for that? It would
> be also very useful if I could export all information about symmetry and
> occupation of a given orbital for a txt file.
>
Max, if you build the complete filename before the 'write' command it 
should work:

   sym = x[21]["symmetry"];
   filename = "Orb" + sym + ".pov";
   write POVRAY @filename;

You can write the content of variables into files (for details see 
documentation at 
"http://chemapps.stolaf.edu/jmol/docs/?ver=14.4#writeinfo;), e.g.:

   info = "Orbital info line 1...\nOrbital symmetry: " + sym;
   filename = "Orb" + sym + ".txt";
   write VAR info @filename;

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:  rolf.hue...@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


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] JSmol on Safari Mac Version 9.0.3 (11601.4.4)

2016-02-12 Thread Rolf Huehne
On 02/12/2016 02:33 AM, Otis Rothenberger wrote:
> It turns out that there is a JQuery solution to the Safari back/forward 
> browser cache issue:
>
> $(window).bind("pageshow", function(event) {
>  if (event.originalEvent.persisted) {
>  window.location.reload()
>  }
> });
>
> http://stackoverflow.com/questions/8788802/prevent-safari-loading-from-cache-when-back-button-is-clicked
>
> This only brings Safari to FF/Chrome behavior - i.e. page default reload on 
> back button.
>
> I really need to put some time in dealing with the local storage saved state 
> restore issues rather than just saved molfile re-load. It would be nice to be 
> able to restore state with this approach after  back button or return from a 
> subsequent page.
>
I found another workaround at 
"http://stackoverflow.com/questions/12381563/how-to-stop-browser-back-button-using-javascript;.

Instead of fixing the page reload it prevents going back in history. 
Generally you shouldn't do this. But if you are in a Javascript 
application like JSmol I think it would be more annoying for a user to 
loose the work done than not to be able to go back.

It doesn't solve the problem of going into the 'forward' direction. But 
if all links in the page are set to be opened in a new window/tab it 
should at least be difficult to go somewhere else accidentally.

--- HTML/Javascript -

   history.pushState(null, document.title, location.href);
   window.addEventListener('popstate', function (event)
   {
 history.pushState(null, document.title, location.href);
   });

-

I have tested it only in Firefox 43.0.4 and Chromium 31.0 on Linux yet. 
But there it works nicely. Javascript variables retain there content and 
JSmol keeps it's current state. And in comparison to other similar 
solutions within the URL above, a manual page reload still works.

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:  rolf.hue...@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


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] JSmol on Safari Mac Version 9.0.3 (11601.4.4)

2016-02-12 Thread Rolf Huehne
Am 12.02.16 um 20:29 schrieb Robert Hanson:
> Hmm. I don't know if I like that as a default. People don't like
> surprises, and I really dislike it personally when a page disables the
> "back" function.
> ​
I wasn't suggesting this as a general default. With a complex tool like 
the 'Jena3D Viewer' it is quite likely that a lot of work is lost if the 
page is left. On simpler pages it might not be as important.

And the "back" function actually isn't totally disabled. At least in 
Firefox and Safari (not tested in other browsers) the "click and hold" 
function to select a specific step in the history still works.

Regards,
Rolf

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] JSmol on Safari Mac Version 9.0.3 (11601.4.4)

2016-02-11 Thread Rolf Huehne
On 02/11/2016 07:41 PM, Jaime  Prilusky wrote:
> It seems that JSmol gets unloaded when a page gets out of focus, by flipping 
> between pages, on Safari Mac Version 9.0.3 (11601.4.4).
>
> 1. Open any page on Safari  Mac (tested on Version 9.0.3)
>
> 2. Now open a page with JSMol on it, i.e. http://proteopedia.org/w/1dnn
>
> 3. Go to the previous page: History->Back or click on the ’Show the previous 
> page’ arrow
>
> 4. Go to the JSmol page: History->Forward or click on the ‘Show the next 
> page’ arrow
>
> JSmol is not longer reponsive.
>
> This doesn’t happen on Chrome or Firefox on Mac. Doesn’t happen either on 
> Safari when a page loose focus by opening another window on the same browser.
>
> Jaim
>
Safari seems to have a problem contacting the EBI server during the 
reload of the page:

 Safari 7 error message -
Failed to load resource: the server responded with a status of 404 (Not 
Found) http://www.ebi.ac.uk/pdbe/api/pdb/entry/publications/1dnn
-----

Does the URL get mixed up in Safari?

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:  rolf.hue...@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


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] a bug or changes in code?

2016-01-20 Thread Rolf Huehne
20:B"
 name  :  "WC"
 nt1  :  "[DA]2:A"
 nt2  :  "[DT]20:B"
 res1  :  "2:A"
 res2  :  "20:B"
 stRise  :  3.26
 stRiseC1  :  3.26
 stRoll  :  1.819
 stShift  :  0.24
 stSlide  :  -0.56
 stTilt  :  -1.9
 stTwist  :  30.23
 stTwistC1  :  32.05
 stemId  :  1
}

- 'pairs' entry--
   {
 "DSSR"  :  "cW-W"
 "LW"  :  "cWW"
 "Saenger"  :  "20-XX"
 "bp"  :  "A-T"
 "index"  :  1
 "name"  :  "WC"
 "nt1"  :  "|1|A|DA|2"
 "nt2"  :  "|1|B|DT|20"
}

-

If you are lucky, there might be an option to go back to the former 
'DSSR' calculation method (which seems to have changed).

Or you could build the 'res1' and 'res2' information by reformatting the 
'nt1' and 'nt2' information.

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


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Average of two XYZ coordinate sets?

2016-01-19 Thread Rolf Huehne
On 01/19/2016 08:06 AM, Robert Hanson wrote:
> I don't know. I cannot reproduce your error:
>
> in jmol-14.4.0_2015.10.14.zip I get:
>
> $ load =1deh;
> x={1:A}.xyz;
> y={2:A}.xyz;
> print (x+y)/2
>
> OXIDOREDUCTASE  14-OCT-95   1DEH
> CRYSTALLIZATION OF HUMAN BETA1 ALCOHOL DEHYDROGENASE (15
> MG/ML) IN 50 MM SODIUM PHOSPHATE (PH 7.5), 2.0 MM NAD+ AND
> 1 MM 4-IODOPYRAZOLE AT 25 OC, 13% (W/V) PEG 8000
> found biomolecule 1: A, B
>
> {15.324988 11.581345 1.6729763}
> ​
The file name also doesn't correspond to the name reported by the applet 
like for version 14.5.1. (I hadn't checked it for the version currently 
used by the 'Jena3D Viewer'.) Actually it was extracted from the file 
'Jmol-14.4.0_2015.10.17-binary.zip' but the applet reports 
"14.4.0_2015.10.14" while the application reports "14.4.0_2015.10.17".

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


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Average of two XYZ coordinate sets?

2016-01-18 Thread Rolf Huehne
On 01/18/2016 12:06 PM, Robert Hanson wrote:
> no difference. Try again.
> ​
It is version-specific:

a) in Jmol 14.4.0_2015.10.14 my example doesn't work

b) in Jmol 14.5.1_2015.12.16 (extracted from jmol-14.4.1_2015.12.20.zip) 
my example does work

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


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Average of two XYZ coordinate sets?

2016-01-17 Thread Rolf Huehne
Am 17.01.16 um 08:48 schrieb Robert Hanson:
> Well, you need to make sure that x and y are points, as Eric did:
>
> x = {gly6:a}.xyz
> y = {asp13:a}.xyz
> print [x,y].average
>
I thought I did. And the result of 'x.type' and 'y.type' is "point" in 
my example.

So what is the fundamental difference between Eric's example

   x={gly6:a}.xyz
   y={asp13:a}.xyz

and my example

   x={1:A}.xyz;
   y={2:A}.xyz;

that would  influence the result of 'average'?

Eric, which PDB entry did you use, so that I can try it myself?

Regards,
Rolf

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Average of two XYZ coordinate sets?

2016-01-16 Thread Rolf Huehne
Am 17.01.16 um 00:23 schrieb Eric Martz:
> x = {gly6:a}.xyz
> y = {asp13:a}.xyz
>
> How do I get one set of XYZ coordinates that is the average of x and y?
>
The following provides the individual averages of the x,y and z 
coordinates as a new coordinate set:

 Example 
load =1deh;
x={1:A}.xyz;
y={2:A}.xyz;
ax = [x.x,y.x].average;
ay = [x.y,y.y].average;
az = [x.z,y.z].average;
a = point(ax ay az);
show x;
show y;
show a;

 Example output -
x = {16.2048337 12.8088332 2.9686667}
y = {14.445142857142857 10.353857142857143 0.37728571428571434}
a = {15.324988095238098 11.581345238095238 1.6729761904761906}
-

Eric, is that what you want?

Regards,
Rolf

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Average of two XYZ coordinate sets?

2016-01-16 Thread Rolf Huehne
Am 17.01.16 um 03:35 schrieb Robert Hanson:
> I believe it is
>
> z = [x,y].average
>
I tried that first but it gives a single number and not a point.

Regards,
Rolf


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] Parser problem with double dot notation

2016-01-15 Thread Rolf Huehne
Hi Bob,

I noticed a context-sensitive problem of the script parser with the '..' 
notation to access multi-level data structures in Jmol 14.5.1_2015_12_16 
(also tested in 14.4.0_2015_10_14).

The following command in itself doesn't provoke an error message:

networkDef..renderings = [default: [size: defaultRendering..size, 
subTypeSpecific: {}]];

But in the context of the following function (minimized to the essential 
commands to reproduce the problem) there appears an error message:

- Function 
function parseNetworkDefinitions(networkDefs) {
   var networkTypes = networkDefs.keys;
   for (var networkType in networkTypes) {
 var networkDef  = networkDefs[networkType];
 if (networkDef..edgeType == "") {
 }
 networkDef..renderings = [default: [size: defaultRendering..size, 
subTypeSpecific: {}]];
   }
}

- Error message ---
script compiler ERROR: unexpected end of script command

   <<<<
---

The error message disappears when the 'if' clause before the command is 
removed (Variant 1) or when the '..' notation is changed (Variant 2):

- Variant 1 
function parseNetworkDefinitions(networkDefs) {
   var networkTypes = networkDefs.keys;
   for (var networkType in networkTypes) {
 var networkDef  = networkDefs[networkType];
 networkDef..renderings = [default: [size: defaultRendering..size, 
subTypeSpecific: {}]];
   }
}

- Variant 2 
function parseNetworkDefinitions(networkDefs) {
   var networkTypes = networkDefs.keys;
   for (var networkType in networkTypes) {
 var networkDef  = networkDefs[networkType];
 if (networkDef..edgeType == "") {
 }
 networkDef["renderings"] = [default: [size: defaultRendering..size, 
subTypeSpecific: {}]];
   }
}
-------

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


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] Applying color schemes from a variable

2016-01-14 Thread Rolf Huehne
Hi Bob,

it seems that it is not possible to provide a color scheme inside a 
variable to the 'color' command in Jmol 14.4.x or 14.5.x. Providing 
individual colors inside a variable does work.

 Examples -
load =1deh;
select all;
x = "red"; color @x;
x = "[0,0,255]"; color @x;
x = "cpk"; color @x;
x = "chain"; color @x;
---

Q: Is this a bug or a feature?

I could use 'dummy = script("color " + x)' as a workaround. But it 
wouldn't be nice to have do do this always because 'x' might contain a 
color scheme, especially in scripts with lots of different color setting 
commands.

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


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] how to parse JSON data within Jmol

2016-01-13 Thread Rolf Huehne
On 01/13/2016 08:22 PM, Rolf Huehne wrote:
> On 01/13/2016 07:37 PM, Eric Martz wrote:
>> Dear Angel (and everyone),
>>
>> For years I have wanted a way to find out (in javascript or in JSmol)
>> the number of atoms (or molecular weight) of a PDB entry before
>> attempting to load it into JSmol. But I have not known how to do this.
>>
>> If you know, please send me a sample of the code.
>>
>> When the size exceeds a threshold, I would load only alpha carbons.
>>
> Eric, as you might have expected, you could do it by using the PDBE API
> that Angel used within his question.
>
> The following function needs as a parameter the PDB code (lower-case!)
> and would return the combined molecular weight of all molecules.
> It will only work for asymmetric units. (If you would build up a
> biological unit within Jmol more information would be needed.)
>
> --- Jmol function --
> function getPdbEntryWeight(pdbId) {
> var weight = 0;
>
> if (pdbId != "") {
>   var queryUrl = "http://www.ebi.ac.uk/pdbe/api/pdb/entry/molecules/;
> + pdbId;
>   var info = eval(load(queryUrl));
>
>   if (info.type == "hash") {
> for (var entity in info[pdbId]) {
>   var currentWeight =  entity..weight;
>   if (currentWeight != "") {
> weight = weight + currentWeight;
>   }
> }
>   }
> }
>
> return weight;
> }
>
> - Example code ---
> weight = getPdbEntry("1deh");
> print weight;
>
> --Example output -
> 40749.875
> --
>
Sorry, I forgot the 'Weight' in the example function call':

   weight = getPdbEntryWeight("1deh");

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


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] how to parse JSON data within Jmol

2016-01-13 Thread Rolf Huehne
On 01/13/2016 07:37 PM, Eric Martz wrote:
> Dear Angel (and everyone),
>
> For years I have wanted a way to find out (in javascript or in JSmol)
> the number of atoms (or molecular weight) of a PDB entry before
> attempting to load it into JSmol. But I have not known how to do this.
>
> If you know, please send me a sample of the code.
>
> When the size exceeds a threshold, I would load only alpha carbons.
>
Eric, as you might have expected, you could do it by using the PDBE API 
that Angel used within his question.

The following function needs as a parameter the PDB code (lower-case!) 
and would return the combined molecular weight of all molecules.
It will only work for asymmetric units. (If you would build up a 
biological unit within Jmol more information would be needed.)

--- Jmol function --
function getPdbEntryWeight(pdbId) {
   var weight = 0;

   if (pdbId != "") {
 var queryUrl = "http://www.ebi.ac.uk/pdbe/api/pdb/entry/molecules/; 
+ pdbId;
 var info = eval(load(queryUrl));

 if (info.type == "hash") {
   for (var entity in info[pdbId]) {
 var currentWeight =  entity..weight;
 if (currentWeight != "") {
   weight = weight + currentWeight;
 }
   }
 }
   }

   return weight;
}

- Example code ---
weight = getPdbEntry("1deh");
print weight;

--Example output -
40749.875
--
-- 

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


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] SVG

2016-01-13 Thread Rolf Huehne
On 01/13/2016 02:50 PM, David Leader wrote:
>   Bob wrote:
>
>
>> You can create an image of whatever size you want in pixels using the WRITE
>> command. Many consider these adequate for publication. And, as a bonus, if
>> you use the PNGJ option:
>>
>> write PNGJ 2000 2000 "big.png"
>
> So you can. I never knew that.
> But the problem is how many users of a website you’d set up (or the PDB 
> website which uses Jmol) would know that - or even consider using the console?
>
The 'console' wouldn't be needed for that. You can easily integrate this 
directly into a web interface.
When we designed the 'Jena3D Viewer' (e.g.: 
http://jenalib.fli-leibniz.de/cgi-bin/3d_mapping.pl?CODE=1co1=html5) 
about ten years ago we included a section 'Graphics Window' to resize 
the Jmol applet and enable the user to generate high-resolution images 
for publications.

At that time the practical limit was about 2500x2500 pixel and a server 
was needed to bounce back the generated image to the browser (at least 
for the unsigned Java applet). Nowadays it could be much simpler using 
for example the 'image' command (see 
http://chemapps.stolaf.edu/jmol/docs/?ver=14.4#image) introduced in Jmol 
14.4. And you can also generate larger images. I just generated a 
snapshot with 6000x6000 pixel 
(http://jenalib.fli-leibniz.de/ImgLibPDB/tmp/1CO1-snapshot-6000x6000-25707.jpg) 
from JSmol/HTML5.

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


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] how to parse JSON data within Jmol

2016-01-12 Thread Rolf Huehne
On 01/12/2016 06:21 PM, Angel Herráez wrote:
> Hi all
>
> I am trying to parse some data that is, as far as I can guess, in JSON format
> Data is at http://www.ebi.ac.uk/pdbe/api/pdb/entry/molecules/2k8v
>
> I am trying to do
>   f = load("http://www.ebi.ac.uk/pdbe/api/pdb/entry/molecules/2k8v;)
>
> and "print f" shows it
>
> {"2k8v":[{
>   "entity_id":1,
>   "weight":17801.109,
> etc
>
> Now the question: how to extract parts of the data, like the value for the
> "weight" key?
Angel, you need an 'eval' around the 'load' command:

f = eval(load("http://www.ebi.ac.uk/pdbe/api/pdb/entry/molecules/2k8v;))

Then you have full access to the data structure, e.g.:

show f;
print f["2k8v"]..[1];
print f..2k8v..[1];
print f..2k8v..[1].keys;
print f..2k8v..[1]..sequence;

Since the actual data is below 'f["2k8v"]..[1]' I would suggest to 
simplify access by shifting the content upwards:

info = f["2k8v"]..[1];
print info..sequence;

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


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
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 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


Re: [Jmol-users] test please

2015-12-21 Thread Rolf Huehne
Am 21.12.15 um 04:08 schrieb Philip Bays:
> Bob:
> Then link to your site does not work with Safari on the Mac,  Works with
> Firefox and Chrome.  When I launch the file test2.htm from the desktop,
> it again works in Firefox and Chrome but not Safari.  In this case the
> list of files loading is visible and the crash comes at the following:
>
>
> TypeError: b.slice is not a function. (In 'b.slice(c, d)', 'b.slice' is
> undefined)
>
On MacOS X 10.9.5 I observe the same:
   Firefox 42.0 does work
   Chrome 47.0 does work
   Safari 7.1.3 does not work

--- Error message in 'info' during page load 
TypeError: undefined is not a function (evaluating 'b.slice(c,d)')
-

On Linux there is also a problem:
   Firefox 42.0 does work
   Chromium 31.0 does not work

--- Error message in 'info' during page load 
TypeError: Object # has no method 'slice'
-

Regards,
Rolf


--
___
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-21 Thread Rolf Huehne
On 12/18/2015 06:41 PM, Robert Hanson wrote:
> x = null
> y = null
> t = now();
> x = load("tt.json")
> print "ms to read " + x.length + " bytes: " + now(t)
> t = now()
> y = javascript(x)
> print "ms to translate JSON to Jmol variables: " + now(t)
>
> ms to read 58696197 bytes: 12313
> ms to translate JSON to Jmol variables: 25286
>
Bob, is this already available in Jmol 14.4.1_2015_12_20?

I tried the example above with the large JSON example and got the 
following error message in Firefox 42.0 on Linux with JSmol/HTML5:

 Error message 
SyntaxError: missing ; before statement try/catch path:
0 function (b,d)
  args[0]=SyntaxError: missing ; before statement
  args[1]=function (){a.instantialize(this,arguments)}
1 J.appletjs.Jmol.doEval(a)
  args[0]={ "edgeKeysUsed": { "species||Neurospora crassa%%ageingFacto...
2 JU.GenericApplet.eval(a)
  args[0]={ "edgeKeysUsed": { "species||Neurospora crassa%%ageingFacto...
3 JV.StatusManager.jsEval(a)
  args[0]={ "edgeKeysUsed": { "species||Neurospora crassa%%ageingFacto...
4 JV.Viewer.jsEvalSV(a)
  args[0]={ "edgeKeysUsed": { "species||Neurospora crassa%%ageingFacto...
5 JS.MathExt.evaluateScript(d,a,b)
  args[0]=[JS.ScriptMathProcessor object]
  args[1]=Token[string(4/0x4) value="{ "edgeKeysUsed": { "species||Neu...
  args[2]=134238732
6 JS.MathExt.evaluate(d,a,b,c)
  args[0]=[JS.ScriptMathProcessor object]
  args[1]=Token[keyword(12/0x800520c) value="javascript"]
  args[2]=Token[string(4/0x4) value="{ "edgeKeysUsed": { "species||Neu...
  args[3]=134238732
7 JS.ScriptMathProcessor.evaluateFunction(a)
  args[0]=134238732
8 JS.ScriptMathProcessor.addOpAllowMath(a,b,c)
  args[0]=Token[keyword(17/0x1011) value=")"]
  args[1]=true
  args[2]=0
9 JS.ScriptMathProcessor.addOp(a)
  args[0]=Token[keyword(17/0x1011) value=")"]
---

I also tried JSmol/Java. The first time the java plugin crashed. The 
second time is running since more than an hour now. Although the java 
process doesn't uses any CPU time. So I am not sure if there is still 
happening something.

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


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

2015-12-18 Thread Rolf Huehne
On 12/17/2015 06:51 PM, Rolf Huehne wrote:
> Thank you for the hint, Bob.
> I have thought about using JSON format but couldn't find a way to read
> it in again in the documentation.
> And besides I had a lot of trouble with the JSON format in another
> project (Javascript->JSON->Perl-CGI->Filesystem->Perl-CGI->Javascript).
> So I didn't try to dig deeper into it here.
>
> In Java the import of the small dataset in JSON format does work fine.
> The import of the full dataset is still running since several minutes.
> So it is much slower there than building the data structure from the TSV
> files.
>
Importing the full dataset is finished now. It took about 18 hours!

I tried to compare it to the original data by exporting it also with 
'write var ...'. But since it is sorted differently the comparison will 
be difficult.
What I know already is that the original export has 321 more lines and 
at least a few records are missing.

The missing records are already missing in the JSON file. Since they 
look rather strange and shouldn't be there in the first place, they 
might be a (quite strange) artifact of the 'write var ...' command.

- Missing record example -
parsedData = {
   "edgeInfo"  :
   {
 "ageingFactorId||0%%alleleType||0"  :
 {
   "edgeNumber"  :  1
   "nodeKey1"  :  "ageingFactorId||0"
   "nodeKey2"  :  "alleleType||0"
   "nodeNumber1"  :  1
   "nodeNumber2"  :  2
   "nodeSubTypeId1"  :  "AF_UNK"
   "nodeSubTypeId2"  :  "ALT_ALT"
   "nodeTypeId1"  :  "F"
   "nodeTypeId2"  :  "Al"
   "subnetworkNumber"  :  1
  }


Strange with the example record above are the zeros behind the '||' 
separators which shouldn't occur. But on the other hand there are hash 
keys that have a valid value (e.g.: nodeNumber1, nodeNumber2).

If I try to print the record the output is empty:

print parsedData..edgeInfo.["ageingFactorId||0%%alleleType||0"]

Printing the whole 'parsedData' variable crashed the Java plugin. So I 
couldn't compare it with the 'write' output.

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


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

2015-12-18 Thread Rolf Huehne
On 12/18/2015 06:41 PM, Robert Hanson wrote:
> Rolf, let's try some tests.  I noticed that 16 Mb of JSON code was turned
> into JavaScript in 1.5 seconds by the browser just using  a script tag, so
> that parser is fantastic.
>
> Putting that much into Jmol variables would be a challenge, and I do not
> propose to be able to do it on that scale, but even for smaller amounts it
> should be interesting. I have just implemented in JSmol the capability to
> read JavaScript objects directly into Jmol variables without using JSON.
> What I've done is to slightly change the action of
>
> y = javascript("x")
>
> Currently that just returns some sort of string equivalent -- for example
> "[Object object]" -- but what  I have just gotten working is that if x is
> something other than a string, it will be translated into a Jmol variable.
>
> Ho, ho! This just worked:
>
> x = load("tt.json")
> print x.length
>
>
> *58696197*
> y = javascript(x)
> print y.keys
>
> *edgeInfoedgeKeysUsededgeNumberToEdgeKeymaxEdgeNumbermaxNodeNumberneighboursnodeInfonodeLegendInfonodeNumberToNodeKeysubnetworkInfo*
> print y.edgeInfo.keys.length
>
>
> *51426*
> Of course, TaskManager is reporting that Firefox is using 820Mb of memory
> right now. Here it is with a timing test:
>
> x = null
> y = null
> t = now();
> x = load("tt.json")
> print "ms to read " + x.length + " bytes: " + now(t)
> t = now()
> y = javascript(x)
> print "ms to translate JSON to Jmol variables: " + now(t)
>
> ms to read 58696197 bytes: 12313
> ms to translate JSON to Jmol variables: 25286
>
> ​So that's 38 seconds to process 58.7 Mb of JSON code. OK, so that is
> probably better than you are doing now, right?
>
That sound great! Much better than 18 hours times 60.

> Rolf, if you have time, could you help me with some JavaScript time trials?
> I am interested, for example, in how much faster .slice is than straight
> copying:
>
> //given (in JavaScript)
>
> a = new Array(5)
>
> // compare
>
> b = a.slice()
>
> // to
>
> b = new Array(5)
> for (var i = a.length;--i >= 0;)
>b[i] = a[i]
>
> ///
>
Bob, are you sure that the slice command really copies the array?

I did this from JSmol:

 Jmol script -
jsCommand = "n=100; t1=performance.now(); a = new Array(n); b = 
a.slice(0); t2=performance.now(); c = new Array(n); for (var i = 
a.length;--i >= 0;) { c[i] = a[i] } t3=performance.now(); msg='slice: ' 
+ (t2 - t1) + 'ms  copy: ' + (t3 - t2) + 'ms'; alert(msg)";
javascript @jsCommand;
--

The 'slice' time was independent of 'n' but dependent on the type of 
JSmol, in a reverse manner for Firefox and Chromium:
  Firefox/HTML5:  0.02ms
  Firefox/Java:   0.04ms
  Chromium/HTML5: 0.06ms
  Chromium/Java:  0.03ms

With 'copy' the time was dependent on the type of JSmol (n=100), but 
in a reverse manner for Firefox and Chromium:
   Firefox/HTML5:  850ms
   Firefox/Java:  4600ms
   Chromium/HTML5: 800ms
   Chromium/Java:  180ms

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


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

2015-12-18 Thread Rolf Huehne
On 12/18/2015 09:05 PM, Robert Hanson wrote:
> Oh, yes. .slice() copies all or part of an array.
>
The independence of 'n' was caused because the elements of the copied 
array were all undefined. I have changed the test and filled the array 
with values first:

 Jmol script --
jsCommand = "n=100; a = new Array(n); for (var i = a.length;--i >= 
0;) {a[i] = i;} t1=performance.now(); b = a.slice(0); 
t2=performance.now(); c = new Array(n); for (var i = a.length;--i >= 0;) 
{ c[i] = a[i] } t3=performance.now(); dt1= t2 - t1; dt2= t3 - t2; a[5] = 
-5; msg='slice: ' + dt1 + 'ms copy: ' + dt2 + 'ms  a[5]=' + a[5] + ' 
b[5]=' + b[5] + '  c[5]=' + c[5]; alert(msg)";
javascript @jsCommand;
-

Now 'slice' also depends on 'n':
   Firefox/HTML5:  4ms
   Firefox/Java:   4ms
   Chromium/HTML5: 10ms
   Chromium/Java:  7ms

And the new values for 'copy' are:
   Firefox/HTML5:   500ms
   Firefox/Java:   4000ms
   Chromium/HTML5:  700ms
   Chromium/Java:   130ms

Bob and others, do you have any idea why there is such a huge 
performance difference in running the same Javascript code from 
JSmol/Java or JSmol/HTML5 and that in a different direction for Firefox 
and Chrome?

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


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

2015-12-18 Thread Rolf Huehne
On 12/18/2015 10:00 PM, Robert Hanson wrote:
> I'm not sure the Java data are significant -- all you are seeing there is
> the overhead for executing JavaScript from Java. The Java itself has
> nothing to do with it, since the loop is in JavaScript.
>
But the 'performance.now()' calls are done inside the script, so the 
overhead shouldn't matter.

> Note that you need to use .slice() not .slice(0).  The latter just pulls
> the first value out.
>
The documentation for 'slice()' at 
"http://www.w3schools.com/jsref/jsref_slice_array.asp; says that the 
first parameter 'start' is required and that the array is copied until 
the end if the second parameter 'end' is omitted.

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


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

2015-12-17 Thread Rolf Huehne
On 12/16/2015 09:48 PM, Robert Hanson wrote:
> Jmol uses typed arrays when possible. Parsing of scripts is relatively
> slow. Rolf, if you want to give me something to try, I will be happy to
> play with it and see what I can learn.
>
Bob, what would you want to have?

I think I cannot reveal the whole system yet, but I have placed here 
(temporarily) the compressed output of 'write var ...' of the parsed data.

Uncompressed it is about 73 megabytes and JSmol/Java needs at least 500 
megabyte RAM to handle it.

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


Re: [Jmol-users] "labels off" freezing JSmol

2015-12-17 Thread Rolf Huehne
On 12/17/2015 04:39 AM, Robert Hanson wrote:
> Wow, what a GREAT FIND, Eric! Say you have a set of information in the form
> of an array for n items. Now you need to set the value for n+1. Well, of
> course you were efficient in your creating an array of just n values, so
> now you have to create a NEW array that is n+1 long instead of n long.
> That's pretty fast, if you do it once. But now do this:
>
> a = [];
> for (i = 0; i < 2; i++) {
>if (a.length < i + 1)
>  a = copyArray(a, i + 1);
> }
>
> See the problem? Not only are you creating an array that is 2 long, you
> are creating a new array from an old one *2 times. *Ouch!
>
Bob, I also tried to avoid this in Jmol scripting by setting the last 
value of an array first:

   var parsedData = [];
   parsedData[tsvData.size] = 0;

Would you confirm that this will actually work?

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


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

2015-12-17 Thread Rolf Huehne
On 12/17/2015 04:03 PM, Rolf Huehne wrote:
>> I think I cannot reveal the whole system yet, but I have placed here
>> (temporarily) the compressed output of 'write var ...' of the parsed data.
>>
> Sorry, I forgot the URL:
>
> http://jenalib.fli-leibniz.de/ImgLibPDB/tmp/parsed_data-2015_12_17.zip
>
I have added now also the 'write var ...' output of a smaller subset and 
the loaded TSV files to the ZIP file.

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


Re: [Jmol-users] "labels off" freezing JSmol

2015-12-17 Thread Rolf Huehne
On 12/17/2015 04:18 PM, Robert Hanson wrote:
> On Thu, Dec 17, 2015 at 8:30 AM, Rolf Huehne <rhue...@leibniz-fli.de> wrote:
>
>> On 12/17/2015 04:39 AM, Robert Hanson wrote:
>>> Wow, what a GREAT FIND, Eric! Say you have a set of information in the
>> form
>>> of an array for n items. Now you need to set the value for n+1. Well, of
>>> course you were efficient in your creating an array of just n values, so
>>> now you have to create a NEW array that is n+1 long instead of n long.
>>> That's pretty fast, if you do it once. But now do this:
>>>
>>> a = [];
>>> for (i = 0; i < 2; i++) {
>>> if (a.length < i + 1)
>>>   a = copyArray(a, i + 1);
>>> }
>>>
>>> See the problem? Not only are you creating an array that is 2 long,
>> you
>>> are creating a new array from an old one *2 times. *Ouch!
>>>
>> Bob, I also tried to avoid this in Jmol scripting by setting the last
>> value of an array first:
>>
>> var parsedData = [];
>> parsedData[tsvData.size] = 0;
>>
>> Would you confirm that this will actually work?
>>
>>
> When I tried this:
>
> t = now()
> a = []
> a[2] = 0
> for (i = 1; i < 2; i++) a.push(i)
> print now(t)
>
> t = now()
> a = []
> for (i = 1; i < 2; i++) a.push(i)
> print now(t)
>
> I found the first was about 5% faster than the second in both Java and
> HTML5. You could experiment yourself with that.
>
I got mixed results:

In Java the first one was much slower than the second one (210,142) in 
the first run. In subsequent runs the times were more similar (72,71; 
69,75; 69,70; 69,70).

In HTML5 the second one was always slightly faster (3277,3177; 
3248,3136; 3164,3146; 3632,3543; 3565,3419).

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


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

2015-12-17 Thread Rolf Huehne
On 12/17/2015 06:04 PM, Robert Hanson wrote:
> If I were to be able to read that back into Jmol it would need to be in
> JSON format. You would need to use:
>
> x = format("JSON",parsedData)
> write var x "t.json"
>
> and I am not certain that even then Jmol could read it,  but if it could,
> it would be by using
>
> y = eval(load("t.json"))
>
> Maybe you can experiment some, Rolf, and see what particular parsing
> actions lead to this slow down. Could be something that's fixable.
>
Thank you for the hint, Bob.
I have thought about using JSON format but couldn't find a way to read 
it in again in the documentation.
And besides I had a lot of trouble with the JSON format in another 
project (Javascript->JSON->Perl-CGI->Filesystem->Perl-CGI->Javascript). 
So I didn't try to dig deeper into it here.

In Java the import of the small dataset in JSON format does work fine.
The import of the full dataset is still running since several minutes. 
So it is much slower there than building the data structure from the TSV 
files.

In HTML5 in Firefox 42 on Linux I got the following error message when I 
tried to import the small dataset in JSON format:

- Error Message --
TypeError: b.lineNumbers is null try/catch path:
0 function (b,d)
  args[0]=TypeError: b.lineNumbers is null
  args[1]=function (){a.instantialize(this,arguments)}
1 JS.ScriptEval.evaluate(a,b,c)
  args[0]=   http://jenalib.fli-leibniz.de/ImgLibPDB/tmp/parsed_data-2015_12_17.zip).

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


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

2015-12-17 Thread Rolf Huehne
On 12/17/2015 07:28 PM, Robert Hanson wrote:
> On Thu, Dec 17, 2015 at 11:51 AM, Rolf Huehne <rhue...@leibniz-fli.de>
> wrote:
>
>>
>> - Error Message --
>> TypeError: b.lineNumbers is null try/catch path:
>> 0 function (b,d)
>>args[0]=TypeError: b.lineNumbers is null
>>args[1]=function (){a.instantialize(this,arguments)}
>> 1 JS.ScriptEval.evaluate(a,b,c)
>>args[0]= >args[1]=true
>>args[2]=false
>>
>
>
> That looks a lot like a "file not found" message to me.
>
You are right, Bob. I took the wrong Jmol-Viewer-Tab. The viewer is 
there on a web server and not loaded locally as I expected.
after changing the URL JSmol/HTML could load the small JSON file 
correctly (about 10 times slower than Java).
Since the Java version has still not finished loading the full dataset 
after about 90 minutes I don't think it makes sense to try it in the 
HTML5 version.

I also tried the local HTML5 version with the small JSON file but it 
loading the file was refused:

--- Error message -
TypeError: b.lineNumbers is null try/catch path:
0 function (b,d)
  args[0]=TypeError: b.lineNumbers is null
  args[1]=function (){a.instantialize(this,arguments)}
1 JS.ScriptEval.evaluate(a,b,c)
  args[0]=NS_ERROR_DOM_BAD_URI: Access to restricted URI denied
  args[1]=true
  args[2]=false
2 JS.ScriptEval.evaluateExpression(a,b,c)
  args[0]=NS_ERROR_DOM_BAD_URI: Access to restricted URI denied
  args[1]=true
  args[2]=false
3 JV.Viewer.evaluateExpressionAsVariable(a)
  args[0]=NS_ERROR_DOM_BAD_URI: Access to restricted URI denied
4 JS.MathExt.evaluateScript(d,a,b)
  args[0]=[JS.ScriptMathProcessor object]
  args[1]=Token[string(4/0x4) value="NS_ERROR_DOM_BAD_URI: Access to r...
  args[2]=134218253
5 JS.MathExt.evaluate(d,a,b,c)
  args[0]=[JS.ScriptMathProcessor object]
  args[1]=Token[keyword(13/0x800020d) value="eval"]
  args[2]=Token[string(4/0x4) value="NS_ERROR_DOM_BAD_URI: Access to r...
  args[3]=134218253
6 JS.ScriptMathProcessor.evaluateFunction(a)
  args[0]=134218253
7 JS.ScriptMathProcessor.addOpAllowMath(a,b,c)
  args[0]=Token[keyword(17/0x1011) value=")"]
  args[1]=true
  args[2]=0
8 JS.ScriptMathProcessor.addOp(a)
  args[0]=Token[keyword(17/0x1011) value=")"]
9 JS.ScriptExpr.parameterExpression(a,b,c,e,f,d,h,g,s,n)
  args[0]=2
  args[1]=9
  args[2]=[JS.ScriptMathProcessor object]
  args[3]=true
  args[4]=0
  args[5]=-1
  args[6]=1
  args[7]=null
  args[8]=null
  args[9]=false
---

Are there additional restrictions of HTML5 versus Java file loading that 
I forgot about?

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


Re: [Jmol-users] JSmol 14.4.1 - Javascript error messages in Firefox 42

2015-12-17 Thread Rolf Huehne
On 12/17/2015 12:27 AM, Robert Hanson wrote:
> Please do give that a try and report back if the "syntax error" message
> disappear. I had never made the connection that those were only when
> loading local files.
>
The syntax error messages I reported are all gone  in Firefox on MacOS X 
Mavericks and Linux after I added the setting to my page.

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] JSmol 14.4.1 - Javascript error messages in Firefox 42

2015-12-16 Thread Rolf Huehne
Hi all,

with JSmol/HTML5 I get a lot of Javascript error messages in Firefox 42 
on Linux if I load the page locally from the file system. The error 
messages don't occur in Chromium 31 or if the page is loaded from a web 
server.

Although JSmol still seems to work properly it seems especially strange 
to me that there are not only error messages for JSmol Javascript files 
but also for script files and data files loaded into JSmol (original 
path names are shortened):

== Script and data file error messages ==
Error: not well-formed
Source File: file:///jmol-14.4.1_2015.12.15/start_script.txt
Line: 1, Column: 2
Source Code:
# ### REQUIRES Jmol 14.3.16_2015.09.22 or later ###
---
Error: syntax error
Source File: file:///jmol-14.4.1_2015.12.15/load_script.txt
Line: 1, Column: 1
Source Code:
set windowCentered on;
---
Error: syntax error
Source File: file: annotations_1.txt
Line: 1, Column: 1
Source Code:
observation_id entry_id entry_type entry_name species
---


== JSmol file error messages  =
Error: syntax error
Source File: file:///jmol-14.4.1_2015.12.15/jsmol/j2s/JV/OutputManagerJS.js
Line: 1, Column: 1
Source Code:
Clazz.declarePackage ("JV");
---
Error: syntax error
Source File: file:///jmol-14.4.1_2015.12.15/jsmol/j2s/JV/OutputManager.js
Line: 1, Column: 1
Source Code:
Clazz.declarePackage ("JV");
---
Error: syntax error
Source File: 
file:///jmol-14.4.1_2015.12.15/jsmol/j2s/core/corescriptcmd.z.js
Line: 1, Column: 1
Source Code:
(function(X,Y,Z,$,aa,M,H,N,P,Q,I,R,S,ba,L,D,T,K,U,ca,V,da,ea,fa,ga,ha,ia,ja,ka,y,la,ma,na,oa,pa,qa,ra,sa,ta,ua,va,wa,xa,ya,za,Aa,Ba,Ca,Da,Ea,Fa,Ga,Ha,Ia,Ja,Ka,l,W){M("JS");c$=Q(function(){this.e=this.vwr=null;this.chk=!1;this.st=null;this.slen=0;P(this,arguments)},JS,"ScriptExt");l(c$,"init",function(a){this.e=a;this.vwr=this.e.vwr;return
 
this},"~O");l(c$,"atomExpressionAt",function(a){return 
this.e.atomExpressionAt(a)},"~N");l(c$,"checkLength",function(a){this.e.checkLength(a)},"~N");l(c$,"error",
---
Error: syntax error
Source File: 
file:///jmol-14.4.1_2015.12.15/jsmol/j2s/J/adapter/readers/cif/MMCifReader.js
Line: 1, Column: 1
Source Code:
Clazz.declarePackage ("J.adapter.readers.cif");
---
Timestamp: 12/16/2015 03:41:53 PM
Error: syntax error
Source File: 
file:///jmol-14.4.1_2015.12.15/jsmol/j2s/J/adapter/readers/cif/CifReader.js
Line: 1, Column: 1
Source Code:
Clazz.declarePackage ("J.adapter.readers.cif");
---
Error: syntax error
Source File: file:///jmol-14.4.1_2015.12.15/jsmol/j2s/JU/CifDataParser.js
Line: 1, Column: 1
Source Code:
Clazz.declarePackage ("JU");
---
Error: syntax error
Source File: 
file:///jmol-14.4.1_2015.12.15/jsmol/j2s/J/render/MeshRenderer.js
Line: 1, Column: 1
Source Code:
Clazz.declarePackage ("J.render");
---
Error: syntax error
Source File: file:///jmol-14.4.1_2015.12.15/jsmol/j2s/J/shape/Halos.js
Line: 1, Column: 1
Source Code:
Clazz.declarePackage ("J.shape");
---
Error: syntax error
Source File: 
file:///jmol-14.4.1_2015.12.15/jsmol/j2s/J/render/HalosRenderer.js
Line: 1, Column: 1
Source Code:
Clazz.declarePackage ("J.render");
---
Error: syntax error
Source File: 
file:///jmol-14.4.1_2015.12.15/jsmol/j2s/J/g3d/CircleRenderer.js
Line: 1, Column: 1
Source Code:
Clazz.declarePackage ("J.g3d");
---
Error: syntax error
Source File: 
file:///jmol-14.4.1_2015.12.15/jsmol/j2s/J/thread/MoveToThread.js
Line: 1, Column: 1
Source Code:
Clazz.declarePackage ("J.thread");
---

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


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

2015-12-16 Thread Rolf Huehne
On 12/16/2015 07:30 PM, Paul PILLOT wrote:
> Hi Rolf,
> my experience in this area is not JSmol related, but when I had to deal with 
> big tables in javascript (for a multiple sequence alignment script, aligning 
> 2 sequences of 5000 signs, requires at least 1 table of 5000 rows and 5000 
> columns), I noticed that :
> - using integers only tables is fastest
> - opting for one dimensional array instead of two dimensional didn’t make a 
> noticeable difference
> - using typed arrays in some cases improved significantly the performance ( 
> see https://developer.mozilla.org/en/docs/Web/JavaScript/Typed_arrays 
> <https://developer.mozilla.org/en/docs/Web/JavaScript/Typed_arrays> ). This 
> was 2 years ago, and the browsers’ engine landscape can be quickly moving...
> When you parse your data from your TSV file, are the fields stored as text ?
>
Most of the data is textual. It contains additional information for 
atoms that must be accessible similarly like the built-in atom 
properties. Since user-defined atom properties can only be numbers the 
data must be put into a separate data structure. And some of the data is 
also put into very specific helper hashes or arrays for faster access 
and processing.

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] Jmol scripting speed in JSmol/HTML5

2015-12-16 Thread Rolf Huehne
Hi all,

I am looking for some speedup tips for Jmol scripting in JSmol/HTML5.

The speed difference between JSmol/Java and JSmol/HTML5 for graphical 
operations like rotation and zooming seems to be about 10 times or less 
in Firefox and Chrome (if you don't consider the recent rotation speed 
problems in Chrome).

Unfortunately the difference for Jmol scripting seems to be much higher 
in my experience: about 50-70 times.

If I load for example 3 TSV (tab separated value) format files with 
overall about 34,000 lines, JSmol/Java needs about 26 seconds for 
laoding and parsing the data and putting it into a multi-level hash 
structure. JSmol/HTML5 needs about 1700 seconds instead.

I already tried to write the final data structure into a file with 
'write VAR ...' and read it in again as a script (after adding a proper 
variable assignment) but this already took in Java endlessly (I stopped 
waiting after more than an hour...).

Q: Does anyone have any other ideas that might speed up this process?

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


Re: [Jmol-users] Display/hide and multiple files

2015-12-09 Thread Rolf Huehne
On 12/09/2015 06:40 AM, Robert Hanson wrote:
> I could be convinced to add that as a bug fix -- that "display/hide "
> also works on only the current-model set of atoms.
>
You mean if 'selectAllModels = false'?
I would vote for that.

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


Re: [Jmol-users] Display/hide and multiple files

2015-12-08 Thread Rolf Huehne
On 12/08/2015 02:11 PM, Angel Herráez wrote:
> Rolf,
> maybe I'm being naïve but, Couldn't you use _modelNumber to limit the
> action of the display command?
>
The problem here is not that there doesn't exist ways to build atom 
expressions that would prevent changing the display state of atoms in 
frames from other loaded files. The problem is that it has to be applied 
to every display/hide command used by my interface or entered by a user. 
And because I wasn't aware of the problem when I developed the interface 
there would be needed a lot of changes needed. But the most important 
point would be the loss in user-friendliness.

Angel, your suggestion of using "_modelNumber" seems to be one of the 
more complicated ones because it is a composite number not directly 
available as atom property.
Bob's suggestion of using the (undocumented?) "_modelIndex" seems to be 
the simplest one. It doesn't totally reflect what I am after because it 
is not working file-based but model-based. But currently there are no 
files with multiple models involved, so it would be sufficient.

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


--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Setting selectAllModels breaks selection

2015-12-08 Thread Rolf Huehne
On 12/08/2015 01:39 AM, Robert Hanson wrote:
> Yes, that was a bug. I will get an update out tonight.
>
Bob, thanks for fixing it. I will try it when the fixed version is 
available.
> By the way,
>
> set selectAllModels FALSE
>
> may not be intuitive. It does not actually change the selection; it only
> filters the selection based on current frame. In some ways it is very odd.
>
> set selectallmodels true
> load $tylenol
> load append $caffeine
> select on atomno < 3
> print {selected}.count
>
> *4*set selectallmodels false
> show selected
>
>
> *N1/2.1 #1C2/2.1 #2*# because only model 2.1 is showing
> frame 1.1
> show selected
>
>
> *C1/1.1 #1C2/1.1 #2*
> # because we changed frames
>
> So the selection is changing when the model frame is changed. Rather odd.
>
Q: So does this mean that internally still the atoms in non-active 
frames are selected?

Q: And what does that mean for other commands like those that change 
rendering? Would they still act on the "internally" selected atoms in 
other frames?

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


--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Display/hide and multiple files

2015-12-08 Thread Rolf Huehne
On 12/08/2015 03:28 AM, Robert Hanson wrote:
> The problem is that these commands actually go in and change settings, not
> just the current selection. I suppose the following would do it:
>
> function displayModel(atoms, mode) {
>var a = {selected}
>select @atoms
>switch (mode) {
>case "add":
>  display add selected
>  break
>case "remove":
>  display remove selected
>  break
>   default:
>  if (selectAllModels) {
>display selected
>  } else {
>set selectAllModels true
>display displayed and modelIndex!=_modelIndex or selected
>set selectAllModels false
>  }
>  break
>}
>select @a
> }
>
> function hideModel(atoms, mode) {
>var a = {selected}
>select @atoms
>switch (mode) {
>case "add":
>  display remove selected
>  break
>case "remove":
>  display add selected
>  break
>   default:
>  if (selectAllModels) {
>hide selected
>  } else {
>set selectAllModels true
>hide hidden and modelIndex!=_modelIndex or selected
>set selectAllModels false
>  }
>  break
>}
>select @a
> }
>
> Just a few coding comments:
>
Thank you for the functions and the comments, Bob.

>>
>> - 'display' command substitution 
>> function getFileNumberList(atomBitset) {
>> if (atomBitset.type != "bitset") {
>>   atomBitset = {visible};
>> }
>
>
> You can use _arguments.count here:
>
>if (!_arguments) atomBitset = {visible}
>
> var fileNumberInfo = atomBitset.file.all.count();
>> var fileNumberList = [];
>>
>> if (fileNumberInfo.type == "array") {
>>   for (var i from [1, fileNumberInfo.size]) {
>> var fileNumber = fileNumberInfo[i].[1];
>> fileNumberList.push(fileNumber);
>>   }
>> }
>> return fileNumberList;
>> }
>>
>
> not sure I see the need for the above
>
Q: Is there a simpler way to get all first array elements out of an 
array of arrays?
Q: Or did you just mean that using '_modelIndex/modelIndex' would be 
easier? ( As I said earlier, 'file' reflects more properly what I want 
to achieve than 'modelIndex'.)

>
>
>
>> var atomExpressionUpperCase = ("" + atomExpression) % ;  #
>> convert to upper case
>>
>
> This isn't really necessary; for historical reasons, Jmol "==" testing is
> not case-sensitive. If you want it to be, you need to use LIKE instead of
> "=="
>
Q: And the same is true for 'case' in 'switch' statements, as the 
'displayModel' function above suggests?

>
>> if (atomExpressionUpperCase == "ADD" || atomExpressionUpperCase ==
>> "REMOVE") {
>>   print "ERROR: no atom expression provided in call of 'display'
>> command or keyword '" + atomExpressionUpperCase + "' provided as second
>> parameter instead of first";
>> } else if (atomExpressionUpperCase == "BONDS") {
>>   display BONDS;
>> } else {
>>   if (oneParameter == false) {
>>
>
> here I would use
>
>  if (keyword) {
>
> var keywordUpperCase = ("" + keyword) % ;  # convert to upper
>> case
>> if (keywordUpperCase == "ADD" || kewordUpperCase == "REMOVE") {
>>   atomExpression = keywordUpperCase + " " + atomExpression;
>>   display @atomExpression;
>>
>
> I don't see how that would work;
>
>
Q: Does that mean that multiple parameters cannot be supplied to a 
function in a single variable and it must have been 'display @keyword 
@atomExpression' or 'dummy=script("display " + atomExpression)'? Or did 
you mean something else?

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


--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Display/hide and multiple files

2015-12-08 Thread Rolf Huehne
On 12/08/2015 04:59 PM, Robert Hanson wrote:
> On Tue, Dec 8, 2015 at 9:02 AM, Rolf Huehne <rhue...@leibniz-fli.de> wrote:
>
>> On 12/08/2015 02:11 PM, Angel Herráez wrote:
>>> Rolf,
>>> maybe I'm being naïve but, Couldn't you use _modelNumber to limit the
>>> action of the display command?
>>>
>> The problem here is not that there doesn't exist ways to build atom
>> expressions that would prevent changing the display state of atoms in
>> frames from other loaded files. The problem is that it has to be applied
>> to every display/hide command used by my interface or entered by a user.
>> And because I wasn't aware of the problem when I developed the interface
>> there would be needed a lot of changes needed. But the most important
>> point would be the loss in user-friendliness.
>>
>
> so
>
> set selectAllModels false
>
> takes care of all that, right?
>
For selection expressions it seems to take care of most cases. (I 
couldn't test it yet because the bug fix version isn't available yet.)
If there would later also be multi-model files involved then there might 
still be a problem because it doesn't seem to work as expected if 
multiple models (from the same file) are active. But I don't know if 
this ever will be the case for my new interface.

Q: Does the 'selectAllModels' setting act in all situations where an 
atom expression is involved or are there other exceptions (like 
'display/hide' in some way)?

If I have not overlooked anything else, in combination with the 
replacement 'display/hide' functions it should enable what I would like 
to achieve.

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


--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Setting selectAllModels breaks selection

2015-12-07 Thread Rolf Huehne
On 12/07/2015 02:39 PM, Rolf Huehne wrote:
> Hi Bob,
>
> it seems that running the command 'set selectAllModels FALSE' breaks the
> atom selection in Jmol 14.4.0_2015.11.06 if multiple files are loaded.
> Afterwards any 'select' command results in zero atoms selected, even
> after 'set selectAllModels TRUE'.
>
> If only a single file with multiple models is loaded, selection still
> works afterwards.
>
> --- Example ---
> load =1co1;
> select all;
> set selectAllModels FALSE;
> frame 2;
> select all;
> load =1deh;
> select all;
> ---
>
Sorry, I forgot the "APPEND" in the example:

   load APPEND =1deh;

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


--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] Display/hide and multiple files

2015-12-07 Thread Rolf Huehne
Hi all,

I started working with loading multiple files simultaneously in Jmol. 
The reason is mainly to be able to switch very fast between different 
structures and not to display them simultaneously.

For selections the setting 'set selectAllModels FALSE' will be able to 
help to prevent unwanted selections in other loaded structures while 
working with one of them (after the bug there is removed, see other thread).
But I ran into a problem with the 'display/hide' commands because they 
always act on all loaded structures and I couldn't find a way to prevent 
this.

Q: Is there a simple way to prevent this?

If not, it would be very helpful if an option similar to 'set 
selectAllModels FALSE' would be avilable.

I tried to build replacement functions for 'display' and 'hide' (see 
below) but one problem there is that 'display BONDS' always acts on all 
bonds in all structures and I couldn't find a way to prevent this.

Another problem is that I havn't understood the syntax of 'display 
[{default: ...}]' from the scripting documentation so that I couldn't 
even try to mimic it yet.

And a disadvantage is that I would always have to monitor the 
'display/hide' commands in future versions for any changes like 
additional keywords and check if my replacements still work as expected 
or if they must be expanded.

- 'display' command substitution 
function getFileNumberList(atomBitset) {
   if (atomBitset.type != "bitset") {
 atomBitset = {visible};
   }
   var fileNumberInfo = atomBitset.file.all.count();
   var fileNumberList = [];

   if (fileNumberInfo.type == "array") {
 for (var i from [1, fileNumberInfo.size]) {
   var fileNumber = fileNumberInfo[i].[1];
   fileNumberList.push(fileNumber);
 }
   }
   return fileNumberList;
}

function display(keyword, atomExpression) {
   var oneParameter = false;
   if (atomExpression == "") {  # only one parameter?
 atomExpression = keyword;
 oneParameter = true;
   }
   var atomExpressionUpperCase = ("" + atomExpression) % ;  # 
convert to upper case
   if (atomExpressionUpperCase == "ADD" || atomExpressionUpperCase == 
"REMOVE") {
 print "ERROR: no atom expression provided in call of 'display' 
command or keyword '" + atomExpressionUpperCase + "' provided as second 
parameter instead of first";
   } else if (atomExpressionUpperCase == "BONDS") {
 display BONDS;
   } else {
 if (oneParameter == false) {
   var keywordUpperCase = ("" + keyword) % ;  # convert to upper 
case
   if (keywordUpperCase == "ADD" || kewordUpperCase == "REMOVE") {
 atomExpression = keywordUpperCase + " " + atomExpression;
 display @atomExpression;
   } else if (keywordUpperCase == "BONDS") {
 print "ERROR: no atom expression allowed for keyword 'BONDS' in 
command 'display'";
   }
 } else {
   var fileNumberList = getFileNumberList;
   atomExpression = "(displayed and file!=fileNumberList) or " + 
atomExpression;
   display @atomExpression;
 }
   }
}
-

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


--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Zoom calculation

2015-12-05 Thread Rolf Huehne
Am 05.12.15 um 13:49 schrieb si...@publcif.co.uk:
> Curiously this showed that the 'rotate best' needed to be done first
> (before the initial zoom) otherwise the coordinates did not reflect
> the rotated model.
> Perhaps the subsequent zoom forces a refresh...
>
It seemed to work at least for my example '1DEH' also the other way 
round. Otherwise it must have been cropped because the initial view is 
quadratic and after rotate best one side is about twice as large as the 
other.
Simon, can you name an example were it didn't work for you?

Regards,
Rolf

--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Zoom calculation

2015-12-05 Thread Rolf Huehne
Am 05.12.15 um 19:49 schrieb Robert Hanson:
> I find that JmolData does not work as expected and requires a bug fix to
> get this work. Not sure why/how it is working for you both. I have had
> to fix JmolData.jar to make the following work:
>
> // script t3.spt
>
> function getScreenBoundary(atomSet)  {
>refresh
>return [atomSet.sx.all.min, atomSet.sx.all.max,
>atomSet.sy.all.min, atomSet.sy.all.max]
> }
>
Yes, this bug was the reason why I proposed the slower method: the 
'point' function did work in 'JmolData.jar' but not '.sx'.

Regards,
Rolf

--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Zoom calculation

2015-12-04 Thread Rolf Huehne
Am 04.12.15 um 18:47 schrieb si...@publcif.co.uk:
>
> Thanks for this Angel
>
> My task was to effectively "crop" the model so that a static image
> could be created that was as large as possible with respect to the
> model, but also exactly reflected what would be seen in the applet -
> i.e. the static image could be used in e.g. a PDF but scaled to a
> 'thumbnail' size, but still had minimal margins and still represented
> what the associated applet would show.
>
> Anyway, a script such as:
>
> zoom {visible} 0;
> rotate best;
> refresh;
> margin=15;
> c=0;
> while ({visible}.sx.all.max < _width-margin && {visible}.sx.all.min >
> margin && {visible}.sy.all.max < _height-margin &&
> {visible}.sy.all.min > margin ) {
>zm=100+c;
>zoom {visible} @zm;
>refresh;
>c=c+1;
>if (c>100) {break;}
> }
> echo @c;
>
> achieves this nicely and shows that in many cases there is room for a
> zoom of 130+ percent.
>
> Unfortunately, however, the script requires calling 'refresh' in order
> to update
> the screen coordinates of the model (.sx, .sy), which it seems is not
> possible when running the script from the command line to generate a
> static image (i.e. running the jmol application with -ionx and the
> script contained in an spt file) - which is essential to my task,
> which involves automated production of print content and html content
> without user intervention.
>
> So at the moment I'm left with having to 'crop' the static images for
> print use and reproducing the 'crop' effect in the html versions - not
> a major problem, but it would have been nice to have just had the one
> image with the load script embedded, etc., which could then be used
> for print and html...
>
> Anyway, if anyone has any suggestions regarding running the jmol
> application 'headless' with scripts that appear to require an 'event
> loop' I'd be very grateful...
>
The 'point({x,y,z},true)' function to calculate the screen coordinates 
does work headless in Jmol 14.4.0. So you can determine the minima and 
maxima in a loop (startZoom set to '80' for testing):

 scriptfile 'autozoom.spt' 
startZoom = 80
zoom {visible} @startZoom;
rotate best;
margin=15;
c=0;

function getScreenBoundary(atomSet) {
   if (atomSet.type == "bitset") {
 var screenMinX = "";
 var screenMaxX = "";
 var screenMinY = "";
 var screenMaxY = "";
 for (var i from [1 atomSet.size]) {
   var screenXYZ = point(atomSet[i].xyz, true);
   if (screenMinX == "") {
 screenMinX = screenXYZ.x;
 screenMaxX = screenXYZ.x;
 screenMinY = screenXYZ.y;
 screenMaxY = screenXYZ.y;
   } else {
 screenMinX = [screenMinX, screenXYZ.x].min;
 screenMaxX = [screenMaxX, screenXYZ.x].max;
 screenMinY = [screenMinY, screenXYZ.y].min;
 screenMinY = [screenMinY, screenXYZ.y].min;
   }
 }
 return [screenMinX, screenMaxX, screenMinY, screenMaxY];
   }
}

sxInfo = getScreenBoundary({visible});
while (sxInfo[2] < _width-margin && sxInfo[1] > margin && sxInfo[4] < 
_height-margin && sxInfo[3] > margin ) {
   zm=startZoom+c;
   zoom {visible} @zm;
   c=c+1;
   if (c>100) {break;}
   sxInfo = getScreenBoundary({visible});
}
print "c=" + c;

-- Headless Jmol call 
java -jar JmolData.jar -g800x800 -J 'load =1deh; script "autozoom.spt"; 
write PNGJ 9 "autozoom-test.png";'
--

Regards,
Rolf


--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Zoom calculation

2015-12-03 Thread Rolf Huehne
On 12/03/2015 03:52 PM, si...@publcif.co.uk wrote:
> Thanks Bob - just what I needed
>
> (Note to self - read the documentation thoroughly! :-)
>
Is this really documented?

I couldn't find it in the scripting documentation.

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


--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] draw a circle across multiple models

2015-12-02 Thread Rolf Huehne
On 12/02/2015 05:32 PM, Spinney, Richard wrote:
> I am trying to draw a circle and have it persist  across all of the frames in 
> an animation, but cannot get it to work, it always disappears on the second 
> frame of the animation. What is the correct syntax for this?
>
As far as I know, 'draw' objects are attached to the active frames when 
they were created.

So it should work if you first activate all frames:

   frame all;
   draw ...

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


--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] Surfaces off changes selection

2015-11-30 Thread Rolf Huehne
Hi all,

I just noticed that in Jmol 14.4.0_2015.11.06 the popup menu entry 
"Surfaces -> off" changes the current selection and selects all atoms.

I would consider this rather as a bug than a feature because the 
selection change occurs quite unexpected.

What do you think?

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


--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] Custom menu from variable

2015-11-30 Thread Rolf Huehne
Hi all,

is it possible to load a custom menu from a variable instead of a file?

I tried the same syntax as for loading a model from a variable ('load 
menu "@customMenu"'), hoping that it might work, but unfortunately it 
didn't.

The default menu adapts automatically to the loaded model. I would like 
to have the same for the custom menu parts. In a browser it would 
require a user interaction to write a new menu file. So having to write 
a file first each time would rather be unpleasant for a user.

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


--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Surfaces off changes selection

2015-11-30 Thread Rolf Huehne
On 11/30/2015 07:48 PM, Robert Hanson wrote:
> It's because the script run is:
>
> "mo delete;isosurface delete;select *;dots off"
>
Yes. The question is if it should rather be like this:

"mo delete; isosurface delete; currentSelection={selected}; select *; 
dots off; select @currentSelection; reset currentSelection"

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


--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] A first JSmol page

2015-11-30 Thread Rolf Huehne
On 11/30/2015 12:38 PM, Germain Salvato Vallverdu wrote:
> Hello
>
> I try to do my first JSmol page.
>
> Following the wiki page about JSmol I uploaded the JSmol.min.js file and 
> java/ and j2s/ folders in a folder called jmol/ at the root of my web page. 
> Thus, my first question is, is that ok, or do I need something more ?
>
> Next, I added a call to JSmol.min.js :
> 
>
> I load an Info variable in the header :
>
>  var Info = {
>color: "#EE",
>height: 500,
>width: 500,
>use: "HTML5",
>j2sPath: "/jmol/j2s",
>jarPath: "/jmol/java",
>jarFile: "JmolAppletSigned0.jar",
>isSigned: true,
>disableInitialConsole: true
>  };
>
>
> Then in the body I put :
> 
>  
>Info["script"] = "load AX2.xyz";
>Jmol.getApplet("AX2", Info);
>jmolBr();
>jmolButton("measures delete", "Effacer les mesures");
>  
> 
>
> But it does not work. Actually, I am looking for a minimal example of a JSmol 
> page. My page is there : 
> http://gvallver.perso.univ-pau.fr/vsepr/jsmoltest.html
>
Germain, the path for 'JSmol.min.js' is not set correctly in your HTML code.
The HTML codes requests to look here:
http://gvallver.perso.univ-pau.fr/vsepr/JSmol.min.js

But actually it is here:
  http://gvallver.perso.univ-pau.fr/jmol/JSmol.min.js

So you would need in the '' section:

   

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


--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] using variables calculated in a loop in DRAW or CGO

2015-11-25 Thread Rolf Huehne
On 11/25/2015 12:32 PM, Angel Herráez wrote:
> Hi Jmolers
>
> I'd like to use a loop to define a series of points (using atom expressions)
> and then use that series to draw a polyline.
>
> No problem in defining the series of points.
> But then I need to pass them to either
>   DRAW myline diameter 0.3 curve 
> or to the VERTEX components of the  CGO  command
>
> I don't seem to figure out how the points (stored in Jmol variables) may be
> passed to the command
>
> Example:
> tt = "draw eje diameter 0.3 curve"
> for (i=2;i<=18;i++) { tt += "{(" + i + "," + (120-i) + ") & *.C1'}" }
> show @tt
>
> produces what I need, but that "tt" is a text string, not a command
>
> Example:
> p = array()
> for (i=2;i<=18;i++) { p[i] = "{(" + i + "," + (120-i) + ") & *.C1'}" }
> show @p
>
> Again, how to pass that to the cgo command?
>
If you have already the command string you could just run it with the 
'script' command (not tested):

x = script(tt);
y = script(p);

The assignement to a variable is essential, even for script commands 
that produce graphical output.

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


--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] slowness in first glance

2015-11-20 Thread Rolf Huehne
On 11/20/2015 12:40 PM, GABRIEL PONS IRAZAZABAL wrote:
> Eric/Bob,
> Its a Little weird that the rotation for the same molecule with JSmol (no 
> java) is excellent using proteopedia but very slow using the interface 
> firstglance. Even with the popup tool and extending the molecule through the 
> whole screen the rotation is excellent.
> In my opinion (I am using chrome) this is a not a trivial problem, especially 
> using big proteins
> Any explanation?
There are two differences I noticed which affect rotation speed for 
example entry 1EMA:

1) In proteopedia the 'platformspeed' setting is "5" and in FirstGlance 
it is "10". Setting it to "5" also increases rotation speed for me in 
FirstGlance, especially with high quality rendering.

2) In FirstGlance there are additionally rendered two large "baskets" 
for missing residues. These are actually isosurfaces and significantly 
slow down rotation in JSmol/HTML5. If I switch them off in the console 
with the command 'isosurface * off' rotation speed increases for me.

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


Re: [Jmol-users] PNGJ loading bug in OS X

2015-11-17 Thread Rolf Huehne
On 11/17/2015 12:57 AM, Eric Martz wrote:
> This bug may not be worth fixing since it is specific to OS X, and may
> be a bug in Java.
>
> Using either the Java applet, or the Jmol application, the command
>
> write "test.pngj"
>
> saves a file that contains the atomic coordinates and the state of Jmol.
>
> In *OS X*, dropping the PNGJ into the application *works* PROVIDED the
> application happens to have *exactly the same pixel height and width* as
> the image (which is the size of the Jmol from which it was saved).
>
> If the recipient Jmol application has a *different size*, an "Input"
> dialog opens asking to confirm changing the size of Jmol (or you can
> specify different height and width values). In Windows, this sizing
> dialog works. In OS X, once that "Input" dialog opens, *Jmol hangs* and
> has to be forced to quit by the system.
>
On my system with OS X 10.9.5 Mavericks and Java 1.8.0_25 the Jmol 
application doesn't hang after closing the dialog.

> (For Windows, a size mismatch between the applet and the PNGJ doesn't
> matter. The molecule renders in the size of the applet without asking.)
>
> In *OS X*, dropping the PNGJ file into the *applet* does not load it
> into the applet. Rather, it displays the image in the PNGJ file (in
> Firefox) or the drop fails (in Safari).
>
The behaviour on my system is identical.

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


Re: [Jmol-users] Help to put Jmol on server for multi-GIF

2015-11-16 Thread Rolf Huehne
On 11/16/2015 08:24 PM, Eric Martz wrote:
> Bob has said that the signed Jmol_s Java applet will NOT be able to
> write files to the local disk.
>
Eric, do you mean the signed Java applet with the "unsigned" privileges 
only (which was the unsigned applet in the past) or with the full 
"signed" privileges?
With full priviliges saving should work.

Have you actually tried yet if it works or not?

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


--
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a 
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


  1   2   3   4   5   6   7   8   >