Skip to content

Multi-target synthesis planning with AiZynthFinder

License

Notifications You must be signed in to change notification settings

MolecularAI/multiaiz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MultiAiZ: Multi-Target Synthesis Planning with AiZynthFinder

Overview

The MultiAiZ tool expands AiZynthFinder for multi-target synthesis planning by leveraging common intermediates. MultiAiZ find most possible synthesis routes and reaction intermediates from synthesis routes for a given target by running AiZynthFinder for a user-defined number of iterations, accelerating tree reaction search by keeping a memory of already seen intermediates. Post search, the intermediate score is applied to create a ranking of the best intermediates in terms of synthesis cost and utility, to build convergent synthesis routes.

Installation

First clone the repository using Git.

The project dependencies can be installed by executing the following commands in the root of the repository:

conda env create -f env-dev.yml
conda activate multiaiz-env
poetry install --all-extras

the multiaiz package is now installed in editable mode.

Repository Structure

├── multiaiz/                       # Multi-target synthesis modules
│	├── __init__.py					# Package initialization file
│	├── main.py						# CLI script for running MultiAiZ
│	├── multiaiz.py					# Core MultiAiZ class for multi-target synthesis planning
│	├── plotting.py					# Plotting utilities for visualization and analysis
│	├── post_processing.py			# Post-processing functions for intermediates analysis
│	└── utils.py					# Utility functions for statistics and file handling
└── tests/                          # Unit tests

Usage example: Running MultiAiZ

Below is a minimal example of how to use the MultiAiZ class in your own script or notebook:

from aizynthfinder.aizynthfinder import AiZynthFinder
from multiaiz import MultiAiZ

# Path to your AiZynthFinder config file
config_file = "path/to/config.yml"

# List of target molecules (SMILES strings)
targets = [
	"CCO",  # Example SMILES
	"CCN"
]

# Output directory for results
output_dir = "output/my_run"

# Initialize AiZynthFinder
finder = AiZynthFinder(configfile=config_file)
finder.stock.select("emolecules")
finder.expansion_policy.select("standard")
finder.filter_policy.select("standard")

# Initialize and run MultiAiZ
multi_aiz = MultiAiZ(finder, targets, output_dir)
stats = multi_aiz.run(n_iters=5)

# The results are saved in output_dir (e.g., intermediates.csv, stats.csv)

Development

Testing

Tests uses the pytest package, and is installed by poetry

Run the tests using:

pytest -v

Contributing

We welcome contributions, in the form of issues or pull requests.

If you have a question or want to report a bug, please submit an issue.

To contribute with code to the project, follow these steps:

  1. Fork this repository.
  2. Create a branch: git checkout -b <branch_name>.
  3. Make your changes and commit them: git commit -m '<commit_message>'
  4. Push to the remote branch: git push
  5. Create the pull request.

Please use pre-commit to ensure proper formatting and linting

License

This project is licensed under the MIT License. See LICENSE for details.

References

If you find this work useful, please cite the associated paper(s): Iáñez Picazo, P., Voronov A., Genheden A., Westerlund A.M., Joint Synthesis Planning by Leveraging Common Intermediates

About

Multi-target synthesis planning with AiZynthFinder

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages