Electrostatic Complementarity™ scores: How can I use them?

Flare™ V2 introduced a new analysis method called Electrostatic Complementarity (EC). The basic idea is quite simple: the maximum electrostatic affinity between the ligand and the receptor is achieved when the electrostatic potentials of the ligand and the receptor match (that is, have the same magnitude and opposite sign). At first glance that seems obvious. At second glance it seems a bit more surprising – why wouldn’t it be a good idea to have an even larger potential on the ligand to make the interaction energy even better? The reason is that the improved electrostatic interaction energy between the ligand and the protein will be cancelled out by the increase in desolvation penalty for the ligand.

So, all we need to do is to compute the electrostatic potential of the ligand and the protein over a suitable contact surface, and then compute some sort of correlation metric to measure how similar they are. In a vacuum, this calculation would be quite straightforward. Unfortunately, water (as usual) makes everything much more complicated. In the absence of running long dynamics simulations, we’re going to have to approximate the solvent effects somehow. I’m not a great believer in continuum solvent approximations for this purpose, as water in and around a protein active site is very far from being a continuous dielectric. However, we must do something to account for the water. Our answer is a mix of a complex dielectric function and special treatment of formal charges, which we’ve already show works well for visualizing the electrostatic potentials inside a protein active site (ref to earlier blog post on protein interaction potentials).

 


Figure 1: Electrostatic potentials and surface complementarity for the biotin-streptavidin complex.

So, we can compute the potentials (J. Med. Chem., 2019, 62 (6), pp 3036–3050), we can visualize them by coloring the surface by the complementarity (Figure 1), and we can compute an overall EC score. The question now is ‘Does it actually do anything useful?’.

Well, we’re computing an overall EC score, so the obvious thing to check is if the score correlates with activity. We have done this for lots of data sets (see Figure 2 and the J Med Chem paper referred to earlier), and you get anywhere from a modest (r2=0.33 for RPA70N) to very good (r2=0.79 for PERK) correlation. Problem solved, then: just dock your ligand designs into your protein, compute EC scores, and pick the one with the highest EC score to make!

 


Figure 2: Correlation of EC scores with activity for a range of data sets.

Unfortunately, it’s not actually that simple. While we do show that EC score correlates with activity for a wide variety of data set on different targets, these data sets are very carefully curated. The reason is that the binding of a ligand to a protein depends on many different physical effects. Electrostatics is one of these, and a very important one, but it’s not the only one, so EC score is only going to predict activity differences where the other effects do not change.

The data sets used to get the correlations in Figure 2 are very conservative: the ligands  within each set are all very closely related, they are all very close to the same size, they have much the same number of rotatable bonds, they have consistent binding modes, and so on. In addition, we find that to get a strong correlation you need to minimize alignment noise (much as you do when generating a good 3D QSAR), so we align all the ligands on a common substructure rather than relying on a free dock.

All other things being equal, then, a higher EC score should give you a higher affinity. Unfortunately, in the real world, all other things are rarely equal, and so unless you are looking at quite conservative changes (for example asking where on my ligand I could substitute a fluorine to improve affinity) the EC scores are likely to be a poor guide. Back to the original question, then: ‘Does it actually do anything useful?’.

Luckily, although the single numeric EC score is very sensitive to placement of the molecule in the active site, the distribution of EC values over the surface is much more robust. The primary use of the EC method isn’t the calculation of scores: it’s the visualization of where your molecule is matching the protein electrostatics well, and where it isn’t matching as well (Figure 3). This gives you hints as to where you might want to make changes to your molecule, and what changes you might want to make: add a halogen? Move a nitrogen in a heterocycle? Small electrostatic interactions to halogen atoms or to the edges of aromatic rings are hard to visualize any other way.

 


Figure 3: The mGLU5 inhibitor on the left has a minor electrostatic clash on the pyridine ring, as seen in the EC surface coloring on the left. Placing a fluorine in this position removes the clash and improves affinity.

The primary use of the EC method, then, is analyzing your ligands and pointing out where improvements can be made. You can be confident that these suggestions are sensible, as we have shown in multiple data sets that where the difference between ligands is primarily electrostatic the EC score correlates with affinity. However, the EC scores themselves aren’t a general predictor of affinity, as there are many factors not included in the score that can make a molecule a better or worse binder.

