Opened 8 years ago

Closed 7 years ago

#16003 closed enhancement (duplicate)

update Jmol spkg to support pure javascript 3-D in notebook...

Reported by: gutow Owned by: gutow
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: packages: standard Keywords: Jmol 3D 3-D
Cc: kcrisman, novoselt, strogdon, fbissey Merged in:
Authors: Reviewers: Volker Braun, Karl-Dieter Crisman
Report Upstream: N/A Work issues:
Branch: u/kcrisman/jmol (Commits, GitHub, GitLab) Commit: f8ba6aa8fbc645a3d909fd8558bd1b8437daf5f9
Dependencies: #16004 Stopgaps:

Status badges

Description (last modified by gutow)

Update Jmol to Jmol-14.0.13 which supplies the JSmol pure javascript version of Jmol. Utilizing this requires significant changes to how the notebook utilizes Jmol/JSmol. The notebook changes are in ticket #16004.

In addition to the updates to the new-style SPKG, the tar.gz from Jmol needs to be renamed before it matches the Sage standards. The Jmol project distributes a large number of different archives. The appropriate one for this SPKG is the Jmol-14.0.13-binary.tar.gz, which needs to be renamed to jmol-14.0.13.tar.gz (note the lower case "j"). The Jmol archive can be downloaded using this direct link Jmol-14.0.13-binary.tar.gz. Rename and place in "upstream" directory.

This will break the current Jmol in the notebook as a serious reorganization of supporting files was required to support both java and javascript live 3-D.

After adding the new jmol-14.0.13.tar.gz to the upstream directory checkout this ticket and install the package.

$./sage -dev checkout --ticket 16003
$ ./sage -f jmol 

To test you will need the updates to the notebook as well.

Change History (47)

comment:1 Changed 8 years ago by gutow

  • Description modified (diff)

comment:2 Changed 8 years ago by gutow

  • Branch set to u/gutow/ticket/16003
  • Created changed from 03/24/14 00:42:12 to 03/24/14 00:42:12
  • Modified changed from 03/24/14 01:05:47 to 03/24/14 01:05:47

comment:3 Changed 8 years ago by gutow

  • Commit set to e417d3bf2621757a681b6031bcd14f9278112588
  • Owner changed from (none) to gutow

New commits:

e417d3bJmol/JSmol to 14.0.11

comment:4 Changed 8 years ago by gutow

  • Status changed from new to needs_review

comment:5 Changed 8 years ago by kcrisman

  • Cc kcrisman novoselt strogdon added; krisman nosvelt strongdon removed

comment:6 Changed 8 years ago by chapoton

  • Status changed from needs_review to needs_work

some typos : "privides" and "supposted"

comment:7 Changed 8 years ago by git

  • Commit changed from e417d3bf2621757a681b6031bcd14f9278112588 to 049657fefc6e38d6d0fb2b608766f6a991ec31f6

Branch pushed to git repo; I updated commit sha1. New commits:

049657ftypo fixes to Jmol/SPKG.txt

comment:8 Changed 8 years ago by gutow

  • Status changed from needs_work to needs_review

comment:9 Changed 8 years ago by gutow

  • Description modified (diff)

comment:10 Changed 8 years ago by gutow

  • Description modified (diff)

comment:11 Changed 8 years ago by kcrisman

Of course, on Macs

The appropriate one for this SPKG is the Jmol-14.0.11-binary.tar.gz, which needs to be renamed to jmol-14.0.11.tar.gz (note the lower case "j").

doesn't really do that much, since it is only fictively case-sensitive :-)

Okay, trying to look into this between much grading and other stuff.

comment:12 Changed 8 years ago by kcrisman

  • Dependencies set to #16004
  • Description modified (diff)

comment:13 Changed 8 years ago by kcrisman

I should point out that the command-line Jmols work just fine with this; it's the notebook piece that requires more review (as well as testing on some other platforms).

comment:14 Changed 7 years ago by git

  • Commit changed from 049657fefc6e38d6d0fb2b608766f6a991ec31f6 to a89ac4b915eacc65674eee5b8e16d0b6cbe1a5aa

Branch pushed to git repo; I updated commit sha1. New commits:

f9e55eeupdate Jmol/JSmol popup menu to include file actions
a89ac4bupdate Jmol/JSmol to version 14.0.13

comment:15 Changed 7 years ago by gutow

  • Description modified (diff)

comment:16 Changed 7 years ago by gutow

  • Description modified (diff)

comment:17 follow-up: Changed 7 years ago by strogdon

Minor item. It appears jmol version and release date are hardcoded somewhere, probably in SageMenu.mnu and I guess should be changed to 14.0.13 and whatever the appropriate release date is. I see this when right-clicking on a live jmol and mousing to About -> Jmol

comment:18 Changed 7 years ago by fbissey

  • Cc fbissey added

comment:19 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:20 follow-up: Changed 7 years ago by chapoton

  • Branch changed from u/gutow/ticket/16003 to public/ticket/16003
  • Commit changed from a89ac4b915eacc65674eee5b8e16d0b6cbe1a5aa to f74866eefd1af61e0c87cb9337f43ab0c32fac4f

