Home

Awesome

LinkerNet: Fragment Poses and Linker Co-Design with 3D Equivariant Diffusion

License: MIT

This repository is the official implementation of LinkerNet: Fragment Poses and Linker Co-Design with 3D Equivariant Diffusion (NeurIPS 2023). [PDF]

<p align="center"> <img src="assets/overview.png" /> </p>

Installation

Dependency

The code has been tested in the following environment:

PackageVersion
Python3.8
PyTorch1.13.1
CUDA11.6
PyTorch Geometric2.2.0
RDKit2022.03.2

Install via Conda and Pip

conda create -n targetdiff python=3.8
conda activate targetdiff
conda install pytorch pytorch-cuda=11.6 -c pytorch -c nvidia
conda install pyg -c pyg
conda install rdkit openbabel tensorboard pyyaml easydict python-lmdb -c conda-forge

Data Preprocess

PROTAC-DB

We have provided all data files related to PROTAC-DB dataset in this repo.

python scripts/prepare_data.py --raw_path data/protac/index.pkl --dest data/protac/3d_index.pkl

Note that RDKit version may influence the PROTAC-DB dataset processing and splitting. We provided the processed data and split file here

ZINC

The raw ZINC data are same as DiffLinker. We preprocess ZINC data to output an index file by running:

python scripts/prepare_data.py \
    --raw_path data/zinc_difflinker \
    --dest data/zinc_difflinker/index_full.pkl \
    --dataset zinc_difflinker --mode full

We also provided the preprocessed index file here.


Training

python scripts/train_protac.py configs/training/zinc.yml

We have provided the pretrained checkpoints on ZINC / PROTAC.

Sampling

python scripts/sample_protac.py configs/sampling/zinc.yml --subset test --start_id 0 --end_id -1 --num_samples 250 --outdir outputs/zinc

We have also provided the sampling results in the same link.

Evaluation

python scripts/eval_protac.py {SAMPLE_RESULT_DIR}

Citation

@inproceedings{guan2023linkernet,
  title={LinkerNet: Fragment Poses and Linker Co-Design with 3D Equivariant Diffusion},
  author={Guan, Jiaqi and Peng, Xingang and Jiang, PeiQi and Luo, Yunan and Peng, Jian and Ma, Jianzhu},
  booktitle={Thirty-seventh Conference on Neural Information Processing Systems},
  year={2023}
}