JSmol2wp plugin released at wordpress.org

A while ago I wrote a WordPress shortcode plugin to embed Bob Hanson’s JSmol molecular structure viewer into WordPress posts and pages. Last weekend I finally got it into the wordpress.org plugin repository.

The basic usage for proteins is via a shortcode like this:

[jsmol pdb='1LMB']

The plugin fetches the appropriate record from the PDB and generates an applet like this:


If you use acc key and prefix a chemical name with a $, JSmol looks looks for the structure at NCI.

[jsmol acc=$tryptophan]


You can rotate and zoom the structure with your mouse. These default buttons in the applet are created automatically by the plugin, or you can add custom buttons that run Jmol scripts. Using the outstanding flexibility built into Bob’s code (I just wrapped it for WordPress), you can fetch small molecules from remote repositories, or load files uploaded to your WordPress installation. The plugin whitelists pdb, cif, cml, jvxl, mol, mol2, xyz, and ccp4 filetypes for upload (this might be problematic for some hosting providers).Click the About/Help link to see more examples and documentation.