Drawing structural formulas is a very common task in chemistry. Simple chemical formulas are often not sufficient, they are ambiguous for pretty much any non-trivial molecule, and structural formulas are pretty much required to explain reaction mechanisms accurately.

So while we can write formulas like $\ce{C6H12O6}$ natively on the site, drawing the following structural formula is not as easy

enter image description here

To draw such formulas you need either have a local pogram installed, or copy an existing image from somewhere, you can't draw them here.

I think it would be very useful to have a tool for drawing structural formulas embedded in the site. I'd like to collect our requirements here, as well as collect information about existing libraries that could be used on the site.

The must-have features are

  • drawing of a single chemical formula
  • drawing of a reaction (A -> B)

Other features that would be useful are

  • the ability to save the result as png, so that viewers that don't edit don't have to load the javascript and there is no delay in display
  • Users should be able to copy the formulas from another post and user them in their own posts (an answer would likely need some of the same formulas the question uses)

If you have some more ideas on what such a libray should be able to do, please comment on this post.

The main purpose of this post is to find libraries that could be added to the site. Please add one answer for each library that could be implemented. It should not only be the name, but also a short evaluation of the features and maybe your own impression of the library.

  • 1
    $\begingroup$ There's a list on Wikipedia $\endgroup$ Commented Oct 24, 2014 at 17:59
  • 1
    $\begingroup$ I'd also suggest that saving to SVG might be a good alternative to PNG. $\endgroup$ Commented Oct 24, 2014 at 17:59

5 Answers 5


ChemDoodle Web Components

link: http://web.chemdoodle.com/

licence: GPLv3

This library looks like it has enough features for us, the documentation for developers on the site also looks nice on first glance.

It has support for curly arrows to draw mechanisms, which seems pretty nice.

SE might have to get the commercial licence, though.

  • 1
    $\begingroup$ I had started work on making this into a plugin (just poking around, mostly), but I'm way to busy to do anything now :/ $\endgroup$ Commented Oct 24, 2014 at 13:39
  • $\begingroup$ I'll point out that the author even came to answer questions $\endgroup$ Commented Oct 24, 2014 at 19:35
  • $\begingroup$ Another plus is that ChemDoodle offers a 3D viewer, so both 2D and 3D rendering is available. $\endgroup$ Commented Oct 25, 2014 at 20:29

Marvin Sketch

Link: http://www.chemaxon.com/products/marvin/marvinsketch/

Licence: FreeWeb

I know Marvin Sketch also has an applet kind of editor. Maybe something like that can be incorporated.



link: https://lifescience.opensource.epam.com/ketcher/

licence: AGPLv3

Seems to have all the essential features.



link: http://www.ctan.org/pkg/chemfig

licence: The LATEX Project Public Li­cense 1.3

If you are handy with LaTeX, you can typeset the desired objects and save them as whatever figure you want. Rehost to something like imgur and it will make it readily available to punch into any SE post.

(EDIT: Just realized OP was asking for something that draws directly on the site. I suppose if you used shareLaTeX then Chemfig would count but it isn't as 'direct' as some of the other options)



link: http://peter-ertl.com/jsme/

licence: BSD

looks somewhat ugly, and I don't like that the bonds don't snap to certain angles.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .