Menu

MW Extension Log in to Edit

Angel Herraez

Jmol Extension for MediaWiki

Version 6 is described here, compatible with MediaWiki 1.43

Using the Extension

The Jmol Extension enables the use of several tags in the wikicode to insert JSmol objects (panels displaying interactive 3D modes of molecules or other structures) in different ways, and to interact with them via UI controls like buttons, links....

Simple tags:

These render a link in the page that, when clicked by the user, will open a small window (pop-up) with a JSmol panel that displays a structure. No custom rendering or scripting on the structure is possible.

<jmolFile> <jmolMol> <jmolSmiles> <jmolPdb>
A structure in a file previously uploaded to the wiki.
(If enabled by the wiki administrators)
A structure retrieved from the NCI CACTUS server (by name). A structure retrieved from the NCI CACTUS server (by SMILES notation). A structure is retrieved from a PDB server (by PDB_ID).

This allows for more flexibility, using sub-tags nested inside it.

<jmol>
with sub-tags:
jmolApplet jmolAppletInlineButton jmolAppletInlineLink jmolAppletButton jmolAppletLink
inserts a JSmol panel inserts a button that, when clicked by the user, will be replaced by a JSmol panel inserts a link that, when clicked by the user, will be replaced by a JSmol panel inserts a button that, when clicked by the user, will open a small window (pop-up) with a JSmol panel inserts a link that, when clicked by the user, will open a small window (pop-up) with a JSmol panel
jmolButton jmolLink jmolCheckbox jmolMenu jmolRadioGroup
inserts a button that, when clicked by the user, will send commands to a JSmol panel inserts a link that, when clicked by the user, will send commands to a JSmol panel inserts a checkbox that, when clicked by the user, will send alternative commands to a JSmol panel inserts a drop-down menu with options that will send commands to a JSmol panel inserts a group of radio buttons that will send commands to a JSmol panel

Installing the Extension

Note: this must be done by the administrator of the wiki.

  1. Create a Jmol folder inside the extensions folder of your wiki.
  2. Download all the source files of the Jmol extension (version 6.x) and place them in the extensions/Jmol folder.
  3. Download the latest release of Jmol, Jmol-16.xx.xx-binary.zip or .gz
    • Extract into a temporary location the jsmol.zip file from the Jmol release.
    • Open this file and extract the following contents (all are located inside a jsmol subfolder):
      • files: JSmol.min.js and JSmol.GLmol.min.js
      • folders: j2s and php
  4. Upload the above files and folders to the extensions/Jmol/JSmol folder.
  5. Edit LocalSettings.php adding a line wfLoadExtension('Jmol');

The utility copyJSmolForJmolExtension.php is included as a convenient way to facilitate direct extraction of the needed files from Jmol-16.xx.xx-binary.zip (steps 3 and 4 above). It is used like this:
copyJSmolForJmolExtension.php Jmol-xx.xx.xx-binary.zip /mediawiki/extensions/Jmol

The wiki may be configured to allow or deny several options of the Extension. These settings are usually added at the end of LocalSettings.php, and in any case after the wfLoadExtension('Jmol'); line. The first value indicated is the default:

$wgJmolAuthorizeJmolFileTag = true / false : Authorize the use of the <jmolFile/> tag.
$wgJmolAuthorizeJmolMolTag = true / false : Authorize the use of the <jmolMol/> tag.
$wgJmolAuthorizeJmolPdbTag = true / false : Authorize the use of the <jmolPdb/> tag.
$wgJmolAuthorizeJmolSmilesTag = true / false : Authorize the use of the <jmolSmiles/> tag.
$wgJmolAuthorizeJmolTag = true / false : Authorize the use of the <jmol/> tag.
$wgJmolAuthorizeUploadedFile = false / true  : Authorize the use of <uploadedFileContents>.
$wgJmolAuthorizeUrl = false / true : Authorize the use of <urlContents>.
$wgJmolDefaultScript = ... : Default script.
$wgJmolDefaultAppletSize = 400 : Size in pixels of the JSmol panel.
$wgJmolForceNameSpace = ... : Force the NameSpace where JSmol will go looking for wiki pages containing molecular data (using <wikiPageContents>).
$wgJmolShowWarnings = true / false : Display warnings when users try to use disabled features.
$wgJmolDefaultAppletColor
$wgJmolMaxAppletSize
$wgJmolDefaultRenderingEngine = HTML5 / WebGL
$wgJmolMolServer
$wgJmolPdbServer
$wgJmolPlatformSpeed
$wgJmolDefaultCaptionCSS (used in Proteopedia)
$wgJmolDefaultTitleCSS

Related

Wiki: Home

Discussion

  • Bob Hanson

    Bob Hanson - 2025-01-17

    Ok so expired certificate. Next step,

    On Fri, Jan 17, 2025, 1:56 PM Angel Herraez aherraez@users.sourceforge.net
    wrote:

    --- v4
    +++ v5
    @@ -12,7 +12,21 @@

    Using the Extension


    -...
    +Several tags will make use of the Extension to insert JSmol objects in different ways, and to interact with them via UI controls like buttons, links....
    +
    +##### Simple tags:
    +render a link in the page that, when clicked by the user, will open a small window (pop-up) with a JSmol panel that displays a structure. No custom rendering or scripting on the structure is possible.
    +
    + <jmolfile> | <jmolmol> | <jmolsmiles> | <jmolpdb>
    +---------- | ---------- | ------ | ------
    +A structure in a file previously uploaded to the wiki. | A structure retrieved from the NCI CACTUS server. | A structure retrieved from the NCI CACTUS server.l | A structure is retrieved from a PDB server.
    +
    +
    +##### Full-featured tag:
    +
    + <jmol> |
    + ---------- |
    + with sub-tags inside it. |</jmol></jmolpdb></jmolsmiles></jmolmol></jmolfile>

    Installing the Extension



    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/jmol/wiki/MW%20Extension/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

     
    • Angel Herraez

      Angel Herraez - 2025-01-18

      Good morning, Bob

      After all the email exchanges between Miguel and Jaime, I did not fully understand what the problem was and why it could not be solved, but...

      *
      Miguel is the owner of the jmol.org domain (and would pay for the SSL certificate)
      *
      The content is in fact in an Amazon Web Server managed by Jaime (so I assume that Weizmann pays for the hosting, or it is within a larger hoting plan). The subdomain wiki.jmol.org is redirected there.
      *
      They say that when the certificate is about to expire, emails are sent from AWS to Miguel. He says he did not receive them. So the SSL was inactivated for lack of response.
      *
      The http url is automatically directed to https (or so I think). And https is blocked by the browser as not trusted.

      BTW, my changes to the wiki home page at SF that you had started (in 2017?) were again disregarded yesterday, without any warning. Finally I found how to check permissions and "added" Admins for editing (!!!), and the changes stay now. So I am going ahead with basic documentation of the extension there, and when I manage to revive the extension at MW official page, I will direct here for reference rather than to JmolWiki.

      Cheers,
      A.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.