If you’d like to visualize the electrostatics of your molecules in their active site and get guidance on how to improve them, request a free evaluation of Flare.

Review of Symposium ‘Innovative Software for Molecule Discovery and Design’, New Delhi, India

Manoranjan Singh Sidhu, Neotel Systems & Services (Cresset distributor, India)

On 12th April 2019, the International Centre for Genetic Engineering and Biotechnology, New Delhi, India, hosted the symposium ‘Innovative Software for Molecule Discovery and Design’. Delegates learnt how experienced users at the Institute had used Cresset computational tools to efficiently discover better compounds.

Dr Robert Scoffin, Cresset CEO, opened the symposium with an explanation of Cresset’s patented XED force field. He spoke in detail about the ligand-based and structure-based applications, emphasizing how Cresset technology helps researchers with better visualization and ease of use. Dr Scoffin explained how, Flare™, a new application enabling enhanced designs by using new approaches to protein-ligand analysis, can streamline new molecule design using Electrostatic Complementarity™; this provides rapid activity prediction with visual feedback on new molecule designs and proves invaluable for understanding ligand binding, structure-activity relationships and for ranking new molecule designs.

In a demonstration of Spark™, Cresset’s scaffold hopping and R-group exploration application, Dr Scoffin showed how it can be used to generate highly innovative ideas for your project to escape IP and toxicity traps. Dr Scoffin explained how Spark gives a single assessment of 20 different datasets, thus providing greater insight and adding greater value when compared with alternative applications that build libraries from larger datasets.

Dr Suneel Kumar, Cresset Application Scientist, demonstrated SAR analysis using the Activity Miner™ and Activity Atlas™ components of Forge™, showing how these modules are useful in understanding SAR of the current dataset and how they provide insights to design better molecules.

The symposium was very interactive with many delegates asking questions regarding visualization and scoring correlations, how Cresset software can help fill gaps or complement their existing infrastructure, how large datasets could be reduced to a lesser number of assessments so as to understand the results better, and how Cresset technology could help with synthetic feasibility and commercial availability of a lead molecule.

I encourage anyone who is interested in learning more about how Cresset applications can advance their molecule design projects to request a free evaluation of ligand-based applications or structure-based applications and subscribe to the Cresset newsletter.

“As per the presentation and demonstration, the software provides excellent visualization and gives reliable results, and we look forward to evaluating Forge, Spark and Flare.”

Bioinformatics Group, International Centre for Genetic Engineering and Biotechnology, New Delhi, India

Cresset to participate in the first SCI/RSC Computational Chemistry Workshop on April 10

Talking to a group of medicinal chemists at a conference over lunch raised the following question: “It’s really interesting to see all the clever things that can be done with these software tools, but could we have a meeting where we actually get to try them out for ourselves?” . With this in mind a combined team from SCI and RSC decided to organize a computational chemistry workshop where people could access software and benefit from top quality training from the creators and developers of a range of these tools, each of which address different aspects of pre-clinical drug discovery. All scientists working in this area need tools and techniques for handling chemical information but it is difficult to get an opportunity to try out more than one package at a time and we would all relish a helping hand to get up and running as quickly as possible.

Cresset is always keen to introduce new people to the concept of fields and to demonstrate the ways in which they can be used to design biologically active molecules. We are very happy to welcome Giovanna Tedesco, Senior Product Manager at Cresset, who will present on:


Next generation structure-based design with Flare

Learn how simple structure-based design can be within small molecule discovery projects. The workshop will cover ligand design in the protein active site, Electrostatic Complementarity™ maps and scores, ensemble docking of ligands with Lead Finder, calculations of water stability and locations using 3D-RISM, energetics of ligand binding using WaterSwap and use of Python extensions. Applications you will use: Flare™ , Lead Finder™.

 


Participants will be able to pick 4 out a possible 6 workshops over the day, choosing from sessions covering data processing and visualization; ligand and structure-based design, or ADMET prediction. These are all areas that chemists working in the pharmaceutical, biotech, life sciences and agrochemicals sectors engage with every day. Full details of all workshops are available from SCI and slots will be assigned on a first-come-first -served basis. Most importantly, all software and training materials required for the workshop will be provided for attendees to install and run on their own laptops and use for a limited period afterwards. This will give everyone the chance to take what they have learnt back to their own organisations and try out their newly acquired skills on their own data.

