Jmol developers,

In case you regularly download the Jmol source, I just thought I would let you know that I did some major refactoring today. This is in preparation for a full port to JavaScript, which I think I now know how to do. Basically what I have done is to repackage the "shape renderers" -- the part of the code that sets up all the drawing -- into separate packages from the code that maintains the shapes themselves. In addition,  I've abstracted out all the parts of the graphics engine (g3d) that are specific to pixel-based raster graphics (what we do now). So what that means is that we now have these basic core packages:

org.jmol.adapter  -- all the file reading
org.jmol.modelset -- the collection of atoms and bonds and "models"
org.jmol.shapexxxx -- all the shapes (balls, sticks, stars, cartoons, isosurfaces, etc.)
org.jmol.viewer -- all events, scripting, and user interaction

org.jmol.renderxxxx -- all Java-specific rendering
org.jmol.g3d  -- all raster-specific  3D object code

Interestingly, these last two can be completely jettisoned and replaced with whatever one wants (in principle, at least). So, for example, now we are all set if someone wants to try OpenGL or WebGL rather than the signature Jmol rendering engine that we have had all along. I think the final JavaScript package will be a hybrid of some functionality on the server and some on the client, but basically it's all possible. The real question will be performance, of course.


Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
St. Olaf College
Northfield, MN

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