The Chemical Structure Editor

Many cheminformatics technologies are vital to the practice of chemistry today. Some would include: structure-searchable databases; fast substructure searching; various file formats and line notations encoding molecular structure; numerous in silico property predictors; Molecular modeling; and 3D visualization.

Despite their diversity, a common link connects each of these technologies: the chemical structure editor. Also known as 'molecular editor' or 'sketcher', this genre of software plays the pivotal role between chemists with questions to answer and various cheminformatics tools that can provide those answers.

Ergonomics

Few other forms of software get as much "face time" with chemists as a 2D structure editor. Due to their constant use of this kind of software, experienced chemists are often quite discerning when it comes to form and function. Drawing structures is considered a necessary distraction from other more important tasks, so saving time and reducing errors are highly valued.

Although numerous structure drawing packages have been developed over the last few decades, very little has been published about the elements comprising a good structure editor.[3] Reasonable starting points include:

  • Eliminate and reduce repetitive tasks. A good example is the addition of atom labels to a carbon skeleton. Another is the alignment of rings in a regular grid-based coordinate system.
  • Readable display at any resolution. 2D chemical structures vary significantly in size and layout. It's important that structures can be easily viewed regardless of magnification.
  • Aesthetically-pleasing output. Chemical structures represent a graphical language with a long history. A structure editor needs to adhere to the conventions of this language whenever possible. [1, 2]

The Web

Web applications, and in particular software designed to run in a Web browser, offer unique constraints and possibilities as a software platform, when compared to the desktop. The two of the most attractive features of the Web browser as a platform are ease of deployment and maintenance. But browser-bases software must work within the limitations of the medium, including limited performance and graphics capabilities. These limitations are especially relevant in chemistry where many forms of data, such as chemical structures, are most naturally expressed graphically.

For many years, the best-practices solution to the limited capabilities of Web browsers was browser plugins, specifically Adobe Flash, Java Applets, and more recently Silverlight. Although these technologies solved the immediate problem of a Web-ready software platform, they did so at a price. That price included issues related to security, maintenance, and integration with the browser's Document Object Model (DOM) and default programming language (JavaScript).

Live ChemWriter Editor

Re-Assessing the Browser as a Software Platform

Recently, the emergence of HTML 5, robust JavaScript developer tools, and the rediscovery of latent browser capabilities has ushered in a wave of innovation around plugin-free browser interactivity. It turns out that the browser continues to be capable of many things previously thought impossible.

ChemWriter is a product of this wave of innovation. Designed by Web developers for Web developers, ChemWriter breaks cleanly with the past by offering a structure editor that completely integrates itself into the browser's underlying DOM and JavaScript engine.

But implementing a structure editor in JavaScript is not enough - it must also satisfy the needs of chemists for an ergonomic tool that just works. And it must satisfy the needs of developers for a flexible, easy to deploy component. ChemWriter is the product of over three years of development with a constant focus on both of these objectives.

References

  1. Graphical Representation Standards for Chemical Structure Diagrams
  2. Graphical representation of stereochemical configuration
  3. Basic primitives for molecular diagram sketching
  4. Molecular structure input on the web