igashov / DiffLinker

DiffLinker: Equivariant 3D-Conditional Diffusion Model for Molecular Linker Design
MIT License
290 stars 40 forks source link

How to sample with protein backbones?? #1

Closed orgw closed 1 year ago

orgw commented 1 year ago

Hi,

How do you sample with protein??

thanks

igashov commented 1 year ago

Hi @orgw!

To sample linkers conditioned on protein pockets you can repeat the same procedure as explained in section Sampling but using different datasets and models:

First, download test dataset:

mkdir -p datasets 
wget https://zenodo.org/record/7121280/files/MOAD_test_bb.pt?download=1 -O datasets/MOAD_test_bb.pt

Download the necessary model:

mkdir -p models
wget https://zenodo.org/record/7121300/files/pockets_difflinker_backbone.ckpt?download=1 -O models/pockets_difflinker_backbone.ckpt

Next, create necessary directories:

mkdir -p samples
mkdir -p trajectories

And sample:

python -W ignore sample.py \
                 --checkpoint models/pockets_difflinker_backbone.ckpt \
                 --samples samples \
                 --data datasets \
                 --prefix MOAD_test_bb \
                 --n_samples 2 \
                 --device cuda:0

Please let me know if you have other questions!

P.S. I found a bug while was running the commands above so thank you for asking!

orgw commented 1 year ago

Thank you! As you've said there was a problem so I've mentioned it