Coder Social home page Coder Social logo

li-ziang / retro_star Goto Github PK

View Code? Open in Web Editor NEW

This project forked from binghong-ml/retro_star

0.0 0.0 0.0 2.91 MB

Retro*: Learning Retrosynthetic Planning with Neural Guided A* Search

License: MIT License

Shell 0.01% Python 8.65% Jupyter Notebook 91.34%

retro_star's Introduction

Retrosynthetic Planning with Retro*

Retro*: Learning Retrosynthetic Planning with Neural Guided A* Search

@inproceedings{chen2020retro,
  title={Retro*: Learning Retrosynthetic Planning with Neural Guided A* Search},
  author={Chen, Binghong and Li, Chengtao and Dai, Hanjun and Song, Le},
  booktitle={The 37th International Conference on Machine Learning (ICML 2020)},
  year={2020}
}

1. Setup the environment

1) Download the repository
git clone [email protected]:binghong-ml/retro_star.git
cd retro_star
2) Create a conda environment
conda env create -f environment.yml
conda activate retro_star_env

2. Download the data

1) Download the building block molecules, pretrained models, and (optional) test data

Download and unzip the files from this link, and put all the folders (dataset/, one_step_model/ and saved_models/) under the retro_star directory.

3. Install Retro* lib

Install the retrosynthetic planning library with the following commands.

pip install -e retro_star/packages/mlp_retrosyn
pip install -e retro_star/packages/rdchiral
pip install -e .

4. Reproduce experiment results

To plan with Retro*, run the following command,

cd retro_star
python retro_plan.py --use_value_fn

Ignore the --use_value_fn option to plan without the learned value function.

You can also train your own value function via,

python train.py

5. Example usage

See example.py for an example usage.

from retro_star.api import RSPlanner

planner = RSPlanner(
    gpu=-1,
    use_value_fn=True,
    iterations=100,
    expansion_topk=50
)

result = planner.plan('CCCC[C@@H](C(=O)N1CCC[C@H]1C(=O)O)[C@@H](F)C(=O)OC')

retro_star's People

Contributors

hcji avatar binghong-ml avatar

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.