A program for the input and editing of molecules is an indispensable part of every cheminformatics or molecular processing system. Such a program is known as a molecule editor, molecular editor or structure sketcher. Its function is to facilitate entry of molecules or reactions into a computer with help of mouse and keyboard actions, and recently also by using a touch screen. Molecule editors are used to create chemical illustrations or as tools to draw queries when searching chemical databases or entering molecules when calculating various molecular properties.
One of the most important areas where the interactive molecule structure input is needed is molecule editing within web browsers. The World Wide Web, introduced originally as a medium for the exchange of scientific information, is affecting in meantime practically all aspects of our life, but scientific and technical applications still benefit proportionally more from the web technology. Scientific computing is moving more and more in the direction of web services and cloud computing, with servers scattered all around the Internet, and the web browser is becoming the universal scientific user interface. Chemistry is no exception from this trend and input of molecular structures directly within a web browser is therefore of utmost importance.
JSME molecule editor development
JSME has been tested with success on all major browsers (Internet Explorer, Firefox, Google Chrome, Safari and Opera). Close attention was given to support also the older versions of Internet Explorer (6 and 7) because several large industrial companies still use these legacy versions as their standard browser. Figure 2 shows a screenshot of JSME running within the eTOXsys system  in Internet Explorer 6 where it provides a seamless replacement of the JME applet.
Figure 2. The JSME editor in the “classics” look running in the development version of the eTOXsys system in Internet Explorer 6.
In addition to desktop computers running Windows, OS X and Linux operating systems, JSME has been tested also on several touch devices including Apple’s iPhone and iPad and Android smartphones and tablets. Practically all JSME editing features are fully supported (with exception of molecule rotation on Android devices), showing that JSME may be used to edit molecules on many modern smartphones and tablets.
The quality of the graphical display of JSME is browser dependent. On the Internet Explorer versions 6, 7 and 8 (using the VML) when line antialiasing is turned off, the depiction of structures is almost identical to the original Java implementation. Surprisingly, the Google Chrome (tested on version 25 and earlier) provides the worse display quality, where some bonds with a particular angle are not visible when antialiasing is not used. Generally SVG implementation in many browsers seems to have difficulties to render nicely one pixel thick lines without antialiasing. To fine tune the molecule display JSME provides options to change the line thickness of the molecular drawing area and to turn antialiasing on or off.
Results and discussion
JSME molecule editor features
The capabilities of JSME are practically identical to those of JME. JSME supports creation and editing of molecules and reactions (Figure 3). A built-in substituent menu and several keyboard shortcuts provide speedy access to the most common editing features and allow easy and fast creation of even large and complex molecules. The editor is able to export molecules as SMILES , MDL/Symyx/Accelrys Molfile  or in the compact “JME” format (one line textual representation of a molecule or reaction including also 2D atomic coordinates). The SMILES code generated by JSME is canonical, i.e. independent on the way how the molecule was drawn. The editor can also serve as a query input tool for searching molecular databases by supporting generation of complex substructure queries (Figure 4), which are automatically translated into SMARTS . Input of reactions is also supported (Figure 5), including generation of reaction SMILES and SMIRKS . Molecular structures and reactions can be imported and exported using the system clipboard or the drag and drop feature provided by HTML5 compatible browsers.
Figure 3. The JSME editor with an open substituent menu.
Figure 4. JSME supports generation of complex substructure queries.
Figure 5. Input of a reaction with atom mapping.
The JSME editor can communicate with other elements on the HTML page via its public functions. These functions are used, among others, to retrieve created molecules, change the editor appearance or programmatically display new molecules. Detailed description of JSME functions is available on-line in the JSME documentation page .
Availability and requirements
The editor is available for download from the JSME Home Page http://peter-ertl.com/jsme/.
The authors declare that they have no competing interests.
The authors would like to thank Markus Sitzmann, Oliver Sacher and Luc Patiny for testing the development version of JSME and for helpful comments and suggestions.
J Cheminf 2010, 2:1. BioMed Central Full Text
ChemDoodle 2D Sketcher.
JME Molecule Editor.
SAR QSAR Env Res 2003, 14:321-328. Publisher Full Text
SMILES - A Simplified Chemical Languagehttp://www.daylight.com/dayhtml/doc/theory/theory.smiles.html webcite
SMARTS - A Language for Describing Molecular Patternshttp://www.daylight.com/dayhtml/doc/theory/theory.smarts.html webcite
SMIRKS - A Reaction Transform Languagehttp://www.daylight.com/dayhtml/doc/theory/theory.smirks.html webcite