Ergonomic molecule editing, and praise for Mac-style dialogs

macdialogNormally I wouldn’t consider a trivial dialog box to be worthy of a blog post, but it’s as good a time as any for a progress update on XMDS. The sketching interface for editing molecular structures is now somewhat feature complete. There are a few bits to come back to, but in general the methods for adding, deleting, editing and aligning atoms and bonds are available in a highly redundant way. By redundant, I mean that in a good way. The editor is based on a confluence of methodologies that I’ve built out in various products over the years: (1) the conventional way of drawing molecules with a painting-style toolbox (see SketchEl); (2) the “drawing primitives” designed for precise editing when user interaction is expensive, motivated by mobile devices with tiny screens; and (3) keyboard shortcuts, designed so that an expert can draw molecules incredibly quickly without having to reach for the mouse, battle-tested with the BlackBerry version of MMDS back in 2010, when touchscreens were not yet ubiquitous. Continue reading

Advertisements

Swift gets a bit swifter: version 1.2 first impressions

Xcode 6.3 appeared in my update tray this morning, and since it contains Swift 1.2, I installed it right away. The first thing I noticed, after fixing about 200 compiler errors due to minor changes in language syntax, was that the work-in-progress XMDS app all of a sudden got really snappy. Rather than feeling like using a computer that’s 10 years obsolete, algorithms that were borderline rate limiting running in the main UI thread just happen like they ought to. As a reality check, I re-ran the horrendously underperforming algorithm that I complained about awhile back, and rather than taking 320 seconds to calculate 7 log P values, it now gets the job done in 30 seconds. That comparison is with standard compiler options. The alternate target with all the optimisation settings dialled up actually crashes the Swift compiler, so no metrics for that.

Nonetheless, 10x improvement in a scenario that’s relevant to cheminformatics, and a qualitative observation that this seems to be representative for GUI tasks, is a big deal. I’m sure there’s a lot more fat to trim over the coming years, since the Swift syntax is designed in a way that allows the compiler to do some pretty hardcore optimisation. Getting the practical implementation levelled up to “adequate” is a good start!

XMDS takes another step: copying molecule into CDD Vault

xmds-to-cddIt may be a slightly arbitrary milestone, but the Mac app-in-progress XMDS has performed the first instance of a deed that might be argued as being useful. Most of the sketching functionality is now operational, which combines pretty much all of the drawing capabilities of the MMDS app and the SketchEl desktop structure drawing tool, as well as a few new ideas. The feature that was added today is clipboard interoperability, which means that structures can be used elsewhere. In this screenshot, the structure has been pasted into an instance of CDD Vault in the browser, in draw-new-molecule mode.