When: April 10, 2019

Where: The Studio, conveniently located next to Birmingham New Street Station, Birmingham, UK

Registration is open and the early bird price of £30 (£40 for non-SCI/RSC members) is available till 27th February. Financial support to cover travel and registration is available for students on application.

I hope you are able to join us for a unique opportunity to get to grips with a wide range of tools and concepts which you can use in your own research.

Find out more and register now.

Caroline Low, PhD, FRSC CChem

SCI Scientific Organizing Committee member and Cresset Discovery Services consultant

Enhancements in Flare V2 allow our scientists to spend more time on your design and analysis project

The release of Flare V2 brings quicker analysis of new design ideas and more automation of workflow processes. Andy Smith explains the advantages that Flare V2 brings to Cresset Discovery Services customers, including more time spent on high-value design and analysis work.

Why wait for the full release of Cresset software?

Before a new version of the software is released, we have already applied the new functionality to our customers’ projects once it has been fully validated by our development team. This means that in additional to the existing available packages within our software Cresset Discovery Services customers get to the added benefit of the upcoming functionality before it is generally released. We always send files which are compatible with customer’s software: if pre-release functionality is used to illuminate our analysis, we save the data in a format so that customers can still review the analysis. Flare V2 opens up exciting new functionality to Cresset’s software customers that invariably has already been extensively tried out by the Cresset Discovery Services team.

Electrostatic Complementarity™ – intuitive SAR and great pictures

The Flare development which has us most excited and is likely to benefit our customers the most is the ability to calculate the Electrostatic Complementarity (EC) of protein-ligand complexes, and project the values onto surfaces for both the proteins and ligands.

EC is a new method developed inhouse by Cresset scientists that distils complex protein ligand interactions into an obvious and informative pair of surfaces which are accessible and understandable to a broad-spectrum audience.

I recently showed the EC feature in Flare V2 to a group of senior medicinal chemists. They were very impressed with the intuitive representation. They commented that the visual surfaces were consistent with their understanding of the SAR of the system, and also added, ‘This will make a great series of pictures for the CEO to use.’ I took this as a huge endorsement of the EC calculations and visualization!

 


Figure 1: Electrostatic Complementarity surfaces for the Aurora A kinase 6hjk crystal structure.

Get a live analysis of good and bad design ideas

The data available from an EC calculation feels similar to that obtained from a Fragment Molecular Orbital (FMO) approach but at a small fraction of the computational expense and in a more visually intuitive form. Within Flare it is possible to process hundreds or thousands of ligands in a reasonable time frame, allowing for live EC analysis of ideas during meetings.

We worked with a team in a brain storming session and used the EC surfaces to quickly highlight the good and bad ideas and emphasize regions of the ligand that required additional attention.

At Cresset Discovery Services we are now using EC as an additional scoring and filtration method for docking and virtual screening ranking, and to further evaluate protein ligand interactions.

Automate day to day workflows with the Python API and RDKit integration

Python has become an increasingly popular and useful scripting language amongst the chemistry and cheminformatics communities, particularly when combined with the RDKit. Flare V2 features a Python API that provides access to all functionality available within the Flare graphical user interface from a Python script. Furthermore, the Flare V2 Python environment allows tight integration with the RDKit: native Cresset methods and RDKit methods can be used interchangeably on molecules loaded into a Flare project. The Python API and the RDKit integration also have an important automation focus feature rather than a purely scientific advancement, and the ability to use Python and the RDKit from within Flare allows fully customizable workflows to be designed and executed.

More time for interesting design and analysis

Including Python and the RDKit directly into Flare makes the process of using Python and the RDKit far smoother. Coupled with the support expertise available from Cresset and the vibrant Python RDKit community it makes this an exciting addition.

I’ve been using the Python RDKit integrated tools and workflow to automate standard protocols, which frees more of my time for the interesting design and analysis work for which Cresset Discovery Services are known. Processing and managing molecules in Flare V2 just got a whole lot more efficient, which means we can pass on this time saving to customers as extra time for analysis or design.

Free confidential discussion

If you’d like to discuss how Cresset Discovery Services can deploy these new tools to advance your project, please contact us for a free confidential discussion.

Flare for Academics

We believe that the lively academic environment is an amazing source of new scientific ideas, algorithms and computational methods. Flare for Academics is a free* licensing option of Flare, our structure-based design software, which has specifically been designed for academic users.

Flare for Academics is a user-friendly environment where academic users can easily develop and test their ideas and methods, or plug-in the most interesting open-source algorithms. It extends on the functionality of Flare Viewer to provide an excellent platform for drug discovery, with a focus on ligand design and electrostatics.

Discover the power of the Python API

The Flare Python API gives academic researchers the opportunity to make their science more accessible through integration into a user-friendly environment.

An environment to build upon and create great science

You will benefit from a robust, commercial standard SBDD environment that enables focus on science by utilizing methods such as protein preparation, protein minimization and multi-core docking. Access is also given to the RDKit cheminformatics toolkit, NumPy, SciPy, and Matplotlib, which are all integral to Flare. Beyond these, virtually any other Python module can be pip-installed making Flare infinitely extendable. An ever-growing collection of featured python extensions that enhance the existing Flare functionality are also provided, these include: plotting, protein mutation, and custom workflows (see also the new Jupyter Notebook integration).


Figure 1. The ‘Extensions’ tab in Flare 2.0.

Low-level access to the graphical user interface and internal processes

The Flare Python API not only provides an environment to develop your own algorithms but also a way to deploy them across a wider user base. The API provides access to all elements of the Flare interface through addition of user-defined controls and context menus.

For example, you may add custom controls into an existing Flare ribbon, or create a new Flare ribbon for Python scripts you frequently use. Custom-created controls in Flare can be created as small or large buttons, spin boxes, custom sliders, or complex dialogues with signals and call-back functions (Figure 2).


Figure 2. Some types of custom controls which can be added to a Flare ribbon.

Automate and distribute Flare calculations

Whenever you need to carry out a completely automated task, for example the overnight preparation of a panel of proteins followed by docking of several ligand series, the most convenient option is to write a Python script that runs outside the Flare GUI. It can then be distributed on a cluster via a queueing system for maximum performance. The pyflare binary is a Python interpreter giving you access to Flare functions using either custom developed or Cresset released scripts.

Upgrade Flare with the Jupyter QtConsole

The native GUI of Flare embeds the Python Console and Python Interpreter widgets. The Python Console is the simplest option to run one-line commands. With the Python Interpreter you can handle slightly more complex scripts: for example, you can load a script, interactively edit it inside Flare and then save your modifications. Both the Python Console and the Python Interpreter have a multi-tab interface that makes it possible to work on multiple Python snippets at the same time.

Python enthusiasts can easily upgrade Flare with the Jupyter QtConsole for access to all the Jupyter features, e.g.: TAB completion, auto-indentation, syntax highlighting, context help, inline graphics, and more. Using this widget, you can type Python commands, examine molecules and draw plots, all in the same window.

Upgrade Flare with the Jupyter Notebook

The Flare Python Notebook is an instance of the Jupyter Notebook embedded into the Flare GUI. It has direct access to the Flare GUI objects and methods, offers an even richer interface and enables editing and running individual code cells.


Figure 3. The Python Qt-Console (left) and Python Notebook (right) in Flare.

Not just a viewer

Flare for Academics is not just a viewer, but a complete, user friendly platform for iterative molecule design in drug discovery.

Multiple protein structures can be easily imported in the Flare project and displayed in the same frame of reference using the sequence alignment and superimposition functions.

Flare’s protein preparation will enable you to optimize your protein-ligand structures by adding hydrogen atoms, optimizing hydrogen bonds, removing atomic clashes and assigning optimal protonation states. Further optimization of the protein active site can be achieved by protein minimization based on the XED force field, and by manually flipping flexible residues or changing tautomeric and charge states for relevant residues.


Figure 4. Flare for Academics is user friendly platform for iterative molecule design in drug discovery.

 
Smart visualization of protein-ligand complexes in grid mode facilitates the comparison between ligand or proteins. The display of a variety of non-bonded ligand-protein interactions makes it easy to understand the different binding modes for your ligands.

