• Stars
    star
    401
  • Rank 107,625 (Top 3 %)
  • Language
    Python
  • License
    MIT License
  • Created about 6 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Benchmarks for generative chemistry

GuacaMol

Build Status

GuacaMol is an open source Python package for benchmarking of models for de novo molecular design.

For an in-depth explanation of the types of benchmarks and baseline scores, please consult our paper Benchmarking Models for De Novo Molecular Design

Installation

The easiest way to install guacamol is with pip:

pip install guacamol

Dependencies:

  • guacamol requires the RDKit library (version 2018.09.1.0 or newer).
  • We also depend on the FCD library (version 1.1) for the calculation of the FrΓ©chet ChemNet Distance.

Unit testing suite

You can test your installation of the guacamol benchmarking library by running the unit tests from this directory:

pytest .

Benchmarking models

For the distribution-learning benchmarks, specialize DistributionMatchingGenerator (from guacamol.distribution_matching_generator) for your model. Instances of this class must be able to generate molecules similar to the training set.
For the actual benchmarks, call assess_distribution_learning (from guacamol.assess_distribution_learning) with an instance of your class. You must also provide the location of the training set file (See section "Data" below).

For the goal-directed benchmarks, specialize GoalDirectedGenerator (from guacamol.goal_directed_generator) for your model. Instances of this class must be able to generate a specified number of molecules that achieve high scores for a given scoring function.
For the actual benchmarks, call assess_goal_directed_generation (from guacamol.assess_goal_directed_generation) with an instance of your class.

Example implementations for baseline methods are available from https://github.com/BenevolentAI/guacamol_baselines.

In guacamol_baselines, we provide a Dockerfile with an example environment for developing generative models and running guacamol.

Data

For fairness in the evaluation of the benchmarks and comparability of the results, you should use a training set containing molecules from the ChEMBL dataset. Follow the procedure described below to get standardized datasets.

Download

You can download pre-built datasets here:

md5 05ad85d871958a05c02ab51a4fde8530 training
md5 e53db4bff7dc4784123ae6df72e3b1f0 validation
md5 677b757ccec4809febd83850b43e1616 test
md5 7d45bc95c33c10cb96ef5e78c38ac0b6 all

Generation

To generate the training data yourself, run

python -m guacamol.data.get_data -o [output_directory]

which will download and process ChEMBL for you in your current folder.

This script will use the molecules from holdout_set_gcm_v1.smiles as a holdout set, and will exclude molecules very similar to these.

Different versions of your Python packages may lead to differences in the generated dataset, which will cause the script to fail. See the section below ("Docker") to reproducibly generate the standardized dataset with the hashes given above.

Docker

To be sure that you have the right dependencies you can build a Docker image, run from the top-level directory:

docker build -t guacamol-deps -f dockers/Dockerfile .

Then you can run:

docker run --rm -it  -v `pwd`:/guacamol -w /guacamol guacamol-deps python -m guacamol.data.get_data -o guacamol/data

Change log

  • 1 May 2020: update version of FCD dependency
  • 15 Oct 2020: pin dependencies since FCD does not
  • 10 Nov 2021: relax pinned versions of keras, tensorflow & h5py dependencies
  • 20 Dec 2021: expose forbidden symbols argument for custom smiles dataset filtering

Leaderboard

See https://www.benevolent.com/guacamol.

More Repositories

1

DeeplyTough

DeeplyTough: Learning Structural Comparison of Protein Binding Sites
Python
153
star
2

guacamol_baselines

Baselines models for GuacaMol benchmarks
Python
133
star
3

MolBERT

Python
122
star
4

RELVM

This repository contains the code accompanying the paper "Learning Informative Representations of Biomedical Relations with Latent Variable Models", Harshil Shah and Julien Fauqueur, EMNLP SustaiNLP 2020.
Python
14
star
5

CoMP

CoMP: Contrastive Mixture of Posteriors
Python
10
star
6

ukbiobank-loaders

Python
6
star
7

benevolentai-dat

BenevolentAI's Diversity Analysis Tool (DAT) is a software package that can be used to produce demographic analysis reports given health data sets that contain for fields of age, sex, ethnicity, race and socio-economic status. For example, you might have a data about a cohort of patients and want to know how well you cover various ethnicities, age groups, sex groups and socio-economic status levels. Assuming your data sets have some of these fields, this software will help generate various views of the data to help inform your work. The DAT tool was developed as part of BenevolentAI's Diversity in Data Initiative, which aims to help improve the ways patients are represented in precision medicine. It is meant to help inspire other developers to find ways of assessing the data diversity in their current and prospective health data sets.
Python
5
star
8

funkea

Perform functional enrichment analysis at scale.
Python
2
star
9

guacamol_results

HTML
2
star
10

sre-interview

Interview scenario for Level 2 SREs
Python
1
star