The BiRetroSys includes 1.Preprocess, 2.Single-Step Template-Free Prediction, 3.Beam Search, and 4.Multi-Step Retrosynthesis Search modules. Specifically, the single-step model is a dual-task SeqAGraph(https://github.com/AILBC/SeqAGraph) trained on USPTO-full, and the multi-step search is a custom Retro*(https://github.com/binghong-ml/retro_star) with a dynamic molecule filter set, a lower-bound beam search score, and a consistency checking mechanism based on forward synthesis.
The Single-Step autoregressive model is fully implemented by ONNX and ONNXRuntime(ORT), which means it will have a noticeable speed-up compared with naive PyTorch implementation in CPU (about 1 sec. per molecule per step).
- numpy
- onnxruntime
- rdkit
- graphviz
- Make a copy of the source code, and download the molecule set, encoder ONNX file, and decoder ONNX file from the link below, then put them into the
/Models/
(for molecule set) and/Models/full/
(for ONNX models). https://drive.google.com/drive/folders/1R5I4Yb1Ss8hBpgg7H4jLzpM1g719doJE?usp=drive_link - Run
searchModel.py
, your target molecule is "example_smi". - Find your results and the corresponding GraphViz file in
/MultiStepSearch/SearchResults
.
- CMake
$\geq 3.21$ , C++17, PkgConfig(for graphviz libraries) - Eigen3
- RDKit Libraries
- onnxruntime
- graphviz
- Make a copy of the source code, and download the molecule set, encoder ONNX file, and decoder ONNX file from the link below, then put them into the
/Models/
(for molecule set) and/Models/full/
(for ONNX models). https://drive.google.com/drive/folders/1R5I4Yb1Ss8hBpgg7H4jLzpM1g719doJE?usp=drive_link - Check your PkgConfig directory, and copy this directory to the CMakeLists.txt
set(ENV{PKG_CONFIG_PATH} ${DIR})
- In the main
BiRetroSys-cpp
directory, usemkdir ${DIRNAME}
at the terminal to create the cmake directory, then usecd ${DIRNAME}
,cmake ..
to create the cmake builder, finally, usemake
to build the executable programBiRetroSys.exe
- Run
BiRetroSys.exe
, then input the NAME and SMILES to generate the corresponding Search Tree and Routes.
- C++ test in CUDA execution.
- A simple interface of BiRetroSys.
- An installation channel, maybe pip or homebrew?