The ligand-centric structure of Flare includes a dedicated ligand table and interactive menu giving easy access to all ligand actions, such as sorting on any column, control visibility, tagging and filtering on structure, tags and numerical and text columns, grouping of ligands in custom-created roles. In the ligand table, each molecule is associated to calculated physico-chemical properties, a radial plot and a multi-parametric score to help you design and select the ligands that best match the ideal project profile. Ligand electrostatic interaction potentials calculated with the XED force field can be visualized in the 3D window and in the molecule editor, and used to inform ligand design.

Multi-core docking experiments can be run to predict the 3D structure of flexible ligands in the active site of your protein. Docking in Flare uses Lead Finder™ to provide excellent pose prediction and detailed feedback on new molecule designs.

Discover Flare for Academics

See the features of Flare for Academics, and apply for your 1 year license.

* In most countries; contact us to see if you are eligible for a free license.

Python extension enabling Jupyter Notebook integration in Flare released

In a recent post I wrote about Integrating Jupyter Notebook into Flare as a new Python extension dedicated to Python developers and enthusiasts. The Python extension that makes this possible is now released (Figure 1).


Figure 1. The button which enables the Python Notebook extension.
While using it to carry out my daily Python coding tasks, I have identified a number of features that the protoype extension was missing and were worth implementing. So, there are a few more highlights that I’d like to share with you.

As discussed in my previous post, the feature that personally I enjoy most is the fact that the Flare Python Notebook has direct access to the Flare main_window() object, and hence allows you to work on the project currently loaded in the main viewport, i.e., interact with ligands and proteins, visualize molecular and field surfaces, etc. As this involves running the Python code in the main GUI thread, only a single Python Notebook may have access to the GUI at any given time.

However, I thought it would be useful to be able to run other concurrent, separate pyflare processes within the same Python Notebook while the main GUI process is busy doing a computation, e.g., preparing a protein (Figure 2):


Figure 2. Download a PDB complex in the GUI, then run Protein Preparation.
The Python Notebook remains responsive while the Protein Preparation task is run by a FieldEngine process in the background. This means I can open a second Python Notebook tab and, for example, visualize the 2D ligand structure. Since the new notebook tab runs as a separate pyflare process, it does not have access to the Flare main_window() object, as shown by the absence of the Flare icon and by the tooltip (Figure 3):


Figure 3. Open another tab and carry out some other task in a separate process.
Once the calculation has finished, you can switch back to the main tab and keep on working there.

To provide better integration with the Flare GUI, I have moved the familiar ‘Kernel’ notebook menu controls to the bottom of the window (Figure 4):


Figure 4. Restart/Stop commands can be accessed from bottom left buttons.
Also, the Load/Save commands were moved from the File menu to buttons, in order to provide more control on the location the notebooks can be saved to or retrieved from (Figure 5):


Figure 5. Load/Save notebooks through a standard file dialog.
The Python Notebook extension is now ready for download from Developers extension on our GitLab page. I’d be really keen on hearing thoughts and ideas from other Python enthusiasts out there, so please do not hesitate to get in touch if you would like more information, have feedback or have suggestions for new features in the next version of the Python Notebook.

Which macrocycle should I try first? Picking the best linkers with Flare™ and Spark™

At Cresset, we enjoy seeing our products work in synergy. By combining the most recent scientific methods and workflows we deliver solutions to address molecule design challenges. In this post, we use the new Electrostatic Complementarity™ (EC) maps and scores in Flare to help the post-processing of a Spark macrocyclization experiment.

Using Electrostatic Complementarity in Flare to post-process the Spark results

In the case study Using Spark to design macrocycle BRD4 inhibitors, we used Spark, our bioisostere replacement and scaffold hopping tool, to design macrocyclization strategies for non-macrocyclic, pyridone BRD4 inhibitors and evaluate results against experimental data reported by Wang et al [1]. The results showed that Spark successfully reproduced the experimental data.

In a real drug discovery project where no retrospective data is available, it would be useful to have criteria based on the existing knowledge of the system under study helping a further post-processing of the Spark results. Here we show how to use Spark in synergy with the EC maps and scores in Flare, our structure-based design tool, to pick the most promising candidates for synthesis.

