# Qed

Version

Qed 1.0.1

Feedback

## Introduction

This section is about installing and using Qed within your own Python scripts or as a standalone Python tool.

QED stands for quantitative estimation of drug-likeness and the concept has been introduced by Richard Bickerton and coworkers [1]. The empirical rationale of the QED measure reflects the underlying distribution of molecular properties including molecular weight, logP, topological polar surface area, number of hydrogen bond donors and acceptors, the number of aromatic rings and rotatable bonds, and the presence of unwanted chemical functionalities.

The QED results as generated by the RDKit-based implementation of Biscu-it™ are not completely identical to those from the original publication [1]. These differences are a consequence of differences within the underlying calculated property calculators used in both methods. For example, discrepancies can be noted in the results from the logP calculations, nevertheless despite the fact that both approaches (Pipeline Pilot in the original publication and RDKit in our Biscu-it™ implementation) mention to use the Wildmann and Crippen methodology for the calculation of their logP-values [2]. In this respect, Gregory Gerebtzoff (Roche, Switserland) has been so kind to perform a refitting of the QED parameters with logP values generated by RDKit [see rdkit-discuss]. These refitted values have been implemented in Qed as the default values; however, the original publication values can still be used if desired.

This section assumes you have installed RDKit correctly and that you are familiar with the basic functions of it. A guideline for installing RDKit on a Mac OS X system is provided in our cookbook section. It is also recommended to have read the original QED publication [1].

> cd /usr/local/src
> sudo tar -xvf qed-*.tar.gz
> cd qed-*


You should now have a number of files in your /usr/local/src/qed-* directory:

> ls -1
COPYING.LESSER
PKG-INFO
build/
setup.py
silicos_it/


Now start the installation process:

> python setup.py install


This process creates a silicos_it folder with all the qed files into your default Python site-package install directory. It might be that you need to get root permissions:

> sudo python setup.py install


Where are my site-packages stored?

The location of the site-packages directory depends on the operating system and the location in which Python was installed. To find out your system’s site-packages location, execute the following from the command line (note that this should be run from a shell prompt, not a Python interactive prompt):

> python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"


As a final step in the installation process, you should add the installation directory path to your PYTHONPATH environment variable, if it is not already in the search path:

> export PYTHONPATH="\$PYTHONPATH:/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages"


and check your installation by launching Python:

>>> from silicos_it.descriptors import qed
>>> from rdkit import Chem
>>> m = Chem.MolFromSmiles('c1ccccc1')
>>> qed.default(m)
0.44619898311523704


Qed can be used as a Python function or as a Python standalone script. In the following sections, both approaches are detailed.

## Using Qed as a Python function

The qed() function takes as argument a RDKit molecule and returns the corresponding QED value calculated from it.

The qed() function comes in three flavors, each differing in the relative weight that is imposed on the underlying molecular descriptors (see [1]). These three flavors correspond to the three different QED measures that were described in the original publication:

• QEDw,max using the set of weights that give maximal information content.
• QEDw,mo using the mean weights of the optimal 1,000 weight combinations that give the highest information content.
• QEDw,u with all weights as unity, hence unweighted.

Specifying the required QED weighting scheme in Qed is done using the corresponding function:

• qed.weights_mean() uses the mean weighting scheme and corresponds to QEDw,mo. Another name for this function is qed.default().
• qed.weights_max() specifies the max weighting scheme and corresponds to QEDw,max.
• qed.weights_none() specifies unit weights and corresponds to QEDw,u.

and exemplified below:

>>> from silicos_it.descriptors import qed
>>> from rdkit import Chem
>>> m = Chem.MolFromSmiles('c1ccccc1')
>>> qed.default(m)
0.44619898311523704
>>> qed.weights_mean(m)
0.44619898311523704
>>> qed.weights_max(m)
0.4733526950948539
>>> qed.weights_none(m)
0.3047153431243204


As already mentioned above, the current implementation of Qed uses the refitted logP parameters from Gregory Gerebtzoff. However, the original values can still be used by specifying False as second argument to the appropriate function call:

>>> qed.default(m, False)
0.4426283718993647
>>> qed.weights_mean(m, False)
0.4426283718993647
>>> qed.weights_max(m, False)
0.4706596045646091
>>> qed.weights_none(m, False)
0.3021185764176498


