GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - YifaSuoha962/Graph2Edits

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
data/uspto_50k
data/uspto_50k
 
 
experiments/uspto_50k
experiments/uspto_50k
 
 
models
models
 
 
utils
utils
 
 
README.md
README.md
 
 
canonicalize_prod.py
canonicalize_prod.py
 
 
eval-1.py
eval-1.py
 
 
eval.py
eval.py
 
 
prepare_data.py
prepare_data.py
 
 
preprocess.py
preprocess.py
 
 
train.py
train.py
 
 

Repository files navigation

DOI

Retrosynthesis prediction using an end-to-end graph neural network for molecular graph editing

Inspired by the arrow-pushing formalism in chemical reaction mechanisms, we present a novel end-to-end architecture for retrosynthesis prediction, Graph2Edits, based on graph neural network to predict the edits of the product graph in an auto-regressive manner, and sequentially generates transformation intermediates and final reactants according to the predicted edits sequence.

Environment Requirements

Create a virtual environment to run the code of Graph2Edits. Install pytorch with the cuda version that fits your device.

conda create -n graph2edits python=3.7 \
conda activate graph2edits \
conda install -c conda-forge rdkit=2019.09.2 \
conda install pytorch==1.6.0 torchvision==0.7.0 cudatoolkit=10.1 -c pytorch \
pip install numpy==1.17.3 \  

Data preprocessing

  1. generate the edit labels and the edits sequence for reaction
python preprocess.py --mode train \
python preprocess.py --mode valid \
python preprocess.py --mode test \
  1. prepare the data for training
python prepare_data.py

Train Graph2Edits model

Go to the graph2edits folder and run the following to train the model with specified dataset (default: USPTO_50k)

python train.py --dataset uspto_50k --use_rxn_class False

The trained model will be saved at graph2edits/experiments/uspto_50k/without_rxn_class/

Evaluate using a trained model

To evaluate the trained model, run

python eval.py

to get the raw prediction file saved at graph2edits/experiments/.../pred_results.txt

Reproducing our results

To reproduce our results, run

python eval.py --dataset uspto_50k --use_rxn_class False or True --experiments 27-06-2022--10-27-22 or 30-06-2022--00-19-29

This will display the results for reaction class unknown and known setting

About

No description, website, or topics provided.

Resources

Readme
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.