Bohrium
robot
新建

空间站广场

论文
Notebooks
比赛
课程
Apps
我的主页
我的Notebooks
我的论文库
我的足迹

我的工作空间

任务
节点
文件
数据集
镜像
项目
数据库
公开
DiffDock Notebook
PyTorch
PyTorch
我是地球人
发布于 2023-07-19
AI4SCUP-CNS-BBB(v1)

©️ Copyright 2023 @ Authors
作者: 杨舒文 📨 李子尧 📨
日期:2023-07-20
共享协议:本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。
快速开始:点击上方的 开始连接 按钮,选择 diffdock:2023-07-20-4镜像 和任意配置机型即可开始。

代码
文本

DiffDock Notebook

代码
文本

Open In BohriumPWC

1. Introduction

Paper on arXiv

GitHub

Bohrium implementation of DiffDock, state-of-the-art method for molecular docking, by Gabriele Corso*, Hannes Stark*, Bowen Jing*, Regina Barzilay and Tommi Jaakkola.

Overview

You might also be interested in this awesome interactive online tool by Simon Duerr on Hugging Face for running DiffDock and visualising the predicted structures on your browser:

Open in Spaces

代码
文本

2. Inference

代码
文本
[ ]
import os
os.chdir("/root")
os.getcwd()
代码
文本

2.1 PDB + SMILES Input

We provide two easy ways to input ONE complex by configuring:

  • complex_name (str): name that the complex will be saved with
  • one of
    • protein_path (str): path to the protein file
    • protein_sequence (str): sequence of the protein for ESMFold
  • ligand_description (str): either a SMILES string or the path to a molecule file that rdkit can read
代码
文本
[ ]
# with sequences
complex_name = "1a0q"
protein_path = None
protein_sequence = "DIELTQSPSSLSASLGGKVTITCKASQDIKKYIGWYQHKPGKQPRLLIHYTSTLLPGIPSRFRGSGSGRDYSFSISNLEPEDIATYYCLQYYNLRTFGGGTKLEIKRADAAPTVSIFPPSSEQLTSGGASVVCFLNNFYSKDINVKWKIDGSERQNGVLNSWTDQDSKDSTYSMSSTLTLTKDEYERHNSYTCEATHKTSTSPIVKSFNRNE:EVQLQESDAELVKPGASVKISCKASGYTFTDHVIHWVKQKPEQGLEWIGYISPGNGDIKYNEKFKGKATLTADKSSSTAYMQLNSLTSEDSAVYLCKRGYYGRSNVDYWGQGTTLTVSSAKTTPPSVYPLAPGSAAQTNSMVTLGCLVKGYFPEPVTVTWNSGSLSSGVHTFPAVLQSDLYTLSSSVTVPSSTWPSETVTCNVAHPASSTKVDKKIE"
ligand_description = "COc(cc1)ccc1C#N"
代码
文本
[ ]
# with file path
complex_name = "1a0q"
protein_path = "/root/data/1a0q/1a0q_protein_processed.pdb"
protein_sequence = None
ligand_description = "/root/data/1a0q/1a0q_ligand.sdf"
代码
文本

If inference of multiple complexes is required, please input a path of protein_ligand_csv with following format:

complex_name protein_path ligand_description protein_sequence
1 /root/data/1a0q/1a0q_protein_processed.pdb data/1a0q/1a0q_ligand.sdf
2 /root/data/1a0q/1a0q_protein_processed.pdb COc(cc1)ccc1C#N
代码
文本
[ ]
# with csv path
protein_ligand_csv_path = "/root/data/protein_ligand_example_csv.csv"
代码
文本

2.2 Output Configuration and Hyper-parameter

代码
文本
[ ]
# Directory where the outputs will be written to
out_dir = "/data/DiffDock-results/user_inference"
# Whether to save a pdb file with all the steps of the reverse diffusion
save_visualisation = False
# Number of samples to generate
samples_per_complex = 10

# Batch size
batch_size = 32
# If True, use no noise in the final step of the reverse diffusion
no_final_step_noise = False
# Number of denoising steps
inference_steps = 20
# Number of denoising steps that are actually performed, equal to inference_steps if None
actual_steps = None

# Model Info (Default from https://github.com/gcorso/DiffDock/tree/main/workdir)
model_dir = '/root/workdir/paper_score_model'
ckpt = 'best_ema_inference_epoch_model.pt'
confidence_model_dir = '/root/workdir/paper_confidence_model'
confidence_ckpt = 'best_model_epoch75.pt'
代码
文本

2.3 Protein-ligand Docking

代码
文本
[ ]
from diffdock import inference
import warnings
warnings.filterwarnings("ignore")

inference(
protein_ligand_csv=protein_ligand_csv_path,
complex_name=complex_name,
protein_path=protein_path,
protein_sequence=protein_sequence,
ligand_description=ligand_description,

out_dir=out_dir,
save_visualisation=save_visualisation,
samples_per_complex=samples_per_complex,

batch_size=batch_size,
no_final_step_noise=no_final_step_noise,
inference_steps=inference_steps,
actual_steps=actual_steps,

model_dir=model_dir,
ckpt=ckpt,
confidence_model_dir=confidence_model_dir,
confidence_ckpt=confidence_ckpt,
)
代码
文本
PyTorch
PyTorch
点个赞吧
推荐阅读
公开
Unifold Batch Inference
Uni-Fold
Uni-Fold
csg
发布于 2023-09-24
2 赞5 转存文件
公开
Uni-Fold Notebook
Uni-FoldPyTorch
Uni-FoldPyTorch
我是地球人
发布于 2023-07-13
5 赞24 转存文件2 评论