3D-rendered molecular models on this blog: an update.

So much to do, so little time to do it. That is my excuse at least. Right from my first post on this blog in 2008 I have tried to enhance it using Jmol, a Java-based applet (normally indicated with the caption Click for 3D). This has been pretty stable for some five years now, but a recent spate of security-based releases of the JRE (Java runtime environment) for desktop computers has impacted, the latest of which was released yesterday (Java 7, V 51).  Put simply, when I started, an unsigned applet was fine. Now to run, it can only be a properly signed applet. Fortunately, there are two solutions:

  1. Install such a signed applet, and then invoke it correctly
  2. Replace the use of Java applets with one not dependent on Java. In the last 18 months an amazing effort to do this has resulted in  JSmol, which uses only JavaScript (which has nothing to do with Java despite the name).

I will shortly start the process of implementing solution 2 on this blog. Meanwhile I have started to implement solution 1 (which has the advantage that many of the surfaces I have included here, such as orbitals or NCI analyses, will render very much more quickly than with  JSmol). It involves replacing all instances of

jmolInitialize(‘../Jmol/’,'JmolApplet.jar’);

or

jmolInitialize(‘../Jmol/’,'JmolAppletSigned0.jar’);

with

jmolInitialize(‘../Jmol/’,'JmolAppletSigned.jar’);

I have identified 935 such instances, and am pondering how to automate this. Meanwhile, if you have a particular page which you would like to be processed quickly, do please get in touch.


PS. This is a classic (ugly) hack, but it might save me time. I uploaded JmolAppletSigned.jar V 14.0.5 and renamed it JmolApplet.jar (having moved the old one). Then I made one change to the script that invokes it (Jmol.js), changing the instance of "JmolAppletSigned" : "JmolApplet") + "0.jar"); to "JmolAppletSigned" : "JmolApplet") + ".jar");. Sorry to spill the guts of this blog onto this page, but one does occasionally need to tinker under the hood, and it might be of interest to anyone else trying to do this. Meanwhile, there are instructions here on how to install JSmol.

Henry Rzepa

Henry Rzepa is Emeritus Professor of Computational Chemistry at Imperial College London.

View Comments

  • > jmolInitialize(‘../Jmol/’,'JmolApplet.jar’);
    > or
    > jmolInitialize(‘../Jmol/’,'JmolAppletSigned0.jar’);
    > with
    > jmolInitialize(‘../Jmol/’,'JmolAppletSigned.jar’);
    > I have identified 935 such instances, and am pondering how to automate this.

    For example such command line:
    perl -i -pe "s|jmolInitialize\(‘\.\./Jmol/’,'JmolApplet(Signed0)?\.jar’\);|jmolInitialize(‘../Jmol/’,'JmolAppletSigned.jar’);|g" mask_for_files__or__filenames_separated_by_space

  • Alex,

    The above suggestion relates to operation on a file. But the blog in effect runs off a MySQL database, and there is no file per se to execute perl on.

  • UPDATE wp_posts SET post_content = REPLACE (post_content, ' jmolInitialize('‘../Jmol/'’,'’JmolApplet.jar'’);', 'jmolInitialize(‘'../Jmol/'’,'’JmolAppletSigned.jar'’);'

    Ought to do it. Notice the escaped quotes with ''

Recent Posts

Internet Archeology: reviving a 2001 article published in the Internet Journal of Chemistry.

In the mid to late 1990s as the Web developed, it was becoming more obvious…

1 month ago

Detecting anomeric effects in tetrahedral carbon bearing four oxygen substituents.

I have written a few times about the so-called "anomeric effect", which relates to stereoelectronic…

1 month ago

Data Citation – a snapshot of the chemical landscape.

The recent release of the DataCite Data Citation corpus, which has the stated aim of…

2 months ago

Mechanistic templates computed for the Grubbs alkene-metathesis reaction.

Following on from my template exploration of the Wilkinson hydrogenation catalyst, I now repeat this…

2 months ago

3D Molecular model visualisation: 3 Million atoms +

In the late 1980s, as I recollected here the equipment needed for real time molecular…

3 months ago

The Macintosh computer at 40.

On 24th January 1984, the Macintosh computer was released, as all the media are informing…

3 months ago