@source http://chemapps.stolaf.edu/jmol/jsmol
@author hansonr@stolaf.edu 7:38 AM 9/18/2012
JSmol -- Java(Script) web-based molecular viewer
see jmol.sourceforge.net jsmol.sourceforge.net
This zip directory contains the first work in progress toward
a complete Java->JavaScript code conversion for Jmol.
It was created three weeks into the project.
Note that JSmol is not a different program than Jmol.
JSmol is Jmol, just compiled into JavaScript as well as Java byte code.
All development is done working with the trunk Jmol Java source,
but compilation of that code creates both Java .class files and equivalent JavaScript .js files
As such, JSmol has just about all of the features of Jmol:
full (non-binary) file reading
full Jmol scripting (including atom selection and Jmol Math)
full Jmol shape object support
The two caveates are that surface creation is too slow to be useful
without server-side help (exploring that...),
and we don't at this time have a binary file reader (so Spartan files must
first be converted by Jmol/Java into ASCII files to be read by JSmol;
again, a little server-side support here should fix that).
So at the time of this writing (Sept. 2012, about a month into development),
surface commands are not recommended.
Status:
complete Jmol code implementation
Java2Script js code adapted successfully
To do:
tie in GLmol-based graphics
add mouse event capture/orientation
animation and spin pseudothreads
server-based surface/calculation assistance using JVXL surface compression
performance enhancement in function calling
performance enhancement involving packaging of JavaScript classes
What's here:
jsmol.htm and jsmol2.htm are simple pages that just load a model or two.
The main test page is test2.htm.
test2.htm is a general test of the integration of JSmol with JmolJSO
This Jmol page should automatically switch to different modes
depending upon browser capabilities. When operational,
it will use the signed Jmol applet, the unsigned Jmol applet
with server-side help, or GLmol
and/or JSmol using
HTML5 with (iPad/iPhone) or without (Android) WebGL.
JSmol implements Java2Script
to recreate the entire Jmol Java applet in JavaScript.
On the server side, it uses jmolcd2.php for
delivering cross-domain models into the viewer.
Credits:
Jmol code conversion to JavaScript by Bob Hanson.
GLmol interface written by Takanori Nakane.
Java2Script written by Zhou Renjian, et al.