# Has there been any development in drawing structures on Chem.SE?

I understand that this question has been asked earlier here and here (The instances could have been more and I hope I can be pardoned for such follies:) Then, there is another one about Lewis structures here.

After looking at all of them, I just wanted to know if there has been any new development in the matter. In one of answers in the Lewis structures question, MathJax had been used for the Lewis structure. It made me curious if we could make something similar using MathJax in specific and if not MathJax then, has there been any new development in this matter? The linked posts seem pretty "old" except the Lewis structures one so, I thought I might as well, ask so that I am not missing out on anything ;)

As far as I am aware, there are no developments on this front, and I wouldn't hold my breath.

There are two main possibilities for a "native" solution (i.e. one that is baked into Stack Exchange). One is a WYSIWYG, graphical interface which lets you literally draw molecules. I expect that this is way too much work and will never be done just for one site on Stack Exchange. The other is a text-based method where you type in some code and it's rendered as a molecule. For example, the chemfig package in LaTeX does this. The major difficulty in this would be to make it work with MathJax (note MathJax ≠ LaTeX). However, this is quite difficult to use, and is decidedly not user-friendly at all, so I don't see huge benefits in going down this path.

What I could see being done is a userscript, which adds a button to the Stack Exchange editor which launches an external WYSIWYG popup. The drawing functionality can be provided by some external website (I don't know what's on the market). Then when you hit save, it could generate an image, upload it for you to i.stack.imgur.com, and maybe even put the chemical name / SMILES / InChi etc. as the alt text. From a technical perspective I don't know if that's possible, nor do I have any real interest in looking into it, but I'd view it as the least impossible route. Of course, this is not native, and you'd have to install it on every browser you use.

Personally I'm happy to stick to image generation via ChemDraw (while I still have access to it).

I'm wondering whether JSME Molecule Editor would do?

Here's from Wikipedia:

JME has been ported to JavaScript using the Google Web Toolkit (GWT). In analogy to JME, the JavaScript version is named JSME. Its interface is almost identical to that of JME, although some cosmetic options are available. It is released as free and open-source software under a 3-clause BSD license in the form of minified JavaScript produced by GWT.

As of February 2017, JSME is capable of SMILES, MOL (original and V3000), InChI (and key), and SVG export.

• I'm hearing developers and UX-designers silently crying 'overhead' in the background. It looks like a nice idea though. Mar 11, 2021 at 22:24
• Indeed overhead. I checked many options and this one is the more reasonable one. Perhaps we may have some sort of 'off-the-grid' window option from which we end up with .mol format and a pre-formatted caption, say .png formatted. Chemistry has its own requirements I'm afraid. We've got to start somewhere. Mar 11, 2021 at 22:47
• Chemistry.se never was and probably never will be a priority at SO (the company). Even if this could be adapted at more pages I still don't see it coming. Even if it had no overhead at all. We have been asking for something like this on and off for years now. Not even after the site graduated was there any outlook for this. And I'm not even starting to think about revisioning like the site does it. There are plenty of graphics solutions out there, yet we don't have any here. Also, it took them ten years to implement tables … Mar 11, 2021 at 22:57
• I noticed improvements in the format (proper rendering of italic text; proper sizing of equations) on my phone that seem to have been fixed within the last ten days. Clearly there is some movement in improving SE, notably affecting Chemistry. Having said that, I agree odds are slim to seeing chemical structure drawing rendering and editing ability any time soon. Mar 14, 2021 at 19:25
• Equations are rendered by your client, so this could come from anywhere; I'm not even sure Stack Exchange is running the last version of MathJax. There will always going to be fixed that also affect chemistry, but these will be based of the templates that are running for the entire network. Some simplifications to the UI some years back were introduced to make maintenance easier. This caused a lot of noise. However, fixes are not new features; what doesn't exist can't be broken. Pulling more from upstream is something completely different. I just don't have the strength to hope anymore... Mar 14, 2021 at 21:50