Code Monkey home page Code Monkey logo

retrosynthesis-reaction-pathway's Introduction

Retrosynthesis-Reaction-Pathway

The web application generates complete breakdown pathways for the given product molecule.

For inference purpose a checkpoint created after 44000 steps is provided here.

Installations

  1. rdkit
  2. OpenNMT

Dataset Generation

Clone the OpenNMT repo

Follow the setup instructions in the repo.

Datasets can be downloaded here

Datasets should be plcaed in the data directory in the OpenNMT-py directory using a different data folder for each version of the dataset (no augmentation, 4x, 16x and 40x augmentation)

In the OpenNMT-py directory, run the following command:

python preprocess.py -train_src data/{dataset_directory}/{train_source}.txt \
-train_tgt data/{dataset_directory}/{train_targets}.txt -valid_src data/{dataset_directory}/{valid_source}.txt \
-valid_tgt data/{dataset_directory}/{valid_targets}.txt -save_data data/{dataset_directory}/{dataset_name} \
-src_seq_length 1000 -tgt_seq_length 1000 -src_vocab_size 1000 -tgt_vocab_size 1000 -share_vocab

Model Training

Move the model_config.yml file in this directory to the config directory in the OpenNMT-py directory.

Update the data and save_model fields for the dataset created above

In the OpenNMT-py directory, run the following command:

python train.py -config config/model_config.yml

Running the web app

  1. Download the model in the Retrosynthesis-Reaction-Pathway directory. If you have created your own model then change the model path here.
  2. Run python app.py and vsit the link displayed on the terminal/Command prompt.
  3. Enter the correct SMILES in the text box and click on upload.
  4. The molecule visualisation and the complete pathway will be shown.

Demo

demo

TODO

  • Improve the frontend.
  • Add option to enter IUPAC name instead of SMILES as input.

retrosynthesis-reaction-pathway's People

Contributors

quicklearner171998 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

retrosynthesis-reaction-pathway's Issues

implement another retrosynthesis model

hello, thanks for sharing.
So i have another model that i would integrated with your app, but different to your approach mine accept the product molecule along with the synthons. Any idea how to do this ?

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.