Giter VIP home page Giter VIP logo

moldqn-pytorch's Introduction

MolDQN-pytorch

MIT license made-with-python

PyTorch implementation of MolDQN as described in Optimization of Molecules via Deep Reinforcement Learning by Zhenpeng Zhou, Steven Kearnes, Li Li, Richard N. Zare and Patrick Riley.

Installation

From source:

  1. Install rdkit.
    conda create -c rdkit -n my-rdkit-env rdkit
    conda activate my-rdkit-env
    conda install -c conda-forge rdkit

  2. Clone this repository.
    git clone https://github.com/aksub99/MolDQN-pytorch.git
    cd MolDQN-pytorch

  3. Install the requirements given in requirements.txt.
    pip install -r requirements.txt

  4. Install baselines.
    pip install "git+https://github.com/openai/baselines.git@master#egg=baselines-0.1.6"

From Docker:

Using a docker image requires an NVIDIA GPU. If you do not have a GPU please follow the directions for installing from source In order to get GPU support you will have to use the nvidia-docker plugin.

# Build the Dockerfile in Dockerfiles/Dockerfile to create a Docker image.
cd Dockerfiles
docker build -t moldqn_pytorch:latest .

# This will create a container from the image we just created.
nvidia-docker run -[Options] moldqn_pytorch:latest python path/to/main.py

Please remember to modify the TB_LOG_PATH variable in main.py depending on where you wish to store your tensorboard runs file.

Training the MolDQN:

python main.py

A simple example to train the model on a single property optimization task can be seen in examples/MolDQN-pytorch.ipynb.

Results:

The following was the reward curve obtained when the model was trained for 5000 episodes on a single property optimization task (QED in this case).

moldqn-pytorch's People

Contributors

aksub99 avatar modiprabal avatar

Watchers

 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.