Jump to content

Extension:Jmol

From mediawiki.org
MediaWiki extensions manual
Jmol
Release status: stable
Implementation Tag
Description Displaying molecular models in interactive 3D (using JSmol HTML5 objects)
Author(s) NicoV, Jaime Prilusky, AngelHerraez
Latest version 6.0 (2024-01-15)
MediaWiki 1.39+
License GNU General Public License 2.0 or later
Download
Example Examples alongside the instructions

  • $wgJmolAuthorizeJmolFileTag
  • $wgJmolAuthorizeJmolPdbTag
  • $wgJmolAuthorizeJmolMolTag
  • $wgJmolAuthorizeJmolSmilesTag
  • $wgJmolAuthorizeJmolTag

  • ‎<jmol>
  • ‎<jmolFile>
  • ‎<jmolPdb>
  • ‎<jmolMol>
  • ‎<jmolSmiles>

The Jmol extension allows for displaying molecular models in interactive 3D inside wiki pages using JSmol HTML5 objects.

Documentation on its installation and use can be found at the Jmol project pages, as well as at Jmol Wiki, with full details and demonstration examples.

Usage

[edit]

The Jmol extension can be used as a "custom tag" to display a 3D interactive view of a molecule or structure in a wiki page, either:

  • in a popup window, upon user action
  • in-line, inserted in the page as the page is loaded
  • in-line, inserted in the page upon user action

‎<jmolFile> tag

[edit]

The ‎<jmolFile> tag can be used to display in 3D a molecule or structure file that has been previously uploaded into a Wiki.

This tag may be disabled by administrators in the configuration file of the wiki, using $wgJmolAuthorizeJmolFileTag = false

A few examples:

  • <jmolFile>Chair.cml</jmolFile> will put in the article a Chair.cml link. When users click on it, a popup window will display the 3D structure specified in File:Chair.cml
  • <jmolFile text="chair conformation">Chair.cml</jmolFile> will put in the article a chair conformation link. When this link is clicked on, a popup window will display the 3D structure specified in File:Chair.cml

‎<jmolSmiles> tag

[edit]

The ‎<jmolSmiles> tag can be used to display in 3D a molecule file using its SMILES notation.

This tag may be disabled by administrators in the configuration file of the wiki, using $wgJmolAuthorizeJmolSmilesTag = false

A few examples:

  • <jmolSmiles>CCCNC</jmolSmiles> will put in the article a CCCNC link. When users click on it, a popup window will display the 3D structure that matches the SMILES string CCCNC
  • <jmolSmiles text="smiles notation">CCCNC</jmolSmiles> will put in the article a smiles notation link. When users click on it, a popup window will display the 3D structure that matches the SMILES string CCCNC

‎<jmolMol> tag

[edit]

The ‎<jmolMol> tag can be used to display in 3D a molecule file using its name or ID; the structure is retrieved from the NCI CACTUS server, or from another server defined by the wiki administrator. The contents of the tag must be some ID understood by the server.

This tag may be disabled by administrators in the configuration file of the wiki, using $wgJmolAuthorizeJmolSmilesTag = false

A few examples:

  • <jmolMol>isopropanol</jmolMol> will put in the article an isopropanol link. When users click on it, a popup window will display the 3D structure of this compound.
  • <jmolMol text="Tris base">2-Amino-2-(hydroxymethyl)propane-1,3-diol</jmolMol> will put in the article a Tris base link. When users click on it, a popup window will display the 3D structure of the compound with IUPAC name 2-Amino-2-(hydroxymethyl)propane-1,3-diol
  • <jmolMol text="Tris base">77-86-1</jmolMol> will put in the article a Tris base link. When users click on it, a popup window will display the 3D structure of the compound with Chemical Abstracts registry number 77-86-1
  • <jmolMol text="isopropanol">KFZMGEQAYNKOFK-UHFFFAOYSA-N</jmolMol> will put in the article an isopropanol link. When users click on it, a popup window will display the 3D structure of the compound that matches the InChIKey KFZMGEQAYNKOFK-UHFFFAOYSA-N

‎<jmolPdb> tag

[edit]

The ‎<jmolPdb> tag can be used to display in 3D a molecule file using its PDB code.

This tag may be disabled by administrators in the configuration file of the wiki, using $wgJmolAuthorizeJmolPdbTag = false

A few examples:

  • <jmolPdb>1ALE</jmolPdb> will put in the article a 1ALE link. When users click on it, a popup window will display the 3D structure matching the PDB code 1ALE.
  • <jmolPdb text="Partial structure of Apo-C-I">1ALE</jmolPdb> will put in the article a Partial structure of Apo-C-I link. When this link is clicked on, a popup window will display the 3D structure matching the PDB code 1ALE.

‎<jmol> tag

[edit]

The ‎<jmol> tag can be used to display in 3D a molecule or structure file in several situations. Its use is more complex than the other tags, but also more flexible. It takes embedded sub-tags (2nd and 3rd level). Documentation is available in the Jmol project pages or in the Extension page at the Jmol Wiki. Briefly, these subtags are available, to either

  • insert a JSmol panel in the page: ‎<jmolApplet>
  • insert a user control that, when user acts on it, will insert the JSmol panel in place or in a pop-up window: ‎<jmolAppletInlineButton>, ‎<jmolAppletInlineLink>, ‎<jmolAppletButton>, ‎<jmolAppletLink>
  • insert a user control that, when user acts on it, will send Jmol commands to an existing JSmol panel: ‎<jmolButton>, ‎<jmolLink>, ‎<jmolCheckbox>, ‎<jmolMenu>, ‎<jmolRadioGroup>
This tag may be disabled by administrators in the configuration file of the wiki, using $wgJmolAuthorizeJmolTag = false

Installing Jmol extension

[edit]

Note: Version 6 of the Jmol Extension has been tested against MediaWiki 1.39-1.43. For older installations of MediaWiki you may use previous versions of the Extension.

To install the Jmol extension in your wiki, follow instructions at the Jmol project pages

Wikis using the Jmol extension

[edit]

If you know a wiki using the Jmol extension, please add it to the list of Wikis using Jmol or report it at the Jmol-users e-mail list.

Troubleshooting

[edit]

Please address any queries to the Jmol-developers e-mail list


[edit]