Skip to main content

Julia meets RDKit

Julia is a young programming language that is getting some traction in the scientific community. It is a dynamically typed, memory safe and high performance JIT compiled language that was designed to replace languages such as Matlab, R and Python.

We've been keeping an an eye on it for a while but we were missing something... yes, RDKit! Fortunately, Greg very recently added the MinimalLib CFFI interface to the RDKit repertoire. This is nothing else than a C API that makes it very easy to call RDKit from almost any programming language. More information about the MinimalLib is available directly from the source.

The existence of this MinimalLib CFFI interface meant that we no longer had an excuse to not give it a go!

First, we added a BinaryBuilder recipe for building RDKit's MinimalLib into Julia's Yggdrasil repository (thanks Mosè for reviewing!). The recipe builds and automatically uploads the library to Julia's general package registry. The build currently targets Linux (i686, x86_64 and aarch64) and Mac x86_64 architectures and will also be built for the new Mac as soon as all RDKit dependencies are also compiled for its architecture.

Having an installable version of the MinimalLib from Julia's package registry made the work of writing the wrappers much nicer. We did it and they are now available and ready to be used on this GitHub repository. Some documentation is also available here

Note that RDKit's MinimalLib and the Julia wrappers are both still work in progress so issues are expected.

To install it, just open Julia's REPL and type:

julia> import Pkg
julia> Pkg.add(url="")

Usage example:

using RDKitMinimalLib

mol = get_mol("CC(=O)Oc1ccccc1C(=O)O")
molblock = get_molblock(mol)

We hope you enjoy programming with Julia! :-)


Popular posts from this blog

Identifying relevant compounds in patents

  As you may know, patents can be inherently noisy documents which can make it challenging to extract drug discovery information from them, such as the key targets or compounds being claimed. There are many reasons for this, ranging from deliberate obfuscation through to the long and detailed nature of the documents. For example, a typical small molecule patent may contain extensive background information relating to the target biology and disease area, chemical synthesis information, biological assay protocols and pharmacological measurements (which may refer to endogenous substances, existing therapies, reaction intermediates, reagents and reference compounds), in addition to description of the claimed compounds themselves.  The SureChEMBL system extracts this chemical information from patent documents through recognition of chemical names, conversion of images and extraction of attached files, and allows patents to be searched for chemical structures of interest. However, the curren

ようこそ、ケンブルへ! - Welcome to 剣舞瑠 ! -

The following is written in Japanese.... ケンブルチーム(ChEMBL Team)は、欧州バイオインフォマティクス研究所( EMBL-EBI )にあり、創薬研究に有用な化合物やターゲット情報を提供するデータベースを開発しています。 ChEMBLdb は、創薬研究に有用な医薬品化合物の情報を提供するデータベースです。現在、約50万個の化合物情報、約190万件の活性情報及びそれらのターゲット情報が登録されています。ユーザーは、生物活性化合物の情報を部分構造検索や類似性検索で調査したり、また、ターゲットのアミノ酸配列からBLAST検索でアッセイ情報を収集することができます。 ケンブルチームでは、キナーゼに特化したカイネースサファリ( Kinase SARfari )のサービスも開始しました。 日本語でのご質問、ご要望は kaz(at) までどうぞ。チームメンバー一同、皆さんのご利用をお待ちしています!

Target predictions in the browser with RDKit MinimalLib (JS) and ONNX.js

Some time ago we showed an example of how a model trained in Python's PyTorch could be run in a C++ backend by exporting it to the ONNX format.  Greg also showed us in his blogpost how our multitask neural network model could be used in a very nice KNIME workflow by exporting it to ONNX. That was possible thanks to RDKit's Java bindings and the ONNX Java runtime. As a refresher, most of the most popular machine learning frameworks can export their models to this format and many programming languages can load them to run the predictions. This certainly is a beautiful example of interoperability! In November 2019 RDKit introduced a reduced functionality Javascript library which is able to do all we need in order to use our multitask model in the browser. So, the only thing that was left to do was to combine these two awesome tools... and we did it! Here is our demo with its available source code . Start typing a smiles into the box and enjoy! Updated code to generate the m

This Python InChI Key resolver will blow your mind

This scientific clickbait title introduces our promised blog post about the integration of UniChem into our ChEMBL python client. UniChem is a very important resource, as it contains information about 134 million (and counting) unique compound structures and cross references between various chemistry resources. Since UniChem is developed in-house and provides its own web services , we thought it would make sense to integrate it with our python client library . Before we present a systematic translation between raw HTTP calls described in the UniChem API documentation and client calls, let us provide some preliminary information: In order to install the client, you should use pip : pip install -U chembl_webresource_client Once you have it installed, you can import the unichem module: from chembl_webresource_client.unichem import unichem_client as unichem OK, so how to resolve an InChI Key to InChI string? It's very simple: Of course in order to reso

ChEMBL 28 Released!

  We are pleased to announce the release of ChEMBL_28. This version of the database, prepared on 15/01/2021 contains: * 2,680,904 compound records * 2,086,898 compounds (of which 2,066,376 have mol files) * 17,276,334 activities * 1,358,549 assays * 14,347 targets * 80,480 documents Data can be downloaded from the ChEMBL FTP site: . Please see ChEMBL_26 release notes for full details of all changes in this release: DATA CHANGES SINCE THE LAST RELEASE This release includes several new deposited data sets: Donated Chemical Probes data from SGC Frankfurt (src_id = 54) SARS-CoV-2 screening data from the Fraunhofer Institute (src_id = 52) Antimicrobial screening data sets from CO-ADD (src_id = 40) Plasmodium screening data from the UCSD Winzeler lab (src_id = 51) MMV pathogen box screening data (src_id = 34) Curated data