XMDS and Mac OS X integration: drag’n’drop and previews

xmds_qlgen1 The OS X Molecular DataSheet (XMDS) app has been getting a bit more attention lately, after being interrupted by the summer conference season (slides, poster, slides & more slides) and the PolyPharma app (which is now submitted to the AppStore and waiting for approval). The next step that brings XMDS closer to being a finished product rather than a functional beta is deeper integration with OS X.

First of all, drag & drop is a mainstay of the Mac OS X integrated user experience, and it is now straightforward to move data around from the spreadsheet-like datasheet view in this way. Dragging with the Cmd-key held down causes the selected cells to be copied in a conveniently portable text-encoded format, and can be dumped into any other app, e.g. a text editor, a browser, or another chemically-aware app, such as another XMDS window. Dragging a single cell is relatively simple from a data conversion point of view because it can be represented as ordinary text, or a text-encoded molecule, but groups of cells are a bit more tricky. Unlike with a regular spreadsheet, there is more to copying a rectangular grid of cells onto another group, since the columns are all named and typed.

In the interests of data integrity, the default drag’n’drop method uses native file formats (SketchEl molecules and XML datasheets), but dragging with the Cmd+Shift keys causes it to downgrade to the industry ‘standard’ MDL Molfile or SDfile format for anything potentially molecular. This is a great piece of functionality for supplementing applications that need a sketcher, and this includes webapps. It was possible to do this previously, but now there is an even faster way, i.e. pick the molecule and Cmd-Shift-drag it into the destination.

For graphics, it gets better: drag a molecule cell with the Option-key held down, and it makes a nice mini-PDF vector diagram of the molecule, and allows it to be dragged directly into presentation apps (e.g. Keynote & Pages). This is a shortcut for the previously implemented sequence of select-setup-drag, so technically it is not new functionality, but it makes it really easy to use XMDS to support composition of diagrams with a lot of molecules.

The Mac OS X platform has a somewhat involved technique for allowing apps to integrate themselves with the Finder. Whenever you click on a file, it typically shows you a preview, if you have one of the applicable viewing modes enabled. If you hit the space bar, the preview pops up in magnified form. The previewing process can be supplemented by custom applications by creating what is called a “QuickLook plugin”, and XMDS now supports one of these. Once it is installed, the contents of chemical datafiles – molecules and collections thereof – can be viewed very conveniently indeed:

xmds_qlgen3xmds_qlgen1xmds_qlgen2

Importantly, the metadata header for datasheets (title & description) is displayed prominently, followed by the structures and auxiliary fields. Note that the last case – experiments.ds – contains aspect extensions to the core datasheet format for describing the way the primitive data is wrapped into a higher order datastructure, namely chemical reaction experiments. The way it is shown above reflects the fact that the necessary aspects have not yet been implemented in XMDS (it’s still on the to-do list), so what you see is a summary of the underlying content without the extra markup.

Advertisements

2 thoughts on “XMDS and Mac OS X integration: drag’n’drop and previews

  1. I now have several Quicklook plugins that can display chemical structures, is there anyway to decide which is used for which molecule file type?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s