Electrostatic interactions are essential for molecular recognition and are also key contributors to the binding free energy ΔG of protein-ligand complexes. Assessing the electrostatic match between ligands and binding pockets provides important insights into why ligands bind and what can be changed to improve binding.

The 100 top scoring results from the BRD4 Spark experiment were opened in Flare using the ‘Send to Flare’ functionality in Spark, which also transfers the related starter molecule (compound 1 in Figure 1) and excluded volume protein (5UEY). The protein was prepared in Flare, removing the water molecules that do not make clear interactions with both the ligand and protein. EC scores and maps were then calculated for compound 1 and the experimentally validated macrocycle 2 reported by Wang et al. towards the same 5UEY protein, as shown in Figure 1. As expected, the EC maps for both compounds show good complementarity to the protein and a very similar EC R score of 0.52/0.53 (Pearson’s r correlation coefficient). Spark linkers showing similar (or better) maps/score should provide interesting ideas for synthesis.


Figure 1: EC maps and scores for compound 1 and macrocycle 2, calculated towards protein 5UEY. Color coding: green = good complementarity; red = electrostatic clash.

Picking the winners

Figure 2 shows a couple of the most interesting linkers in terms of EC score.


Figure 2: EC maps and scores (top panel) for two ‘matching’ Spark linkers, calculated towards protein 5UEY. Color coding: green = good complementarity; red = electrostatic clash. The bottom panel shows electrostatic potential maps for the same Spark results. Color coding: cyan = negative electrostatic; red = positive electrostatic.

In the first example (Figure 2 – left), the π-system in the double bond linker complements the positive electrostatic field at the NH proton of His437 better than compound 1 or a fully saturated linker of similar length, as in macrocycle 2.

Another interesting example of good electrostatic match is the mercaptoethanol linker (Figure 2 – right). The negative electrostatic field of the thioether group is also in close proximity to the polarized NH of His437.

For both compounds, the increase in EC towards the protein is due to the introduction of a more negative ligand electrostatic in the region near His437, as shown by the electrostatic potential maps for both linkers (Figure 2 – bottom).

Discarding the losers

In contrast, an analysis of the EC maps for two of the linkers with the lowest EC scores (Figure 3) immediately highlights the reasons why these should be down-prioritized.


Figure 3. EC maps and scores (top panel) for two ‘clashing’ Spark linkers, calculated towards protein 5UEY. Color coding: green = good complementarity; red = electrostatic clash. The bottom panel shows electrostatic potential maps for the same Spark results. Color coding: cyan = negative electrostatic; red = positive electrostatic.
These linkers expose an area of negative interaction potential towards the carbonyl of Asn443, resulting in a strong electrostatic clash.

Conclusion

Are you surprised that a few linkers with low EC ended up among the top 100 scoring Spark results? Don’t forget that Spark works on ligand similarity. In macrocyclization (and fragment linking) experiments we are stretching the method to explore regions in space where ‘no ligand has gone before’.

In such cases, adding protein information is clearly highly beneficial to help post-processing. EC maps in Flare are an intuitive visual method for rationalizing the choice of the best ideas to progress, while EC scores provide a rapid way of scoring and filtering the 500 Spark results in just a few minutes.

To try Spark or Flare on your projects, request your free evaluation.

  1. Wang, L.; McDaniel, K. F.; Kati, W. M. Fragment-Based, Structure-Enabled Discovery of Novel Pyridones and Pyridone Macrocycles as Potent Bromodomain and Extra-Terminal Domain (BET) Family Bromodomain Inhibitors. J. Med. Chem. 2017, 60 (9), 3828–3850.

Cancer Research UK Manchester Institute enhances toolkit for computational and medicinal chemists with Flare for structure-based drug design

Cambridge, UK – 18th October 2018 – Cresset, innovative provider of software and contract research services for small molecule discovery and design, is pleased to announce that Cancer Research UK Manchester Institute (CRUK MI), has licensed Flare for fresh insights into structure-based drug design.

