The Mobile Molecular DataSheet (MMDS) app has provided the ability to draw chemical reactions for some time now. Soon it will be possible to output them as multistep sequences, rather than discrete units.
Reactions are stored in datasheets, which are a made up of rows and columns. Reactions are encoded within datasheets using extended markup. MMDS requires that reactions are provided in a component-wise format, which means that each of the reactants, reagents and products are drawn separately. As well as providing the structures, the components can also be associated with name and stoichiometry, and even more highly structured apps (such as Yield101) can build on this, to manage other information, such as quantities.
The component-style representation is well suited for lab notebook applications, but it does have its down sides: the reaction layout is done by algorithm, so you can’t position everything exactly where you want it, for display purposes. Sometimes this is useful, but for producing the final manuscript not so much, since fine grained control is often desirable.
The other limitation is that reactions are stored in sequential manner: multistep reactions are represented by creating multiple rows within the marked up datasheet, e.g.
This output diagram shows 3 rows, which describe a stepwise dinitration of toluene, followed by reduction. At the moment, there is a first draft piece of code that examines a reaction datasheet for linear stepwise sequences, such as this one, and reorganises them so that they look like what most chemists would prefer to see:
This is done algorithmically, by comparing products to the reactants in the following row. When a sequence is identified, a bit of reshuffling is done, and the subcomponents are arranged on the page, starting left-to-right then switching to top-to-bottom. The algorithm does not currently doesn’t zig-zag or switch-back, so really long sequences will get quite tall, but for reaction sequences with up to 4 or 5 steps the results should be highly agreeable.
Each sequence is described as a single graphic, which can also be useful when generating formats like SVG, which can be edited after the fact.
This capability will be made available from the Mobile Molecular DataSheet app in the near future, by exposing it as a webservice.