Giter VIP home page Giter VIP logo

rjt-rl's Introduction

RJT-RL: De novo molecular design using a Reversible Junction Tree and Reinforcement Learning

Implementation of "Molecular design method using a reversible tree representation of chemical compounds and deep reinforcement learning" by Ryuichiro Ishitani, Toshiki Kataoka, Kentaro Rikimaru.
(Paper: https://doi.org/10.1021/acs.jcim.2c00366)

Environment

This package run under the environment:

The other package dependencies are described in requirements.txt.

To install the package and dependencies:

pip install .

Usage

Download dataset and model weights

If you want to use the pretrained policy using Zinc250k dataset, please download the dataset and model weights files from zenodo DOI and save to the data directory.

Pretraining the policy network

Caution: If you are not trying to use other dataset and have downloaded the dataset and pretrained model files, you can skip this section.

To pretrain the policy network using Zinc250k dataset:

  1. Download the dataset (into the data directory)
mkdir data
wget https://raw.githubusercontent.com/aspuru-guzik-group/chemical_vae/main/models/zinc/250k_rndm_zinc_drugs_clean_3.csv -O data/zinc250k.csv
  1. Preprocess the csv file containing the SMILES and create the vocabulary file and pkl files containing preprocessed mols.
bash examples/run_prep_dataset.sh

The files will be created in the directory "results".

  1. Create the worker's pkl files for the pretraining from the preprocessed pkl files. This example supposes 16 worker processes used in the training.
bash examples/pretrain/run_create_expert_dataset.sh
  1. Run the pretraining of the policy network using the created dataset files.
bash examples/pretrain/run_pretrain_policy.sh

You may change the size of hidden vectors (128 in the example) and num of worker processes (16 in the examples) depending on your dataset and/or environment.

Training and exploration of molecules

To train the policy using the specific reward functions, run the script contained in the specific subdirectories.

Citation

If you find our work relevant to your research, please cite:

@article{ishitani2022rjtrl,
    title={Molecular design method using a reversible tree representation of chemical compounds and deep reinforcement learning},
    author={Ryuichiro Ishitani and Toshiki Kataoka and Kentaro Rikimaru},
    year={2022},
    journal={J. Chem. Inf. Model. https://doi.org/10.1021/acs.jcim.2c00366}
}

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.