I've completed a first pass at an enhanced Jmol interface.
Instructions for setting this up on a test server are near the bottom
of this message. I think its an improvement, but needs work. Next, I
intend to focus my next effort on the file generated by the server.
Then I will come back to more interface enhancements.
The following is complete in a crude way (no buttons or menus, just
1) Resize applet to a few predefined sizes or open in a resizable
2) Number of simultaneously open applets is now limited (presently the
default is maximum of 4 applets. Others are put to sleep and replaced
with an image. Rather than number of applets it might be better to
base on total number of pixels (I'm guessing about 2e6 is a good
3) A brief help file is now provided (needs to be expanded).
1) set the default size to a more appropriate 250 px (right now I'm
overriding the defaults as I haven't yet backtracked to where the size
is appended to the .jmol filename).
2) Add loading of second copy of surface as black mesh to overlay on
3) Put something appropriate in the caption string. Maybe make the
caption an editable text box?
4) Fix the file that is generated by SAGE. It appears that it is not
handled well by all browsers, so Jmol cannot always read it. In
particular I see a problem with Firefox on MacOS. May need to have a
number of separate files rather than a .zip archive.
5) Add advanced options for changing the lighting orientation, colors,
etc... This might be best done through the applet pop-up menu. We
should be able to add anything people want easy access to, like color
changes, translucency and apply it to selected surfaces.
6)Add saving of last Jmol size and orientation to the saving of a
worksheet. This will probably require saving a Jmol state script to
7) Need to properly readjust the jmolStatus structure if a single cell
containing Jmol is deleted from a page. Already handling clearing all
output. Other option is to try to construct this information on the
fly. Unfortunately, I kept running up against the asynchronous nature
of communication with the server.
8) Add text labels to the axes so that we know which variable goes
with which axis.
What was changed:
1) Upgraded to jmol 11.8.8 (also put all the jmolApplet0_<part_id>.jar
files into the applet directory. This allows Jmol to only load the
parts of the applet that are needed, saving bandwidth, memory and
2) Extensively rewrote jmol_lib.js.
3) Fixed some applet naming bugs in Jmol.js
4) Made the following change to cell.py
**default size parameter set to 250 not 500.
5) Made the following change to notebook_lib.js
**Added a call to jmol_delete_all_output();
I rolled a .zip file which can be used to modify an existing 4.2
installation. It contains a number of directories and files. Install
as listed below:
"jmol" is a directory which should replace "sage/local/lib/python2.6/
"cell.py" should replace "sage/local/lib/python2.6/site-packages/
sagenb/notebook/cell.py". Don't forget to delete "cell.pyc" to force
an update when the server is restarted.
"jmol_lib.js" should replace "sage/local/lib/python2.6/site-packages/
"notebook_lib.js" should replace "sage/local/lib/python2.6/site-
The zip file may be downloaded at the following link:
Let me know what you think.