## Filters: Jmol

filter_jmol
Maintained by Geoffrey Rowland
Jmol/JSmol filter for embedding interactive 3D chemical structures.
327 sites
15 fans
Current versions available: 1

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.

### Awards

• Fri, Jan 2, 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.
• Sat, Jan 3, 2015, 4:23 AM
Shoud now be fixed. Tested on Moodle 2.7.3+ and Moodle 2.8.1+
• Thu, Oct 15, 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="http://moodle2.mdhs.ntpc.edu.tw/draftfile.php/5/user/draft/551114156/pentane.pdb">丙烷</a>JMOLSCRIPT{select (*)[1];color atom green;}</p>

Thank you very much.
• Thu, Oct 15, 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 *';

to:

$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.

• Thu, Oct 15, 2015, 8:26 PM
Minor update/correction
.pdb format is Protein Data Bank
http://www.wwpdb.org/documentation/file-format
• Thu, Oct 15, 2015, 10:26 PM
Hi Geoffrey,
Thank you for your help. I have tried again , and overcome this obstacle.
I deeply appreciate your kindness .
• Wed, May 25, 2016, 10:32 PM
Hi Geoffrey,
I want to display the orbitals of molecule like the page as following: http://www.chemtube3d.com/orbitalsacetylene.htm
How can I do ?
Is it possible to add the function of jmolButton in the jmol filter ?
Thank you very much.
• Mon, Sep 26, 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 !
• Wed, Dec 7, 2016, 8:38 PM
• Wed, Jun 14, 2017, 5:51 PM
Hi,

We are moving to Moodle 3.2 and would like to continue to use the JMOL filter are there any plans to support it on 3.2?

There seems to be an issue with the current 6.1 build when installed on Moodle 3.2 I have raised

https://github.com/geoffrowland/moodle-filter_jmol/issues/21
• Thu, Oct 5, 2017, 3:48 AM
Hi Geoffery,

Thanks for a great plugin!

We are upgrading our plugin and noticed the new version requires a click to activate step. Can this step be removed or is that not advisable?

Thanks!
Andrew
• Thu, Feb 1, 2018, 9:56 PM
We are looking to move to Moodle 3.4 this summer. Any chance the issue we raised https://github.com/geoffrowland/moodle-filter_jmol/issues/21 will be resolved in a new jmol build compatible woth Moodle 3.4 or shall we continue to use our own fork?
• Thu, Feb 8, 2018, 2:19 AM