<title>Introduction</title> <p>The use of molecular graphics visualization software in association with journal articles reporting or describing crystal and molecular structures is not new.</p> <p>In 1993, the journal <italic>Protein Science</italic> published a CD-ROM containing the entire contents of its first volume of publication, the entire contents of the Protein Data Bank, and copies of <italic>MAGE</italic> and <italic>PREKIN</italic> software for creating and viewing ‘kinemages’, annotated interactive views of three-dimensional protein structures (Richardson &amp; Richardson, 1992##UREF##5## ▶##).</p> <p>In the mid-1990s, <italic>Chemical Communications</italic> acted as a test bed for a variety of new web technologies supporting enhanced and interactive figures, implemented by the CLIC Consortium (Murray-Rust <italic>et al.</italic>, 1997##UREF##4## ▶##).</p> <p>More recently, <italic>Biochemical Journal</italic> and <italic>ACS Chemical Biology</italic> have hosted a number of papers with interactive figures and animations as supporting materials [<italic>e.g.</italic> Himmel <italic>et al.</italic> (2006##UREF##1## ▶##), for which the supplementary figures may be viewed at <ext-link ext-link-type="uri" xlink:href="http://pubs.acs.org/journals/acbcct/weos/ACSviewer/0612himmel/figure1.htm">http://pubs.acs.org/journals/acbcct/weos/ACSviewer/0612himmel/figure1.htm</ext-link>].</p> <p>While these initiatives have all added value to the scientific articles in which they have been involved, they have been experimental prototypes, have depended on specific software or operating system requirements that have not been supported over the passage of time, or have provided supplementary information, not the main content of an article.</p> <p>With the maturing of web standards and the gradual movement towards electronic only journal publication, the IUCr has developed a toolkit for authors in its journals to produce enhanced interactive figures that form an integral part of the article and that are handled efficiently in the peer review and editorial production systems (Fig. 1##FIG##0## ▶##).</p>
<p>This is an open-access article distributed under the terms of the Creative Commons Attribution Licence, which permits unrestricted use, distribution, and reproduction in any medium, provided the original authors and source are cited.</p> <p>A description is provided of a software utility for creating interactive figures derived from crystal structures using the Java program <italic>Jmol</italic>.</p> <p>An editing toolkit has been developed to allow authors to create enhanced interactive figures for publication in crystallography journals. The visualization engine is <italic>Jmol</italic>, a Java program that can be manipulated as an applet in a web browser. The toolkit provides user-friendly widgets to manipulate the graphics state of <italic>Jmol</italic>, and persistent storage of graphics state, scripts and associated data files.</p>
<title>
            <italic>Jmol</italic> as the graphics engine</title> <p>The enhanced figure toolkit (<italic>jtkt</italic>) provides an environment for creating visualizations of crystal and molecular structures using the program <italic>Jmol</italic> (2008##UREF##2## ▶##). <italic>Jmol</italic> is a highly respected program, the development of which has been influenced by the previously widespread chemical visualization tools <italic>RasMol</italic> (Sayle &amp; Milner-White, 1995##UREF##6## ▶##) and <italic>Chime</italic> (<ext-link ext-link-type="uri" xlink:href="http://www.mdl.com/products/framework/chime/">http://www.mdl.com/products/framework/chime/</ext-link>), among others. It has a number of features that make it attractive as the graphics engine for journal enhanced figures, including some characteristics that are essential to the working of the toolkit that we have developed.</p> <p>The features that are attractive, but which in principle could be offered by other first-rate visualization programs currently available to the community, are</p> <p>(i) support for a wide range of input file formats (including CIF and mmCIF)</p> <p>(ii) support for common styles of representing inorganic, small-molecule and biological macromolecular structures</p> <p>(iii) a wide range of colour schemes and labelling conventions</p> <p>(iv) robust support for crystallographic symmetry operations</p> <p>(v) the ability to display atomic displacement ellipsoids</p> <p>The features that we consider essential for the use of such a program in an electronic journal production environment are the following:</p> <p>(i) cross-platform compatibility</p> <p>(ii) the ability to run the program as an embedded applet in a browser and to run it as a standalone application with command-line parameters</p> <p>(iii) the availability of JavaScript libraries allowing communication with the application through buttons and checkboxes on a web page</p> <p>(iv) the availability of source code through an open licence and an active developer community</p> <p>(v) high-quality rendering of atoms, bonds and molecular surfaces, both interactively and exportable as <italic>POV-Ray</italic> (<ext-link ext-link-type="uri" xlink:href="http://www.povray.org/">http://www.povray.org/</ext-link>) files or images</p> <p>(vi) a fast, intuitive interactive model manipulation capability, including scripting, with help documentation for non-expert users</p> <p>(vii) efficient export of the graphics state allowing all the properties of a particular view to be transmitted to other instances of the program</p> <title>Philosophy behind ‘enhanced figures’</title> <p>Interactivity allows a reader unbounded scope to explore a structure, taking advantage of whatever features the visualization software may provide. This is the basis underlying <italic>FirstGlance in Jmol</italic> (<ext-link ext-link-type="uri" xlink:href="http://firstglance.jmol.org">http://firstglance.jmol.org</ext-link>), a service that an increasing number of journals link to, which provides standard buttons to view different aspects of a protein structure as well as access through an in-applet menu to all of <italic>Jmol</italic>’s functions.</p> <p>In a research article, however, the purpose of a figure is usually to draw the reader’s attention to specific features of the structure that the author has identified or singled out for particular scrutiny. An enhanced figure should preserve that purpose and allow the author to designate a preferred view of the structure with suitable annotations. Ideally, the author should also be able to provide the reader with specific options to view different selected aspects of the structure. None of this should interfere with the reader’s ability to explore the structure beyond the author’s preferred view, but the reader should always be able to return to the preferred view after experimentation. The reader may interrogate the figure for particular information (<italic>e.g.</italic> atom labels, symmetry operations, bond distances or angles).</p> <p>In all respects, <italic>Jmol</italic> (and, to our knowledge, no other program) suits these needs. By virtue of being Java-based and coded with flexibility in mind, <italic>Jmol</italic> has broad cross-platform compatibility. No graphical libraries are used that would require installation or special hardware. Available as both Java application and Java applet, <italic>Jmol</italic> provides both application-specific capabilities (such as file reading from remote databases and file writing) and browser-independent functionality. Thus, <italic>Jmol</italic> views created by an author using the applet can be processed by the server using the <italic>Jmol</italic> application for the production of high-resolution PNG or JPEG images for use in publication or delivery back to the author. In addition, specifically for the applet, <italic>Jmol</italic> includes a JavaScript library that hides cross-browser compatibility issues from the web page developer and makes it very easy to customize views with buttons, checkboxes, selection boxes and HTML links. <italic>Jmol</italic>’s interface and scripting functionality have been well tested by hundreds of users, with extensive input from the crystallographic community. Online help, including extensive scripting examples, is readily available. Finally, recent versions of <italic>Jmol</italic> allow for the saving and restoring of the current state of the model in the form of script files. These scripts efficiently describe the exact state of the model and are not simply a historical list of commands given.</p> <p>Publishers of research articles have the responsibility of archiving the record of science, so that the information in the figure must be capable of being stored and made accessible to readers in the long term, in spite of the changing landscape of visualization software. While no software can guarantee that the results can be archived in a readable form indefinitely, the use of open-source Java software in standards-compliant web browsers does make a material contribution in this direction. To address the archival issues we adopt a complementary approach; when the author saves a view in <italic>Jmol</italic>, a static image in TIFF format is exported showing the same initial view. Strictly, it is this static image (which, incidentally, is used in the PDF and printed editions of the journal article) that constitutes the archived figure.</p> <p>This rather conservative approach explains the terminology ‘enhanced figure’. While the interactive elements of the structural model presented by the <italic>Jmol</italic> applet provide the reader with additional insight and value, these are considered extensions – enhancements – to the static view and not a replacement. This approach also means that readers without access to Java or JavaScript in their browsing environment can follow the scientific argument using the static figure (which is automatically provided if the browser cannot support the applet).</p> <title>Architecture of the toolkit</title> <p>The toolkit has server and client components. It is implemented as a single Perl module, Jtkt.pm, that operates as a mod_perl content handler in an Apache web server. This allows it to receive input both from the URL under which it is called (any path components after the base URL <ext-link ext-link-type="uri" xlink:href="http://submission.iucr.org/jtkt">http://submission.iucr.org/jtkt</ext-link> are parsed as directives to the server) and through information in HTML forms passed through normal GET or POST HTTP methods by the client web browser.</p> <title>Server-side features</title> <p>The server component has a number of roles:</p> <p>(i) It delivers an instance of the client process to the user – <italic>i.e.</italic> it generates the editing web page with forms, widgets, the <italic>Jmol</italic> applet and an initial <italic>Jmol</italic> loading script tailored to the type of structure being handled.</p> <p>(ii) It provides and manages persistent storage of the data generated in a client session. Since the Web uses stateless protocols, the various scripts generated by the author during an editing session must be stored on the server machine and used to repopulate the browser page when a new session is initiated. The author’s CIF, which provides the structural data for the visualization, is also stored on the server.</p> <p>(iii) It integrates the handling of the enhanced figure with the journal submission and production systems. Authors may create an enhanced figure before submitting their article or afterwards. Allocation of file storage, identification of the material and authentication of the user are all handled differently in these two cases, but the system must allow easy transfer from a pre-submission enhanced figure to the author’s submission area and subsequently to the journal editorial workspace. Nothing complicated is involved; it is mostly a matter of filesystem housekeeping and management. Nevertheless, performing these manipulations automatically is key to making the whole process possible within a journal production workflow.</p> <p>(iv) It creates high-resolution static images in synchronization with the preferred initial view presented by the interactive applet.</p> <title>Client-side features</title> <p>The client side of the toolkit is seen by the user as a sequence of web pages or forms. The initial form allows the user to upload the CIF to the server and to provide an indication of the type of structure (which is used by the server to tailor the configuration of editing panels in subsequent pages).</p> <p>Subsequently, the client application is characterized by a web page that includes the <italic>Jmol</italic> applet, various forms containing figure captions, information about the applet configuration and the contents of <italic>Jmol</italic> scripts that the author wishes to provide for the use of the reader in the final enhanced figure (Fig. 2##FIG##1## ▶##).</p> <title>Editing tabs</title> <p>The user workspace uses a tabbed interface to allow the author to concentrate on specific aspects of modifying the enhanced figure. For example, the <bold>general</bold> tab provides options for global choices, such as overall style (ball and stick, ellipsoids, macromolecular structure cartoons <italic>etc.</italic>), colour scheme, background colour, perspective view and stereo representation. The <bold>crystallography</bold> tab provides options for displaying the unit cell, extended crystal packing, highlighting of symmetry operations and so on. The <bold>ellipsoid</bold> tab provides options to change the size, style and colour of displacement ellipsoids; and so on.</p> <p>
                  <italic>Jmol</italic> has a very rich command language, and consequently a certain amount of experience is necessary to use it to its fullest capabilities. In providing focused collections of specific sets of <italic>Jmol</italic> operations, the intention is to help new <italic>Jmol</italic> users to discover and use the available functions and to guide them into creating visual representations that are close to journal style rules.</p> <p>However, it is also possible for advanced users to communicate directly with <italic>Jmol</italic> through a pop-up console window, and so the creative author is not restricted by the selection of functions provided through the tabbed interface.</p> <p>The various button, checkbox and menu widgets on these editing tabs are generated from the Jmol.js JavaScript library that is included in the <italic>Jmol</italic> distribution. They communicate directly with the <italic>Jmol</italic> applet to implement the scripts bound to each widget. This communication depends upon LiveConnect technology, which is not implemented in all browsers, although fortunately it is implemented in many of the browsers that are currently most widespread (Firefox, Safari, Opera, Internet Explorer).</p> <title>Script management tabs</title> <p>A second group of tabs allows the author to insert additional <italic>Jmol</italic> scripts and associated rubrics that will be bound to individual button or checkbox widgets in the published enhanced figure. In this way the author can provide the reader with the ability to run specific scripts designed to illustrate particular aspects of the structure.</p> <p>The author-supplied scripts are grouped as ‘button scripts’, single scripts, possibly complex in operation, which are run when the reader selects the associated button; ‘checkbox scripts’, which provide a box that allows the reader to toggle between two scripts, usually short and with opposing actions (<italic>e.g.</italic> turning a stereoview on or off); and ‘radiobutton scripts’, which typically allow the reader to select between alternative choices for a particular aspect of the structure (<italic>e.g.</italic> showing displacement ellipsoids at 30, 50 or 90%).</p> <p>In fact any script may be bound to any of the available widgets, so the usage of button, checkbox or radiobutton as described is not mandatory, but authors are encouraged to use the widgets in this way to accommodate the reader’s normal expectation. The toolkit currently provides up to four ‘run-once’ buttons, six dual-state checkboxes and two groups of up to six radiobuttons, making a total of 24 possible ‘enhanced views’.</p> <p>JavaScript functions are provided that allow import of the current graphics state of the <italic>Jmol</italic> applet into any of the author-generated scripts. This means that the author can use the editing tabs to create a new representation of the structure in the <italic>Jmol</italic> applet, of any level of complexity, and import the result as a complete script. This will prove particularly helpful to authors who are not familiar with <italic>Jmol</italic>’s scripting language in detail.</p> <p>Other tabs allow the author to preview the action of any such scripts before the result is saved back to the server.</p> <title>Documentation and availability</title> <p>
            <italic>Jmol</italic> is available for download from <ext-link ext-link-type="uri" xlink:href="http://www.jmol.org">http://www.jmol.org</ext-link>, and it has an extensive collection of help documentation at <ext-link ext-link-type="uri" xlink:href="http://chemapps.stolaf.edu/jmol/docs">http://chemapps.stolaf.edu/jmol/docs</ext-link>. The full set of capabilities needed for implementing the system described in this article is found in <italic>Jmol</italic> versions 11.5.37 or later.</p> <p>A user manual for the enhanced figure toolkit is available from the IUCr (<ext-link ext-link-type="uri" xlink:href="http://journals.iucr.org/services/jtkt_manual.pdf">http://journals.iucr.org/services/jtkt_manual.pdf</ext-link>). The source code contains much that arises from the need for tight integration with the journal production systems and is therefore not suitable for general distribution. However, a copy may be obtained upon application to the correspondence author. A version of the graphical editor is under development for release within the next version of <italic>publCIF</italic> (Westrip, 2008##UREF##7## ▶##).</p> <title>Supplementary Material</title>
<p>The initial proof of concept was developed during a work experience project with a high-school student, Tim Murray. Significant help with aspects of JavaScript coding and CSS is gratefully acknowledged from Simon Westrip and David Hoare of the IUCr. The tabbing that is so important an element of the toolkit user interface is provided by the tabber.js library of Patrick Fitzgerald (<ext-link ext-link-type="uri" xlink:href="http://www.barelyfitz.com/projects/tabber/">http://www.barelyfitz.com/projects/tabber/</ext-link>). The support, enthusiasm and encouragement of the entire <italic>Jmol</italic> community has been important in inspiring and developing this project.</p>
<fig id="fig1" position="float"><label>Figure 1</label><caption><p>View of the crystal structure of disodium dicopper undecaoxide tetrasilicate (Cunha-Silva <italic>et al.</italic>, 2008##UREF##0## ▶##), highlighting recent visualization enhancements in <italic>Jmol</italic>.</p></caption></fig> <fig id="fig2" position="float"><label>Figure 2</label><caption><p>User interface to the enhanced figure editing toolkit. In this view, the user is highlighting a ligand group using the available options for selecting and labelling parts of the structure. The tabs provide access to different sets of options to implement various features offered by the <italic>Jmol</italic> visualizer. The structure is of a <italic>Trypanosoma brucei</italic> 
                  -hydrolase-fold protein with unknown function (Merritt <italic>et al.</italic>, 2008##UREF##3## ▶##).</p></caption></fig>
<inline-formula></inline-formula>
<supplementary-material position="float" xlink:type="simple"><p>Enhanced figure: <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="http://scripts.iucr.org/cgi-bin/cr.cgi?rm=fignum&amp;cnor=ce5042&amp;fignum=1">interactive version of Fig. 1</ext-link>
            </p></supplementary-material>
<graphic xlink:href="j-41-00811-fig1"/> <inline-graphic xlink:href="j-41-00811-efi1.jpg" mimetype="image" mime-subtype="gif"/> <graphic xlink:href="j-41-00811-fig2"/>
[{"citation": ["Cunha-Silva, L., Brand\u00e3o, P., Rocha, J. & Almeida Paz, F. A. (2008). "], "italic": ["Acta Cryst."], "bold": ["64"]}, {"citation": ["Himmel, D. M., Sarafianos, S. G., Dharmasena, S., Hossain, M. M., McCoy-Simandle, K., Ilina, T., Clark, A. D. Jr, Knight, J. L., Julias, J. G., Clark, P. K., Krogh-Jespersen, K., Levy, R. M., Hughes, S. H., Parniak, M. A. & Arnold, E. (2006). "], "italic": ["ACS Chem. Biol."], "bold": ["1"]}, {"italic": ["Jmol", "Jmol: an open-source Java viewer for chemical structures in 3D"]}, {"citation": ["Merritt, E. A., Holmes, M., Buckner, F. S., Van Voorhis, W. C., Quartly, E., Phizicky, E. M., Lauricella, A., Luft, J., DeTitta, G., Neely, H., Zucker, F. & Hol, W. G. J. (2008). "], "italic": ["Acta Cryst."], "bold": ["64"]}, {"citation": ["Murray-Rust, P., Rzepa, H. S. & Whitaker, B. J. (1997). "], "italic": ["Chem. Soc. Rev."], "bold": ["26"]}, {"citation": ["Richardson, D. C. & Richardson, J. S. (1992). "], "italic": ["Protein Sci."], "bold": ["1"]}, {"citation": ["Sayle, R. A. & Milner-White, E. J. (1995). "], "italic": ["Trends Biochem. Sci."], "bold": ["20"]}, {"citation": ["Westrip, S. P. (2008). "], "italic": ["publCIF"]}]
J Appl Crystallogr. 2008 Aug 1; 41(Pt 4):811-814