“Putting easy-to use and visually driven structure-based design software in the hands of our medicinal chemists will empower them to deliver the next generation of cancer therapeutics more efficiently,” says Professor Caroline Springer, Director of the Drug Discovery Unit, CRUK MI. “These tools provide a common interface to further integrate our medicinal and computational chemistry expertise, and we are particularly excited that we will be able to gain immediate feedback on where to optimise the ligand-protein interactions by visually assessing how protein and ligand electrostatics complement each other.”

“Having licensed our ligand-focused applications, Spark™, Forge™ and Torch™, to CRUK MI for a number of years, we are delighted that this leading research institute, has added Flare™ for structure-based design,” says Dr David Bardsley, Commercial Director, Cresset.

Cresset’s innovative Electrostatic Complementarity TM maps and scores provide rapid feedback on new molecule designs. Green: good electrostatic complementarity. Red: electrostatic clash.

 

Integrating Jupyter Notebook into Flare

In a recent blog post I have shown the integration of the Jupyter QtConsole in Flare.

The Jupyter QtConsole nicely fits in with the rest of the Flare GUI and provides a comfortable Python shell environment with most of the nifty Jupyter features such as history, TAB completion, syntax highlighting, embedding of images, etc.

Since I published that post, I have started thinking that it would have been great to embed a Jupyter Notebook, as it offers an even richer interface: most importantly, it enables editing and running individual code cells, thus constituting the ideal environment for Python enthusiasts.
There were a few technical hoops that I had to jump through to get this to work, but I finally managed.

So here I am proudly presenting the Flare Python Notebook, i.e. an instance of the Jupyter Notebook embedded into the Flare GUI which has direct access to the Flare GUI objects and methods just as the Python QtConsole (Figure 1).


Figure 1. A screenshot showing the new Python Notebook embedded in Flare.
To demonstrate the new fuctionality, last week at the 7th RDKit UGM in Cambridge I gave a lightning talk showcasing a sample Python Notebook which downloads a set of AChE inhibitors from ChEMBL, loads them into Flare, generates 3D coordinates and field points, and finally docks them to a crystallographic AChE protein downloaded from the Protein Data Bank.
The RDKit is used to compute 2D similarities and maximum common substructure across ligands and to generate 2D molecule layouts. RDKit molecules are fully interoperable with Cresset molecules within Flare, so Cresset 3D technologies and RDKit methods can be synergycally combined in one Python workflow.
Matplotlib, NumPy and SciPy are used to generate a scatterplot with a regression line and compute some statistics.

Now, on to the Jupyter Notebook:

The Flare Python Notebook unleashes the full potential of embedding a highly interactive Python environment within the Flare GUI.
RDKit cheminformatics methods and Cresset 3D technologies can be used side-by-side and their results visualized in real time while writing Python code, making the development cycle much more efficient and expedite.
The Jupyter Notebook has made scripting a simple everyday task for cheminformaticians, bioinformaticians and data scientists. I am confident that the Flare Python Notebook will do the same for CADD scientists and computational chemists.

And if you are not a Python guru, I can help you out; actually, I can’t wait to write my next script!

We will be releasing the Jupyter Notebook integration to our GitLab repository of Python extensions as soon as it is finalised. To find out more about Flare or to talk about how the Python integration can help you in your research or to request a Python script to achieve a particular task within Flare, then please contact us.

Using Python in Flare to find common contacts

In a recent blog post Pat Walters nicely used the structures of Viagra and Cialis when bound to PDE5 to argue that scaffold hopping between these two drugs was not a task that could be performed easily. He used Python to demonstrate that each drug interacted with siginificantly different parts of the protein and that they only shared interactions with 4 residues. Inspired by this, I sought (with the help of Paolo Tosco) to implement Pat’s code in Flare.

Paolo has been working on the implementation of a Jupyter notebook within Python (see his post here) and this provides the ideal environment to implement and discuss code to explore the common and specific interactions of Cialis and Viagra with PDE5. The notebook contents are shown in the iframe below.

As you see the output (last line) is the same as originally reported. However, with the addition of the Flare interface we are able to create a nice visual representation of the results, rendering the common and ligand specific residues differently. The script takes around a 30 seconds to run:

If you would like to learn more about Flare and using Python to customize, script or automate common actions or you would like to try the code out for yourself then please contact us. The current range of Python extensions for Flare are avaiable from our GitLab repository.