Test of JSmol in WordPress: the background story.

No Gravatar

A word of explanation about this test page for experimenting with JSmol. Many moons ago I posted about how to include a generated 3D molecular model in a blog post, and have used that method on many posts here ever since. It relied on Java as the underlying software (first introduced in 1996), or almost 20 years ago. Like most software technologies, much has changed, and Java itself (as a compiled language) has had to move to improve its underlying security. In the last year, the Java code itself (in this case Jmol) has needed to be digitally signed in a standard manner, and this meant that many an old site that used unsigned older versions has started to throw up increasingly alarming messages.

To continue to experience the intended effect of eg Jmol, the user in turn has had to increasingly accept or tinker with their local Java settings; this has indeed become increasingly intrusive. And less experienced users often do not wish to engage with any of this activity. About two years ago, the Jmol community started having concerted discussions about what to do regarding Java, and they also started to converge with other developers and communities about a solution based on Javascript (which despite the name operates in an entirely different way from Java). Some of this early activity I tried to capture in a datument written during the summer of 2012[1]. The magnitude of the problem was considerable, how to refactor tens of thousands of Java-Code into JavaScript. The story of how this miracle was accomplished must be written by people like Bob Hanson and Takanori Nakane and perhaps some day they will. However, inserting all this wonderful technology into eg a WordPress blog still needed doing, and this task was undertaken by Jim Hu (and there are many others that are part of this effort, they all need to be thanked).

I volunteered to test, but so that Jim could see the effects of this testing, this (public) test page was created. Behind the scenes, the bugs have been winkled out, although much still remains to be done. This page will no doubt continue to evolve as this is done, and when it all works, I will no doubt add a postscript. So keep watching this space. It has two examples, each of which should produce a box with a molecule, as per this blog post.

  1. [jsmol pdb=’1PRC’ caption=’Load 1PRC’ commands=” id=’a1′ debug=’true’]
  2. [jsmol caption=’Load local file’ fileurl=’http://rzepa.net/blog/wp-content/uploads/2014/06/test2.pdb’ id=’a2′ commands=’=spacefill 23%;wireframe 0.15;color cpk;’ debug=’true’]

References

  1. H.S. Rzepa, "Chemical datuments as scientific enablers", Journal of Cheminformatics, vol. 5, 2013. http://dx.doi.org/10.1186/1758-2946-5-6

Tags: , , , , , ,

One Response to “
Test of JSmol in WordPress: the background story.

  1. Henry Rzepa says:

    You might observe that JSmol in the above post is non-functional. The progress report is that we suspect that the php components which translate the JSmol syntax to a WordPress blog require php V 5.3.28 or higher; this blog is currently running over 5.3.3. Arrangements are being made to perform the upgrade, and further tests will then be conducted.

Leave a Reply