RealTimeChem and molecules: share ’em if you got ’em

The Open Drug Discovery Teams app (ODDT for short, or “Oddity” if you prefer) now includes the #RealTimeChem hash tag as its own separate topic. Recently written up C&E News, the chemistry-centric tweetup is going to convene RealTimeChem week, starting 22 April 2013.

In order to take advantage of this anticipated surge of chemistry content being shared online, we added the new topic to the ODDT app, which you can download for free from the iTunes AppStore if you have any kind of iThing. The app provides a magazine-like window into collected documents from the open internet, that are collected with the help of social media tools such as Twitter, and organised into topics.

Most of these topics are regular HTML web pages. But not all. The ODDT app, and its corresponding server, are chemically aware: they understand certain structure-based chemical datatypes which encode molecules, reactions and collections thereof mixed with data.

So if I were to enter some kind of partial timewarp, and I was back in grad school sweating it out making organometallic compounds, and Twitter existed in the ’90s, I might be tempted to let everyone know what I just accomplished by sharing a picture of the compound I had synthesised:

The easiest way to do that would be to draw it out with any one of a few dozen capable drawing packages, then save it as a bitmap, and push it out into Twitter via some very convenient mechanism such as twitpic. Then all my followers, and everyone who follows the #RealTimeChem hashtag, will see this, and my 15 seconds of fame will be suitably glorious.

But a picture of a molecule is all but useless to a computer. If anyone wants to add it to their own database of known chemicals, or use it for a search, or calculate properties, they have to view it on the screen and redraw it from scratch. On the other hand, if it were tweeted out as raw data, then nobody would be able to see what it was without downloading the file and opening it up in a chemically-aware software package, which is another way of saying that it’s not gonna happen.

There is a way to have our cake and eat it too, though: by uploading the raw chemical representation to the service provided by molsync.com, it is possible to view the structure in a web page, and also download the data (in several different formats), and also prepare graphical representations (according to user-selected rendering parameters, in several different useful graphics formats). To see what I mean, check out this link:

As long as your browser isn’t too ancient, you will see a picture of the molecule, some calculated properties, and several convenient buttons for sharing on various social media sites. And just as importantly, there is also a big button labelled Download Molecule. That provides access to the raw data, and graphical renderings.

Now back to what this has to do with ODDT and #RealTimeChem: the ODDT app understands chemical data, which means that if you tweet out something with a topic hashtag, and a link to any one of:

a raw chemical datafile (e.g. the MDL Molfile, RXNfile, SDfile, and various others)

… then ODDT will take a different approach: the app knows how to parse the chemical data, and render it inline using its own methods. Consider a recent snapshot of the Real Time Chemistry topic in ODDT:

The top item shows the structure that is hosted by molsync.com, but rather than deferring to the website to render it, the app acquires the raw data and produces its own thumbnail. Apart from being able to make a nicer, more compact inline picture, this has some important consequences. Tapping on the structure brings up a detail view:

The dynamically created detail view is particularly important with collections of structures (e.g. SDfiles), because they can be easily and quickly scrolled within the app. But the most important part of this view is the set of icons at the top left: each of these represent actions that can be carried out from within the app. The first icon is the generic Open in… feature, which asks the operating system to compile a list of all other apps that can understand the format, and offer to make the hand off. The other icons refer to specific apps, as a shortcut.

So what this all means is that when chemical data finds its way into ODDT, users can quickly study the content visually in its pure form, and then transmit this information to any other apps that happen to be installed on the device. There are quite a few apps that are presently capable of understanding chemical data, including many that I built (see Molecular Materials Informaticsproduct page), and more that you can find on SciMobileApps or the brand new Pistoia Alliance App Catalog. Also, many apps such as the Mobile Molecular DataSheet (MMDS) or MolPrime+ can be used to create then tweet out chemical data via the molsync.com service, which means that the app ecosystem can form a closed loop of data creation, sharing and consumption.

Or you could use #RealTimeChem in a more direct fashion: tweet out a picture of your latest molecule and a link to a corresponding raw datafile (e.g. molecule.mol). That works too!