Git Product home page Git Product logo

cattest's Introduction

RetroCaptioner

Title

RetroCaptioner: Beyond Attention in End-to-end Retrosynthesis Transformer via Dynamically Integrated Learnable Graph Representation

Abstract

In this work, we present RetroCaptioner, a novel end-to-end framework for one-step retrosynthesis that combines the power of a graph encoder, which integrates learnable structural information, with the capability to sequentially translate drugs, thereby efficiently capturing chemically plausible information.

In the application of drug synthesis route planning, RetroCaptioner identifies shortened and optimal pathways that accurately correspond to established reactions, offering valuable insights for reliable and high-quality organic synthesis in drug discovery. image

Setup

RetroCaptioner requires anaconda with Python 3.7 or later, cudatoolkit=10.2.

Sugguest to install RetroCaptioner in a virtual environment to prevent conflicting dependencies.

conda create -n RetroCaptioner python==3.7
conda activate RetroCaptioner
conda install --yes --file requirements.txt
CUDA-enabled device for GPU training (optional)

Training the model

To train the model, you will use the train.py script. This script accepts several command-line arguments to customize the training process.

Command-Line Arguments:

  • --known_class: Indicates whether the class is known (True) or unknown (False).
  • --checkpoint_dir: Specifies the directory where the model checkpoints will be saved.
  • --device: Designates the training device, either cuda:0 for GPU or cpu for CPU.

Training command:

Run the following command to start the training process:

$ python train.py --known_class 'True' --checkpoint_dir './checkpoint' --device cuda:0

Replace the argument values as per your requirements. For instance, use --device cpu if you're training on a CPU.

Planning

Demo code for multi-step planning has been placed in run_biosynthesis.py.

This demo now will take only 20 seconds with single GPU (Nvidia RTX3090). One need to first download the checkpoints and unzip under path to folder to run the demo. The output will be visulized in viz_dir.

The key functions are shown in the following block, You may run your own molecule by changing the 'target_mol' in main_biosynthesis().

 $ provide the code here 

Validating the model

After training, you can validate the model's accuracy using the translate.py script.

  • --known_class: As in the training step, this indicates whether the class is known or unknown.
  • --checkpoint_dir: The directory where your trained model checkpoints are stored.
  • --checkpoint: The specific checkpoint file to use for validation. Replace {training_step} with the appropriate training step number.
  • --device: The device to run the validation on, either GPU (cuda:0) or CPU (cpu).

Train the model and perform the retrosynthesis step

To train the model, please run the train.py file. After the training is completed, you can run the translate.py for one-step retrosynthesis prediction

cattest's People

Contributors

guofei-tju avatar

Watchers

 avatar

Forkers

yy727-phd

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.