PAINS filters now on mobile, with MolPrime+

molprime_painsOne of the trends that you should expect to see more of from apps produced by Molecular Materials Informatics is a shift toward performing more advanced calculations internally on the mobile device, rather than calling out to a cloud service. One of the recent demonstrations was shown with the Approved Drugs app, which can now call up Bayesian models for various predictions. The next version of MolPrime+ that is awaiting review on the AppStore incorporates internal calculation of log P, and also brings the ability to identify PAINS filters for molecular structures.

There are a couple of major reasons for backtracking on cloud use: one is the steadily increasing power of mobile devices, which five years ago struggled to provide the bare minimum capabilities needed to edit and store small datasets, and the other is the slow but steady march of the software libraries that make up these apps. As each fundamental algorithm is ported, validated, tested, optimised and demonstrated in production use, more feature possibilities become something that is a straightforward incremental addition, rather than a big over-reach.

Many of the important steps forward have been the result of collaborative projects. For instance, a year ago a joint project with the appropriately named Collaborative Drug Discovery resulted in a reference implementation of the ECFP/FCFP fingerprints (contributed to the Chemical Development Kit library), which was followed by an upgrade of the TB Mobile app which required porting the fingerprint implementation to Objective-C in order to make use of some basic Bayesian modelling capabilities. Eventually these were used in the Approved Drugs app to replace the rather crude similarity metric that was being used, and subsequently to bring some relatively sophisticated predictions made by combining these fingerprints with Bayesian models that had been pre-created using a more conventional desktop environment.

More recently, ongoing work with the Royal Society of Chemistry required certain calculation functionality from my company’s core libraries, with the need to operate in a purely “app local” environment, due to confidentiality concerns. Required were several calculations, such as prediction of log P using atom environment contributions, and detection of the Astra-Zeneca filters used to eliminate “ugly compounds” from early stage screening, for use in the Medicinal Chemistry Toolkit app. Since these can both be achieved by implementing a series of substructure query matches, this necessitated porting over a significant number of source files from the toolkit that is normally used for serverside support (written in Java). Once complete, the process of migrating a substructure-based method to mobile becomes quite easy, if the source materials have been compiled and validated already on a conventional desktop environment.

One of the next projects was to evaluate the possibility of porting the PAINS filters, which is basically a list of substructure fragments that encode for species that have been found to simultaneously slam many different high throughput screening assays, i.e. false positives that should not be taken very seriously when they light up the switchboard. Thanks to Rajashi Guha, the source materials are available in the relatively commonly used SMARTS query format, and with a fair bit of work I was able to improve some of my own import algorithms to convert these patterns directly into the query format used by my serverside and app libraries. Much validation and fixing of mistakes later, my serverside libraries now have a passable implementation of this functionality, and because the core technology for applying them had been migrated to Objective-C already, making it available on mobile was fairly straightforward.

Enter the MolPrime+ app, which has been chosen as the test vehicle for delivering this functionality. The app has long had an action button for “show properties” that can be invoked for any particular molecule. The methodology is based on splitting the difference between easy and hard properties: things like molecular formula, rotatable bonds, obvious valence violations, and mass spectroscopy distribution are calculated right away by the app, and shown. Calculations requiring a bit more algorthmic depth are achieved by handing the reigns over to a webservice, and the app provides just the visualisation of the result.

The latest version of the app contains an in-progress overhaul of the property prediction interface: when you tap a molecule icon a second time, or touch-and-hold, in addition to the action menu icons popping up, the app also reserves a space for a side-scrolling panel that contains a variety of calculated properties, that can be examined simple by panning through. All of these properties are calculated locally on the device, so the calculation is initiated automatically: there is no issue with sending potentially private data across the open internet, and so the information is generated in a background thread, and displayed as soon as it is available.

Right now calculated properties include the easy-to-calculate scalars, as well as log P and molar refractivity, which are a bit more involved, but no longer require a webservice to help out. Valence violations are determined and displayed (with offending atoms coloured with a red backdrop). Each PAINS filter violation is represented by a structure with the relevant atoms highlighted.

There are quite a few more calculations that are on the to-do list for implementing or migrating to the app universe: acidic/basic functional groups, tautomers, stereochemistry, and a variety of other properties, both of the scalar numeric and atom pattern highlighting variety. Look for these to be added to the MolPrime+ app first, and then gradually making their way to the rest of the suite as time goes by.

One thought on “PAINS filters now on mobile, with MolPrime+

Leave a Reply

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

You are commenting using your 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 )

Connecting to %s