### Exceptions

The qed() function throws an WrongArgument exception in case the argument molecule is None. The WrongArgument exception is defined in the silicos_it.errors module and is automatically loaded when importing qed.

## Using Qed as a Python standalone tool

The use of Qed as a standalone Python tool is achieved by calling qed.py on the command line:

> python qed.py
Error: no input file given.


The qed.py tool requires a molecule file as input. This file should be in SMILES or in sd-format. An example input file is provided in the descriptors directory of the package:

> python qed.py descriptors/qed_test.smi
MW   ALOGP     HBA     HBD     PSA    ROTB    AROM  ALERTS     QED  NAME
286.34   1.092       6       3  101.88       4       2       1   0.737  Abacavir
181.21   0.481       4       2   83.47       5       0       2   0.487  Acamprosate
336.43   2.365       5       3   87.66      11       1       1   0.540  Acebutolol
151.16   1.351       2       2   49.33       2       1       1   0.633  Acetaminophen
222.25   0.225       5       2  115.04       3       1       1   0.727  Acetazolamide
324.40   3.291       4       2   92.34       6       1       1   0.772  Acetohexamide
411.57   3.492       6       1   47.02       7       2       1   0.688  Acetophenazine
329.37   3.327       4       1   39.72       4       2       0   0.917  Paroxetine
270.21   3.146       3       1   55.13       4       2       0   0.915  Leflunomide
312.42   2.318       3       1   50.16       3       2       0   0.947  Granisetron
314.50   3.789       2       1   19.03       4       2       0   0.898  Pergolide
276.38   1.481       3       1   45.33       3       1       0   0.918  Molindone
561.55   6.476       6       2  118.77      23       1       5   0.052  ChloramphenicalPalmitate
663.41   6.279       8       3  108.33      24       0       3   0.063  ClindamycinPalmitate
610.67   5.837      10       1  143.34      13       5       2   0.126  CandesartanCilexetil
315.87   5.079       2       0    3.24       3       3       0   0.636  Chlorprothixene
366.84   5.505       3       1   54.37       2       2       0   0.741  Atovaquone
314.86   4.528       2       0    6.48       4       2       0   0.782  Clomipramine
309.48   5.015       2       0    3.24       2       2       0   0.735  Methixene
312.48   5.020       3       0    6.48       5       2       0   0.734  Ethopropazine
337.46   0.371       6       5  173.33       8       1       3   0.266  Famotidine
252.35  -0.036       5       3   88.89       7       1       5   0.214  Cimetidine
301.39   1.664       3       5   96.29       9       2       4   0.213  Tegaserod
395.42  -0.172       8       4  158.21       6       1       4   0.231  Cefdinir
494.57   2.496       7       2  113.01       8       2       4   0.251  CarbenicillinIndanyl


When the molecular input file is in SMILES format, each line should be composed of the smiles code and optionally followed by the molecular name.

The calculated QED values are the values as calculated by the qed.default() function, hence using QEDw,mo weighting scheme with Gregory Gerebtzoff’s adjusted logP parameters. In addition to the QED values, all other properties that are used for the calculation of the QED parameter are also output by the qed.py tool.

## References

 [1] (1, 2, 3, 4) Bickerton, G.R.; Paolini, G.V.; Besnard, J.; Muresan, S.; Hopkins, A.L. (2012) ‘Quantifying the chemical beauty of drugs’, Nature Chemistry, 4, 90-98 [nature/nchem.1243]
 [2] Wildman, S.A.; Crippen, G.M. (1999) ‘Prediction of physicochemical parameters by atomic contributions’, J. Chem. Inf. Comput. Sci., 39, 868-873 [acs/ci990307l]

## Revision history

### Version 1.0.1

• Incorporation of the refitted logP parameters of Gregory Gerebtzoff and making these values default [rdkit-discuss].
• Modification of the qed() function to enable the selection of the original parameters, if desired.

### Version 1.0.0

The first release of Biscu-it™. Contains Qed.

### Current projects

• Optimisation of novel PPI's
• Design of anti-viral compounds
• Novel fragment-based descriptors