Skip to main content

A scoring, benchmarking and evaluation framework for goal directed generative models

Project description

MolScore: A scoring, evaluation and benchmarking framework for de novo drug design

alt text

Overview

MolScore contains code to score de novo compounds in the context of generative de novo design by generative models via the subpackage molscore, as well as, facilitate downstream evaluation via the subpackage moleval. An objective is defined via a JSON file which can be shared to propose new multi-parameter objectives for drug design. MolScore can be used in several ways:

  1. To implement a multi-parameter objective to for prospective drug design.
  2. To benchmark objectives/generative models/optimization using benchmark mode (MolScoreBenchmark).
  3. To implement a sequence of objectives using curriculum mode (MolScoreCurriculum).

Generative models with MolScore already integrated can be found here.

Contributions and/or ideas for added functionality are welcomed!

Installation

MolScore can be installed by cloning this repository and setting up an environment using your favourite environment manager (I recommend mamba).

git clone https://github.com/MorganCThomas/MolScore.git
cd MolScore
mamba env create -f environment.yml
mamba activate molscore
pip install ./

Note: You can use pip install -e ./ to install in develop mode.

Alternatively, MolScore is available via the Python Package Index.

pip install molscore --upgrade

Functionality

Scoring functionality present in molscore, some scoring functions require external softwares and necessary licenses.

Type Method
Docking Glide, Smina, OpenEye, GOLD, PLANTS, rDock, Vina, Gnina
Ligand preparation RDKit->Epik, Moka->Corina, Ligprep, Gypsum-DL
3D Similarity ROCS, Open3DAlign
2D Similarity Fingerprint similarity (any RDKit fingerprint and similarity measure), substructure match/filter, Applicability domain
Predictive models Scikit-learn (classification/regression), PIDGINv5a, ChemProp, ADMET-AI
Synthesizability RAscore, AiZynthFinder, SAscore, ReactionFilters (Scaffold decoration)
Descriptors RDKit, Maximum consecutive rotatable bonds, Penalized LogP, LinkerDescriptors (Fragment linking), MolSkill
Transformation methods Linear, linear threshold, step threshold, Gaussian
Aggregation methods Arithmetic mean, geometric mean, weighted sum, product, weighted product, auto-weighted sum/product, pareto front
Diversity filters Unique, Occurence, memory assisted + ScaffoldSimilarityECFP

a PIDGINv5 is a suite of pre-trained RF classifiers on ~2,300 ChEMBL31 targets

Performance metrics present in moleval, many of which are from GuacaMol or MOSES.

Type metric
Intrinsic property Validity, Uniqueness, Scaffold uniqueness, Internal diversity (1 & 2), Sphere exclusion diversityb, Solow Polasky diversityg, Scaffold diversity, Functional group diversityc, Ring system diversityc, Filters (MCF & PAINS), Purchasabilityd
Extrinsic propertya Novelty, FCD, Analogue similaritye, Analogue coverageb, Functional group similarity, Ring system similarity, Single nearest neighbour similarity, Fragment similarity, Scaffold similarity, Outlier bits (Silliness)f, Wasserstein distance (LogP, SA Score, NP score, QED, Weight)

a In reference to a specified external dataset
b As in our previous work here
c Adaption based on Zhang et al.
d Using molbloom
e Similar to Blaschke et al.
f Based on SillyWalks by Pat Walters
g Based on Liu et al.

Usage

For further details, we refer you to the tutorials. Here is a snapshot of using MolScore with the GUIs available.

Here is a GIF demonstrating writing a config file with the help of the GUI, running MolScore in a mock example (scoring randomly sampled SMILES), and monitoring the output with another GUI.

alt text

Once molscore has been implemented into a generative model, the objective needs to be defined! Writing a JSON file is a pain though so instead a streamlit app is provided do help. Simply call molscore_config from the command line (a simple wrapper to streamlit run molscore/gui/config.py)

alt text

Once the configuration file is saved, simply point to this file path and run de novo molecule optimization. If running with the monitor app you'll be able to investigate molecules as they're being generated. Simply call molscore_monitor from the command line (a wrapper to streamlit run molscore/gui/monitor.py).

alt text

Citation & Publications

If you use this software, please cite it as below.

@article{thomas2024molscore,
title={MolScore: a scoring, evaluation and benchmarking framework for generative models in de novo drug design},
author={Thomas, Morgan and O’Boyle, Noel M and Bender, Andreas and De Graaf, Chris},
journal={Journal of Cheminformatics},
volume={16},
year={2024},
publisher={BMC}
}

This software was also utilised in the following publications:

  1. Thomas, M., Smith, R.T., O’Boyle, N.M. et al. Comparison of structure- and ligand-based scoring functions for deep generative models: a GPCR case study. J Cheminform 13, 39 (2021). https://doi.org/10.1186/s13321-021-00516-0
  2. Thomas M, O'Boyle NM, Bender A, de Graaf C. Augmented Hill-Climb increases reinforcement learning efficiency for language-based de novo molecule generation. J Cheminform 14, 68 (2022). https://doi.org/10.1186/s13321-022-00646-z
  3. Handa K, Thomas M, Kageyama M, Iijima T, Bender A. On the difficulty of validating molecular generative models realistically: a case study on public and proprietary data. J Cheminform 15, 112 (2023). https://doi.org/10.1186/s13321-023-00781-1
  4. Thomas M, Ahmad M, Tresadern G, de Fabritiis G. PromptSMILES: Prompting for scaffold decoration and fragment linking in chemical language models. J Cheminform 16, 77 (2024). https://doi.org/10.1186/s13321-024-00866-5
  5. Bou A, Thomas M, Dittert S, Ramírez CN, Majewski M, Wang Y, Patel S, Tresadern G, Ahmad M, Moens V, Sherman W. ACEGEN: Reinforcement learning of generative chemical agents for drug discovery. arXiv (2024). https://arxiv.org/abs/2405.04657

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

MolScore-1.7.5-py3-none-any.whl (55.1 MB view details)

Uploaded Python 3

File details

Details for the file MolScore-1.7.5-py3-none-any.whl.

File metadata

  • Download URL: MolScore-1.7.5-py3-none-any.whl
  • Upload date:
  • Size: 55.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for MolScore-1.7.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5ee52457603241fa0180d528772705094082478c589abe28677b7151352e87bd
MD5 0ab8270c8298e27682ff26452653a6b2
BLAKE2b-256 548f6c65db0cb1bd997054ed4f6648109ba23047ec3cec5066dbed792495abdb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page