Hello,

I have rebased on 6.3.rc1.

By the way, in #12212, I have asked the jmol team for a change to handle colored surfaces. Maybe it would be worth waiting for that, if this does not takes too long.


New commits:

f74866eRebased on 6.3.rc1

comment:21 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:22 in reply to: ↑ 20 Changed 7 years ago by kcrisman

By the way, in #12212, I have asked the jmol team for a change to handle colored surfaces. Maybe it would be worth waiting for that, if this does not takes too long.

Referring to this comment.

comment:23 Changed 7 years ago by kcrisman

See comment:54:ticket:12212 where

Later this week it will appear in Jmol 14.2.5.

So probably this one could be even further updated in time for Sage 6.4, which has started its cycle.

comment:24 follow-up: Changed 7 years ago by chapoton

According to Robert Hanson, the 18th of August 2014,

the change useful for #12212 is now in Jmol 14.3.6 here :

https://sourceforge.net/projects/jmol/files/Jmol-beta/Jmol%2014.3/Jmol%2014.3.6/

(which seems to be a beta version).

comment:25 in reply to: ↑ 24 Changed 7 years ago by kcrisman

According to Robert Hanson, the 18th of August 2014,

the change useful for #12212 is now in Jmol 14.3.6 here :

https://sourceforge.net/projects/jmol/files/Jmol-beta/Jmol%2014.3/Jmol%2014.3.6/

(which seems to be a beta version).

Given that #12212 maybe still needs a tiny bit of care and that probably the jmol support should be a separate ticket, maybe it's easier to just review this "as is".

comment:26 in reply to: ↑ 17 ; follow-up: Changed 7 years ago by kcrisman

Minor item. It appears jmol version and release date are hardcoded somewhere, probably in SageMenu.mnu and I guess should be changed to 14.0.13 and whatever the appropriate release date is. I see this when right-clicking on a live jmol and mousing to About -> Jmol

You are correct, that will have to be hand-edited whenever we decide the final version here.

Also, this needs to be updated for #14364 now, it seems. I made the change to my local one but I'm not sure if I made a mistake in merging this one - I'm surprised it showed up again for some reason.

comment:27 Changed 7 years ago by kcrisman

I see what happened - chapoton rebased with keeping the testjava.sh stuff in spkg-install but we don't need that any more.

comment:28 Changed 7 years ago by kcrisman

  • Branch changed from public/ticket/16003 to u/kcrisman/jmol
  • Commit changed from f74866eefd1af61e0c87cb9337f43ab0c32fac4f to 0071f18d8274f04a7551fb69f87a6a4e0638af85

I hope I didn't screw this up.


New commits:

8d0bd28Merge branch 'public/ticket/16003' of trac.sagemath.org:sage into jsmol
0071f18Remove unnecessary testjava.sh test

comment:29 in reply to: ↑ 26 Changed 7 years ago by kcrisman

Hi strogdon,

Minor item. It appears jmol version and release date are hardcoded somewhere, probably in SageMenu.mnu and I guess should be changed to 14.0.13 and whatever the appropriate release date is. I see this when right-clicking on a live jmol and mousing to About -> Jmol

You are correct, that will have to be hand-edited whenever we decide the final version here.

Weirdly, I do not see this problem when using a Jmol (from command line, of course) - it seems to acquire the correct info from system itself. So in principle we don't even have to change this.

I think this is ready for positive review as long as it actually applies properly, and of course pending #16004 or some variant thereof.

comment:30 Changed 7 years ago by chapoton

Latest available version is now Jmol-14.2.4_2014.08.03-binary.tar.gz

at http://sourceforge.net/projects/jmol/files/Jmol/Version%2014.2/Version%2014.2.4/

comment:31 Changed 7 years ago by kcrisman

Latest available version is now Jmol-14.2.4_2014.08.03-binary.tar.gz

