Burger. J Cheminform (2015) 7:35 DOI 10.1186/s13321-015-0085-3
REVIEW Open Access ChemDoodle Web Components: HTML5 toolkit for chemical graphics, interfaces, and informatics Melanie C Burger1,2*
Abstract ChemDoodle Web Components (abbreviated CWC, iChemLabs, LLC) is a light-weight (~340 KB) JavaScript/HTML5 toolkit for chemical graphics, structure editing, interfaces, and informatics based on the proprietary ChemDoodle desktop software. The library uses
Introduction Mobile browsers did support HTML5, which opened How we communicate chemical information is increas- the door to web applications built with only HTML, ingly technology driven. Learning management systems, CSS and JavaScript (JS), such as the ChemDoodle Web virtual classrooms and MOOCs are a few examples where Components. chemistry educators need forward compatible tools for digital natives. Companies that implement emerg- Review ing web technologies can find efficiencies and benefit The ChemDoodle Web Components technology stack from competitive advantages. The first chemical graph- and features ics toolkit for the web, MDL Chime, was introduced in The ChemDoodle Web Components library, released in 1996 [1]. Based on the molecular visualization program 2009, is the first chemistry toolkit for structure viewing RasMol, Chime was developed as a plugin for Netscape and editing that is originally built using only web stand- and later for Internet Explorer and Firefox. In 2004 Jmol, ard technologies, HTML5, CSS, and JS, and is accord- a Java applet [2], was released to replace Chime and pro- ingly supported by all modern desktop and mobile vide an open source and operating system independent browsers. CWC is made available under the free and solution to the growing number of web browsers. JME, a open source, GNU GPLv3 license and is accompanied by molecular editor [3], was later integrated into Jmol to add detailed documentation and commercial support pack- chemical structure upload and editing functionality. In ages. The CWC source code follows JS best practices to 2007 however, the hardware landscape changed dramati- ensure maintainability and cross-compatibility with other cally with the introduction of mobile devices that did not libraries and frameworks. support third party plugins such as Flash or Java applets. Using web standard technology has a number of advan- tages over 3rd party plugins like Java applets and Flash:
*Correspondence: [email protected] 2 Imagineeringart.com Inc., 208 Bloor Street West Suite 300, Toronto, •• installation or updates are not required since JS is ON M5S 3B4, Canada enabled in browsers by default, Full list of author information is available at the end of the article
© 2015 Burger. This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http:// creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/ zero/1.0/) applies to the data made available in this article, unless otherwise stated. Burger. J Cheminform (2015) 7:35 Page 2 of 7
•• JS applications are quick to load without the over- page within a JavaScript code block. The appearance of head of 3rd party plugins, the component can be customized in an optional third •• there are fewer security concerns since the code is step. Finally, molecular data is loaded into the compo- sand-boxed in the browser, nent either by creating a molecule manually, or by fetch- •• the deep integration of HTML, CSS and JS in the ing ChemDoodle JSON or the contents of a MOL file browser creates a seamless user experience, and or other molecular structure file. The components are •• the ChemDoodle Web Components library can be “chemically intelligent”: chemical data loaded in com- loaded and displayed wherever a HTML5 engine is ponents can be later handled or altered with scripting. available, including WYSIWIG text editors, Apple’s Support for building components is also available in the Cocoa development kit, and mobile app webviews. ChemDoodle v7 desktop application. Component code can be exported through the “Generate ChemDoodle Beyond rendering 2D and 3D chemical graphics, the Web Component” dialogue screen, however, advanced library also provides access to cheminformatics algo- users will prefer to use the CWC API (Figure 2) for full rithms, chemical file input/output and manipulation, control over component appearance and behavior. Tuto- and a toolset for chemistry web application development rials for using the CWC API are provided on the CWC through a component system that gives the library its website, web.chemdoodle.com. name. The components of the CWC library are special- ized HTML5
Figure 1 JavaScript code for creating an instance of a Viewer component on a web page. The ChemDoodle Web Components library is A included in the web page using the