Filters: Jmol

Maintained by Picture of Geoffrey Rowland Geoffrey Rowland
Jmol/JSmol filter for embedding interactive 3D chemical structures.
542 sites
4 fans
Moodle 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0

Jmol/JSmol filter for embedding interactive 3D chemical structures in Moodle. The master branch uses JSmol, the HTML5/JavaScript version, tested with Moodle 2.3.x and later versions. The MOODLE_2_STABLE branch uses the Jmol Java applet with Moodle 2.0.x and later versions. The MOODLE_19_STABLE branch uses the Jmol Java applet with Moodle 1.9.x and earlier. The Jmol filter was originally written by Dan Stowell and is now maintained by Geoff Rowland.


Screenshot #0


Picture of Geoffrey Rowland
Geoffrey Rowland (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Geoffrey Rowland
    Tue, 2 Jul 2013, 5:43 PM
    Hi Aparup

    Apologies for overlooking this. The JME.jar was only included as a matter of convenience and can be deleted.

    I'm in the process of fixing a few bugs and will remove JME.jar from the updated version.
  • Picture of Geoffrey Rowland
    Wed, 3 Jul 2013, 4:36 AM
    Hi again Aparup
    I have now updated the code on github (master branch) but am not sure how to add the updated code to this plugins database.
  • Picture of Geoffrey Rowland
    Wed, 3 Jul 2013, 4:41 AM

    I have just seen the Administration block on the right!

    Having updated on Github, Should I 'Edit this plugin' or 'Add a new version'?

    Then 'Schedule this plugin for reapproval'?

    Please advise

  • MD shot of me from his iphone4
    Wed, 3 Jul 2013, 7:51 PM
    Hi Geoffrey,
    yes, do 'Add a new version' and hide the old version (via download versions tab). schedule it for approval, scheduling for approval seems to be done already i notice smile.

    Also please read the following FAQ created recently, it hopefully explains how to clarify this plugin better.
  • MD shot of me from his iphone4
    Wed, 3 Jul 2013, 8:08 PM
  • Picture of Andreas Schenkel
    Fri, 2 Jan 2015, 5:56 PM
    Version 4.1 does not work in my moodle 2.7.3
    - the filter does not show the 3d-molecule
    - no errormessage is shown

    had to uninstall version 4.1 and reinstall version 4.0
  • Picture of Geoffrey Rowland
    Fri, 2 Jan 2015, 9:11 PM
    Hi Andreas

    Thanks for the feedback.

    Just retested JSmol filter installation and upgrade on Moodle 2.8.1+. This worked for me. I'll shortly set up a Moodle 2.7.3 instance to test further.

    I hope to release a new Jmol filter version 5 in the next week or so which will have a number of performance improvements and new features. So, I'm keen to squash any bugs.
  • Picture of Geoffrey Rowland
    Fri, 2 Jan 2015, 10:38 PM
    Hi again Andreas.

    Just reproduced the issue on a fresh Moodle 2.7.3+ installation. Will investigate further and release an update ASAP.
  • Picture of Geoffrey Rowland
    Sat, 3 Jan 2015, 4:23 AM
    Shoud now be fixed. Tested on Moodle 2.7.3+ and Moodle 2.8.1+
  • Picture of 景東 王
    Thu, 15 Oct 2015, 5:20 PM

    Hi Geoffrey,
    Thank you for sharing jmol module. I had tried Release 5.0 (Build: 2015091800) in moodle 2.9.2 ,
    and found that JMOLSCRIPT{} can't work. Could you give any help?
    I test these text as following:
     <p><a title="Jmol" href="">丙烷</a>JMOLSCRIPT{select (*)[1];color atom green;}</p>

    Thank you very much.
  • Picture of Geoffrey Rowland
    Thu, 15 Oct 2015, 8:13 PM
    Thanks 景東 王
    Now fixed!

    I'll update the Plugins Database shortly. In the meantime, around line 56 (may be slightly different in your version) of filter/jmol/iframe.php, just edit line:

    $loadscript = $loadscript.'cartoons only; color structure; select *';


    $loadscript = $loadscript.'cartoons only; color structure; select *;';

    Note the extra ;

    That said, a couple of related things that may be of help.

    1) The Jmol filter uses the file extension (in your case .pdb) to 'guess' the type of molecular structure and present appropriate menus at the bottom of the iframe containing the J(S)mol object and pop-up menu, from right-clicking the J(S)mol object.

    So, as you are using .pdb (Brookhaven Protein Database) format, the filter is presenting menus for a biopolymer rather than for a simple organic molecule (pentane). A quick (and perhaps nasty?) way to fix this would be to just rename the file pentane.mol. An alternative (better?) would be to use a bonafide .mol structure file from one of the public databases or to use Open Babel to convert pentane.pdb to pentane.mol.

    2) You may also wish to experiment with the PNGJ format which combines a .png 'cover image' with the structure file and any associated script.
    To do this with the Jmol filter, you can select the download link and save, say, pentane.mol (with JMOLSCRIPT}) as pentane.mol.png. You can then re-upload and re-link this to Moodle and it will display with a cover image which matches the structure and you will no-longer need to append the JMOLSCRIPT{} as it is already bundled in the file. A bit fiddly! But useful, particularly for more complex scripts.

    Hope that all makes sense! Get back to me if any further questions. I'll also get round to updating the Moodle Docs.

  • Picture of Geoffrey Rowland
    Thu, 15 Oct 2015, 8:26 PM
    Minor update/correction
    .pdb format is Protein Data Bank
  • Picture of 景東 王
    Thu, 15 Oct 2015, 10:26 PM
    Hi Geoffrey,
    Thank you for your help. I have tried again , and overcome this obstacle.
    I deeply appreciate your kindness .
  • Picture of 景東 王
    Wed, 25 May 2016, 10:32 PM
    Hi Geoffrey,
    I want to display the orbitals of molecule like the page as following:
    How can I do ?
    Is it possible to add the function of jmolButton in the jmol filter ?
    Thank you very much.
  • moodler
    Mon, 26 Sep 2016, 6:35 PM
    Hi there,
    I'm using this plugin into all of my Moodle 2.9 sites, I'm actually working on upgrading all of them (500+ sites) to LTS Moodle 3.1.
    So my question is quite predictible; did you planed to make it compatible with Moodle 3.1 ?
    Thanks !
1 2
Please login to post comments