Do you see any substantive differences between this and that? (I assume it doesn't have the #12212 change in any case.)

Weirdly, I do not see this problem when using a Jmol (from command line, of course) - it seems to acquire the correct info from system itself. So in principle we don't even have to change this.

This is about SageMenu.mnu - in the notebook Jmols it also finds this info fine until we switch to the custom one, very weird. I'm trying to figure out where that .mnu file is defined but the one at the Jmol website is clearly several (major) versions out of date.

Ah, found it - local/share/jsmol/j2s/core/coremenu.z.js. Naughty! But even the untranslated local/share/jsmol/js/coremenu.js seems to be getting this info dynamically in some way I'm not going to figure out immediately. So I'm going to do the easy fix to that for now.

comment:32 Changed 7 years ago by git

  • Commit changed from 0071f18d8274f04a7551fb69f87a6a4e0638af85 to f8ba6aa8fbc645a3d909fd8558bd1b8437daf5f9

Branch pushed to git repo; I updated commit sha1. New commits:

f8ba6aaupdate version of Jmol to Jonathan's last spkg

comment:33 Changed 7 years ago by vbraun

"unzip" is not one of our build-time dependencies so far: http://www.sagemath.org/doc/installation/source.html#general-requirements I'm not terribly concerned about that one, but this is why I went a different route in #17020. But if you want to require unzip then it should be documented.

Why does this ticket depend on #16004? We should merge the jmol update asap, no need to wait as long as it doesn't break something that is currently working. Anything related to jsmol can then be dealt with in #16004 if necessary.

comment:34 Changed 7 years ago by kcrisman

As the description points out:

This will break the current Jmol in the notebook as a serious reorganization of supporting files was required to support both java and javascript live 3-D.

To say this more clearly, I believe the new jmol interface uses js even for Java applets when used on the web (not command line), so one would have to reorganize in any case. Also, I don't know that there are enough other goodies to make the Jmol update worthwhile, per se.

comment:35 Changed 7 years ago by chapoton

Well, new features in Jmol would be needed for #12212, but it requires Jmol 14.2.5.

comment:36 follow-ups: Changed 7 years ago by vbraun

The notebook jmol viewer is working with #17020, and I suspect it is also working with this ticket. Of course not in chrome, which has by now permanently kicked the old java applet to the curb. Works in firefox with the icedtea plugin, though.

Unless somebody objects I would propose that we make a modified tarball that does not require unzip, that is, by re-packing the upstream tarball.

Frederic, it seems that 14.2.5 is not out yet? Since you seem to know upstream, maybe you can suggest that they put jsmol uncompressed inside their archive, and not a zip-with-tar file.

comment:37 Changed 7 years ago by chapoton

Yes, the changes for #12212 are not yet in a release, they are in fact in there:

http://sourceforge.net/projects/jmol/files/Jmol-beta/Jmol%2014.3/Jmol%2014.3.6/

I am not sure to know "upstream". I have had a private mail exchange about #12212 with somebody who was very reactive and efficient, and had the power to include changes in the latest jmol beta. I can give you his name and mail if you send me a private mail.

comment:38 in reply to: ↑ 36 Changed 7 years ago by kcrisman

The notebook jmol viewer is working with #17020, and I suspect it is also working with this ticket. Of course not in chrome, which has by now permanently kicked the old java applet to the curb. Works in firefox with the icedtea plugin, though.

Huh, that's surprising, Jonathan made it sound like the interface had changed enough that it wouldn't. We're even having trouble with icedtea here at AIMS in any case :-(

Unless somebody objects I would propose that we make a modified tarball that does not require unzip, that is, by re-packing the upstream tarball.

That seems reasonable; Jonathan, did you have a reason for including that? Maybe it's just because that's how upstream packages it...

comment:39 in reply to: ↑ 36 Changed 7 years ago by strogdon

Replying to vbraun:

The notebook jmol viewer is working with #17020, and I suspect it is also working with this ticket. Of course not in chrome, which has by now permanently kicked the old java applet to the curb. Works in firefox with the icedtea plugin, though.

Maybe I misunderstand but just upgrading jmol as in #17020 without doing anything else break jmol in the notebook here. This is with firefox and either icedtea or oracle plugin.

comment:40 Changed 7 years ago by vbraun

As far as I understand, the 14.3.x series is the current beta and 14.2.x is the stable branch. E.g. look at the SF download page http://sourceforge.net/projects/jmol/files/

comment:41 follow-up: Changed 7 years ago by vbraun

Also, why is

+ * JVM (java virtual machine) on the server.

added to the dependencies?

comment:42 Changed 7 years ago by vbraun

Ok, I can confirm that the jmol upgrade does not work with the current notebook. I must have had the wrong version installed.

comment:43 in reply to: ↑ 41 Changed 7 years ago by gutow

Replying to vbraun:

Also, why is

+ * JVM (java virtual machine) on the server.

added to the dependencies?

Tried to answer this a few days ago, but it didn't go through. The JVM allows the server to run a headless version of Jmol to generate high quality static images. If the JVM is not available things default to the lower quality Tachyon images (with some work those cold be made better). The other reason to keep this is that if I ever finish sorting out the issues caused by the attempts to kill Java applets in browsers, I can begin to utilize this server-side engine to make much more efficient and adaptable packages of data to send to the browser for viewing.

comment:44 Changed 7 years ago by vbraun

But its still not a build requirement for jmol, right? Only a (optional) runtime dependency of sagenb.

comment:45 Changed 7 years ago by vbraun

  • Milestone changed from sage-6.4 to sage-duplicate/invalid/wontfix

I propose to close this ticket as duplicate of #17020. I imported all commits there, but switched to the different packaging that does not require unzip.

comment:46 Changed 7 years ago by kcrisman

  • Authors gutow deleted
  • Reviewers set to Volker Braun, Karl-Dieter Crisman
  • Status changed from needs_review to positive_review

Sure, no problem, that makes perfect sense, as long as #17020 works out fine :-)

comment:47 Changed 7 years ago by vbraun

  • Resolution set to duplicate
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.