

Note that JSmol is not a different program than Jmol: it is Jmol, just compiled into JavaScript instead of Java (thanks to the Java2Script software).
Applet viewer window size setting code#
JSmol allows rendering, scripting and interaction with the models just as Jmol does, since the source code is shared by both. JSmol was developed by Bob Hanson, Zhou Renjian, and Takanori Nakane. (Reading binary files in some browsers and saving images and Jmol states in all browsers do require a server-side PHP script, commonly provided as php/jsmol.php –read details below.) JSmol runs entirely in the client, needing no server technologies for most of its operation. No hardware-based graphics acceleration is used, allowing JSmol to run in any web browser that supports HTML5 standards. JSmol opens up the use of Jmol in PC, Mac, and Linux systems, tablets and phones (both iOS and Android) without the need for Java. JSmol is the name for the HTML5 canvas version of the former Jmol applet. JSmol accepts script commands immediately, before or during applet/canvas creation on the page, caching them until Jmol is ready to accept them.
Applet viewer window size setting full#
JSmol provides the same full complement of scripting that Jmol offers. JSmol lets you access keyword search results from RCSB - for example, a list of all structures that reference caffeine. JSmol includes methods to easily access cross-platform resources using AJAX provided by jQuery. The applet or canvas is wrapped in a set of div elements, allowing a richer diversity of options. When you use Jmol.getApplet(), you get a reference to a JavaScript object, not the applet/canvas itself. The object you create using Jmol.getApplet() or Jmol.getAppletHtml() is a JavaScript object that is a subclass of Jmol._Applet. Also optionally java.Ĭreates a single JavaScript object, Jmol, which includes a set of functions and internal objects such as Jmol._Applet, Jmol._Image, and ntrols. Requires at a minimum as well as j2s for internationalized interface, also idioma. Includes a variety of options, such as initial "deferred-applet" mode, where an initial image is displayed, with a click on the image or link on the page initiating applet/canvas 3D modeling, and "image+loading" mode, in which case the 3D model is loading behind the scenes while an initial image is displayed. Options for HTML5-only and optionally Java and HTML5/WebGL. In that case you must hack jQuery a bit.) The library has been W3C and XHTML validated. There is a fix for this, however, if you must do that. (jQuery 2.0 does not and for reasons of principle reportedly will never support MSIE running locally using file://, so if you do not need to run your page in MSIE in a local environment, that should be fine. JSmol is fully compatible with jQuery 1.9 or 1.10. the JSME HTML5 object, so 3D models can be generated by a page visitor using simple chemical 2D drawing (see more details).the JSpecView HTML5 object, allowing one to tie 3D models to IR, NMR, UV/VIS, GC, and GC/MS spectra (see more details).In addition, JSmol allows easy interaction with JSmol also integrates facilities for direct, behind-the-scenes access to public databases such as the RCSB PDB database, the National Cancer Institute CACTVS server, and PubChem. Using JSmol, a web page developer can target most web browsers that no longer support Java applets, using a Jmol applet surrogate, while still implementing the Jmol Java applet on compatible platforms. The library provides this object and supersedes the Jmol.js JavaScript library formerly used exclusively with the Jmol Java applet, allowing a cleaner, more efficient way to interact with Jmol on a web page, and abstracting the visualization of a molecular model so that the Java applet can be seamlessly and selectively replaced by a non-Java HTML5 canvas element (which might not even be Jmol). It was folded into JSmol later that year. The initial Jmol object was developed by Bob Hanson and Paul Pillot in early 2012.

The heart of JSmol is the Jmol JavaScript object, ( window.Jmol), which includes a set of JavaScript functions and utilities.
