Testing JSmol2wp

lambda repressor headpiece

About/Help

Last week we had a meeting to discuss enhancements for the department website. One thing that came up was the idea of better eye candy to highlight the research we are doing.  As a biochemistry department where many people are doing structures and structure-function studies, an obvious capability to add is a molecular graphics viewer. Fortunately, I had some experience through EcoliWiki with Robert Hanson’s Jmol project, which uses a Java Applet to embed viewers in websites.

Of course, the Jmol developers recognized several years ago that alternatives to Java were needed, especially for viewing molecules on phones and tablets that lack Java. As a Mac user, I also find Java to be problematic. So Jmol spawned a sister project: JSmol, based on javascript. Since I have some experience with writing WordPress plugins, I adapted JSmol for a plugin, which I call JSmol2wp.  Here’s what it looks like:

Dragging should rotate the model, which is embedded via a shortcode that passes a bunch of parameters, including the PDB accession, the caption, and code to create custom buttons and other interface elements. The buttons run Jmol scripts to select, zoom, recolor etc. The plugin detects multiple instances of the shortcode that creates the applets as long as they use different pdb accessions.

This is the structure of the CynR DNA binding domain from a local file

About/Help

One thought on “Testing JSmol2wp

  1. Pingback: WordPress shortcode plugins with multiple instances | Blogs for Industry

Comments are closed.