Skip to main content

SynFormer: Generative Model for Synthesizable Molecule Generation

Project description

SynFormer

SynFormer is a generative modeling framework designed to efficiently explore and navigate synthesizable chemical space.

[Paper]

Install

Environment

# Install conda environment
conda env create -f env.yml -n synformer
conda activate synformer

# Install SynFormer package
pip install --no-deps -e .

Building Block Database

We provide preprocessed building block data. You can download it from here and put it in the data directory.

However, the data is derived from Enamine's building block catalog, which are available only upon request. Therefore, you should first request the data from Enamine here and download the US Stock catalog into the data/building_blocks directory. Then run the following script which will check whether you have a copy of the Enamine's catalog and unarchive the preprocessed data for you:

python scripts/unarchive_wizard.py

Trained Models

You can download the trained weights from here and put them in the data/trained_weights directory.

Usage

Bottom-Up Synthesis Planning

You can create a list of SMILES strings in CSV format (example: data/example.csv) and run the following command to project them into the synthesizable chemical space.

python sample.py \
    --model-path data/trained_weights/original_default.ckpt \
    --input data/example.csv \
    --output results/example.csv

Reference

If you find our code/model useful, please cite our papers:

@article{gao2024synformer,
  title={Generative artificial intelligence for navigating synthesizable chemical space},
  author={Wenhao Gao and Shitong Luo and Connor W. Coley},
  year={2024}
}

@inproceedings{luo2024chemprojector,
  title={Projecting Molecules into Synthesizable Chemical Spaces},
  author={Shitong Luo and Wenhao Gao and Zuofan Wu and Jian Peng and Connor W. Coley and Jianzhu Ma},
  booktitle={Forty-first International Conference on Machine Learning},
  year={2024}
}

Project details


Download files

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

Source Distribution

synformer-0.1.3.tar.gz (57.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

synformer-0.1.3-py3-none-any.whl (106.1 kB view details)

Uploaded Python 3

File details

Details for the file synformer-0.1.3.tar.gz.

File metadata

  • Download URL: synformer-0.1.3.tar.gz
  • Upload date:
  • Size: 57.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.0

File hashes

Hashes for synformer-0.1.3.tar.gz
Algorithm Hash digest
SHA256 0b3b03243a75a0b71a54a034f05204c50cfc56b878d97530f200e03803dd9d79
MD5 4b124af8305cacb60495b362a92a0bf9
BLAKE2b-256 f132dd91e092b881d6574bc79fe076d8f64d6e17ebc6d9f602cc1d56e8ab3230

See more details on using hashes here.

File details

Details for the file synformer-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: synformer-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 106.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.0

File hashes

Hashes for synformer-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 249cc6629a28bdc4a7824016f06e6f89e4e2ce6d4eb1d632d9ca27b3b145a00e
MD5 1b72f3358984b87c69ec711de6e17635
BLAKE2b-256 260bb1446f3d8b2b5ef45696eb71b32cdea62ffb9a27039a8f8ebec67ee1e945

See more details on using hashes here.

Supported by

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