Skip to content

oxpig/retromix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Template-Free & Template-based integration for reaction space exploration 🧪

This is the code necessary to reproduce the work described in {link to paper}.

Overview

This project extends AiZynthFinder to effectively explore reaction space through the integration of template-free approaches with template-based tools. For more details on our research, please refer to [paper link].

Installation

  1. Clone this repository:
git clone [repository-url]
  1. Create and set up the AiZynthFinder environment as described in their documentation.
cd aizynthfinder
conda env create -f env-dev.yml
poetry install -all-extras
cd ..
conda env update -f retromix.yml
  1. create an .env file to add the path to your retromix dir, and POSTERA api key. This is essential to run the pipeline.

In the .env file add:

POSTERA_API_KEY="{postera_api_key}"
RETROMIX_PATH="{retromix_path}"

Data

The targets and actives used can be found in retromix/data/{target_type}_targets.json

Pipeline Overview

Our pipeline consists of 3 key phases:

  1. Identification of Popular, Overlooked and Novel templates
  2. Integration of these templates in AiZynthFinder route searches
  3. Scoring of post-optimization search performance

Phase 1: Template Identification

We provide files to complete this process with a template-based (AiZynthFinder) and template-free (AiZynthFinder or Postera) methods.

For example to run the AiZynthFinder only method:

Run the template identification script:

python src/find_templates_aiz.py --rm_config {config_file} --targets {target_file_path} --output_path {output_path} --scoring_type {scoring_type}

The default route scoring type is state score as provided by AiZynthFinder. This will rank routes based on their state score, then extract relevant templates.

Phase 2: Template Integration

The next step is to search for routes to target molecules while optimsing specfic templates.

Execute the route search:

python src/route_search.py --config {rm_config_path} --output_dir {output_dir} --type {optimisation_type} --templates {template_file} --optimise {bool} --smiles {target_smiles}

Phase 3: Performance Scoring

Run the scoring analysis:

The final step is to calculate the terms of the POS score (a, b , y).

python src/optimisation/scoring.py --pre {pre_file - aiz} --post {post_file - aiz} --config {rm_config_path} --output {output_file_path}

There is functionality to create your own scoring function. Currently, cost, state score, frequency and CoPriNet prediction model (will perform better with gpu access) to rank templates.

Run the pipeline

Alternatively, the pipeline.py file allows you to run the whole pipeline in one.

python src/pipeline.py --targets {target_mol_path} --config {retromix_config} --output_dir {output_dir}

Citation

If you use this work, please cite our paper: [paper citation]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages