http://chemapps.stolaf.edu/jmol/jmol.php version 1.1.0 6/11/2014 2:04:21 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, hansonr@stolaf.edu
 anchor format (creates link to opens new tab/page or replaces current page):
    <a target=_blank href="http://chemapps.stolaf.edu/jmol/jmol.php?model=acetone">3D model</a>
 popup format (creates link to pop up a new window of a specified size):
    <script type="text/javascript" src="http://chemapps.stolaf.edu/jmol/jmol.php?model=acetone&link=3D model"></script>
 inline format (displays applet on current page):
    <script type="text/javascript" src="http://chemapps.stolaf.edu/jmol/jmol.php?model=acetone&inline"></script>
 options:
             &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
             &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%
             &height=...      optional height, e.g.: 300 or 100%
             &caption=...     optional caption (only for anchor-type - not &inline and no &link)
             &title=...       optional title (not &inline)

 anchor example: http://chemapps.stolaf.edu/jmol/jmol.php?model=aspirin&caption=aspirin model <script>jmolCheckbox('spin on','spin off','spin on/off')</script>

 popup example: 

 inline example: 
caffeine
tylenol