version 1.1.7 10/23/2016 1:20:56 PM

Easy Jmol insertion into a web page

This site allows insertion of a Jmol applet into a web page with nothing more than a simple <script> or <a> tag. No model files are necessary -- the 3D model is obtained from the RCSB using a PDB id or from the NIH CACTVS server based on a chemical identifier such as a name, SMILES string, InChI key, or CAS registry number.

Bob Hanson, St. Olaf College,
 anchor format (creates link to opens new tab/page or replaces current page):
    <a target=_blank href="">3D model</a>
 popup format (creates link to pop up a new window of a specified size):
    <script type="text/javascript" src=" model"></script>
 inline format (displays applet on current page):
    <script type="text/javascript" src=""></script>
             &source=...      (option 1) file source of model, starting with http://
             &model=...       (option 2) compound name or SMILES string for NIH CACTVS server test
             &pdbid=xxxx      (option 3) PDB ID for model from RCSB test
             &pdbid=xxx       (option 4) PDB ID for ligand from RCSB test
             &use=JAVA        optional Java applet rather than HTML5
             &isfirst=true    set this false if this is not the first applet on the page; only for inline
             &inline          optional return JavaScript to create applet on current page
             &link=...        optional text for <a href=...>xxxx tag for a popup window
             &script=...      optional script (should be simple)
             &scriptvar=...   optional predefined script variable  (JavaScript variable name or function, not the script itself; &inline only)
             &width=...       optional width, e.g.: 300 or 100% (default 600)
             &height=...      optional height, e.g.: 300 or 100% (default 600)
             &caption=...     optional caption (only for anchor-type - not &inline and no &link)
             &title=...       optional title (not &inline)

 anchor example: model <script>jmolCheckbox('spin on','spin off','spin on/off')</script>

 popup example: 

 inline example: