Git Product home page Git Product logo

argenomic's Introduction

Quality-Diversity Optimisation for Molecular Design (GB-EPI)

Logo

GitHub issues GitHub DOI

Description

Argenomic is an open-source implementation of an illumination algorithm for optimization of small organic molecules. Argenomic provides a holistic overview of how high-performing molecules are distributed throughout a search space. This novel approach produces potent but qualitatively different molecules, illuminates the distribution of optimal solutions, and improves search efficiency compared to both machine learning and traditional genetic algorithm approaches. This implementation is based on an open-source, graph-based genetic algorithm for molecular optimisation, and influenced by state-of-the-art concepts from soft robot design. For more information, see the accompanying blog post.

Example of iterative illumination in a 2D representation of chemical space. In this case the fitness is determined as the molecular similarity to Troglitazone.

Getting Started

After installing the software and running the tests, a basic usage example of argenomic (i.e. the rediscovery of Troglitazone) can be called upon in the following manner:

python3 illuminate.py generations=100

Installing

Download the source code from Github to your local machine and create the environment from the environment.yml file:

conda env create -f environment.yml

Activate the new environment:

conda activate argenomic-stable

Verify that the new environment was installed correctly:

conda env list

Running the tests

To run the unit tests:

pytest ./tests

Authors

Based on the paper Illuminating elite patches of chemical space. Chemical science 11.42 (2020): 11485-11491.

  • Jonas Verhellen - Concept, implementation, and development
  • Jeriek Van den Abeele - implementation, and development

Dependencies

Important dependencies of the Argenomic software environment and where to find the source.

  • Python - Python is a widely used scientific and numeric programming language.
  • RDKit - Cheminformatics and machine-learning software toolkit.
  • Scikit-learn - Data science and deep learning toolset in Python.
  • Omegaconf - Configuration system for multiple sources, providing a consistent API.

Acknowledgments

  • Jan Jensen for his work in developing and open-sourcing a graph-based genetic algorithm for molecular optimisation, which served as impetus for this project.

  • Jean-Baptiste Mouret and Jeff Clune for their breakthrough invention of illumination algorithms, providing a holistic view of high-performing solutions throughout a search space.

  • Pat Walters for his scripts indicating how to run structural alerts using the RDKit and ChEMBL, and for his many enlightening medicinal chemistry blog posts.

Copyright License

This project is licensed under the GNU Affero General Public License v3.0 (AGPLv3).

argenomic's People

Contributors

jeriek avatar jonas-verhellen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

argenomic's Issues

zip argument #2 must support iteration

Sorry again.

Traceback (most recent call last):
File "illuminate.py", line 74, in
illumination(omegaconf.OmegaConf.load(configuration.configuration_file))(configuration.generations)
File "illuminate.py", line 27, in call
self.initial_population()
File "illuminate.py", line 41, in initial_population
molecules, descriptors, fitnesses = self.process_molecules(molecules)
File "illuminate.py", line 57, in process_molecules
descriptors = list(map(self.descriptor, molecules))
File "/home/zaliani/sw/argenomic/argenomic/mechanism.py", line 37, in call
for property, range in zip(self.properties, self.ranges):
TypeError: zip argument #2 must support iteration

Here the used config:
config_az.txt

Best regards and thx for patience
Andrea

Please consider Hydra

Hi,
I am the author of OmegaConf (which you are already using) and Hydra (https://hydra.cc).
Looking at your project, I think you will benefit a lot by switching to Hydra.
Hydra builds on OmegaConf so it should be pretty straight forward.

This blog post is a pretty good intro to Hydra.

Prevent this case is needed "not enough values to unpack"

Creating remdesivir analogues through the yaml attached I repeatedly got this error file which I suspect has to do with restrains from descriptors. Any thoughts for me?

Best

Andrea

Traceback (most recent call last):
File "illuminate.py", line 74, in
illumination(omegaconf.OmegaConf.load(configuration.configuration_file))(configuration.generations)
File "illuminate.py", line 29, in call
molecules = self.generate_molecules()
File "illuminate.py", line 52, in generate_molecules
molecules.extend(self.crossover(molecule_pair))
File "/home/zaliani/sw/argenomic/argenomic/operations.py", line 39, in call
molecule_cores, molecule_sidechains = self.fragmentate(molecule_pair)
File "/home/zaliani/sw/argenomic/argenomic/operations.py", line 56, in fragmentate
_, molecule_frags = map(list, zip(*molecule_frags))
ValueError: not enough values to unpack (expected 2, got 0)

This is the yaml file has been used
config_az.txt

Warning text

hi all,
I am not sure entirely whether it is an issue, but
after running tests got this, which is also present unsuccesfully running thiotixene example:

====================================================== warnings summary ======================================================
tests/test_infrastructure.py::test_default_archive
/usr/bin/anaconda3/envs/argenomic-stable/lib/python3.7/site-packages/sklearn/cluster/_kmeans.py:974: FutureWarning: 'n_jobs' was deprecated in version 0.23 and will be removed in 0.25.
" removed in 0.25.", FutureWarning)

-- Docs: https://docs.pytest.org/en/latest/warnings.html
========================================== 4 passed, 1 xfailed, 1 warning in 10.42s ==========================================

What I am missing?
Best
agiani99

Numpy error

HI all,
I tried with attached yaml to change target, source and filter.
I had in the meantime re-installed code (not the development branch though).
Got following errorTraceback (most recent call last):
File "illuminate.py", line 74, in
illumination(omegaconf.OmegaConf.load(configuration.configuration_file))(configuration.generations)
File "illuminate.py", line 27, in call
self.initial_population()
File "illuminate.py", line 39, in initial_population
molecules = dataframe['molecule'].sample(n=self.initial_size).tolist()
File "/usr/bin/anaconda3/envs/argenomic-stable/lib/python3.7/site-packages/pandas/core/generic.py", line 5061, in sample
locs = rs.choice(axis_length, size=n, replace=replace, p=weights)
File "mtrand.pyx", line 946, in numpy.random.mtrand.RandomState.choice
ValueError: Cannot take a larger sample than population when 'replace=False'

Apparently the code only works with given tests.
Btw pytest from README.md is missing in the release.
Best
Andrea

config_az.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.