PSP - 蛋白质与蛋白质的扩散对接 DiffDock-PP 算法

欢迎关注我的CSDN:https://spike.blog.csdn.net/
本文地址:https://spike.blog.csdn.net/article/details/135115528

DiffDock-PP

DiffDock-PP is a new approach to rigid-body protein-protein docking that is based on a diffusion generative model that learns to translate and rotate unbound protein structures into their bound conformations, and a confidence model that learns to rank different poses generated by the score model and select the best one.

DiffDock-PP 是一种新的刚体蛋白质-蛋白质对接方法,基于扩散生成模型,该模型学习将未结合的蛋白质结构翻译和旋转为其结合构象,基于置信模型,该模型学习对评分模型生成的不同姿势,进行排序并选择最佳姿势。

  • Paper:DiffDock-PP: Rigid Protein-Protein Docking with Diffusion Models
  • Github:https://github.com/ketatam/DiffDock-PP

算法整体思路与 DiffDock 接近,Paper:DiffDock: Diffusion Steps, Twists, and Turns for Molecular Docking

Conda 环境配置:

conda create -n diffdock_pp python=3.10.8
conda activate diffdock_ppconda install pytorch=1.13.0 pytorch-cuda=11.6 -c pytorch -c nvidia

验证 PyTorch 是否安装成功:

import torch
print(torch.__version__)  # 1.13.0
print(torch.cuda.is_available())  # True

安装其他包:

pip install --no-cache-dir  torch-scatter==2.0.9 torch-sparse==0.6.15 torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-1.13.0+cu116.htmlpip install numpy dill tqdm pyyaml pandas biopandas scikit-learn biopython e3nn wandb tensorboard tensorboardX matplotlib

下载数据,具体数据路径 datasets/DIPS/pairs_pruned,即:

bypy downfile /psp_data/diffdock_pp/DIPS.zip DIPS.zip

具体使用位于 src/inference.sh,参考 dips_esm_inference.yaml

 data:dataset: dipsdata_file: datasets/DIPS/data_file_100_test.csvdata_path: datasets/DIPS/pairs_pruned
...

其中,数据文件 data_file_100_test.csv,即:

path,split
eb/1ebo.pdb2_1.dill,test
dm/3dmp.pdb3_2.dill,test
kq/1kq1.pdb1_1.dill,test
b2/2b24.pdb1_8.dill,test
cf/3cf0.pdb1_6.dill,test
...

还需要下载 ESM 的 650M 模型,位于 torchhub/checkpoints,否则下载很慢,即:

esm2_t33_650M_UR50D-contact-regression.pt
esm2_t33_650M_UR50D.pt

其中数据类型是 dill 类型,PDB 转换成 dill 类型,参考 https://github.com/octavian-ganea/equidock_public#dips-data

运行推理脚本:

sh src/inference.sh

其中,在运行时,在 src/geom_utils/so3.py 中,需要预处理 npy ,耗时较长,即:

.so3_cdf_vals2.npy
.so3_exp_score_norms2.npy
.so3_omegas_array2.npy
.so3_score_norms2.npy

运行日志:

SCORE_MODEL_PATH: checkpoints/large_model_dips/fold_0/
CONFIDENCE_MODEL_PATH: checkpoints/large_model_dips/fold_0/
SAVE_PATH: ckpts/test_large_model_dips
09:50:16 Starting Inference
data loading: 100%|| 100/100 [00:00<00:00, 561486
09:50:18 Computing ESM embeddings
Using cache found in torchhub/facebookresearch_esm_main
ESM: 100%|██████████| 4/4 [00:10<00:00,  2.70s/it]
ESM: 100%|██████████| 4/4 [00:06<00:00,  1.61s/it]
09:50:50 finished tokenizing residues with ESM
09:50:50 finished tokenizing all inputs
09:50:50 100 entries loaded
09:50:50 finished loading raw data
09:50:50 running inference
09:50:50 finished creating data splits
miniconda3/envs/diffdock_pp/lib/python3.10/site-packages/torch/jit/_check.py:181: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`.warnings.warn("The TorchScript type system doesn't support "
09:50:52 loaded model with kwargs: 
checkpoint checkpoints/large_model_dips/fold_0/model_best_338669_140_31.084_30.347.pth
09:50:52 loaded checkpoint from checkpoints/large_model_dips/fold_0/model_best_338669_140_31.084_30.347.pth
09:50:53 loaded model with kwargs: 
checkpoint checkpoints/confidence_model_dips/fold_0/model_best_0_6_0.241_0.887.pth
09:50:53 loaded checkpoint from checkpoints/confidence_model_dips/fold_0/model_best_0_6_0.241_0.887.pth
09:50:53 finished loading model
args.temp_sampling: 2.4390%|                                                                                                       | 0/100 [00:00<?, ?it/s]09:53:42 Completed 0 out of 40 steps
09:53:44 Completed 1 out of 40 steps
09:53:46 Completed 2 out of 40 steps
09:53:48 Completed 3 out of 40 steps
...

预测结果,1B26 Receptor 和 Ligand,即:
Img

NVCC Bug,参考 GitHub - Failed building wheel for torch-cluster:

      In file included from csrc/cuda/graclus_cuda.cu:3:0:diffdock_pp/lib/python3.10/site-packages/torch/include/ATen/cuda/CUDAContext.h:10:10: fatal error: cusolverDn.h: No such file or directory#include <cusolverDn.h>^~~~~~~~~~~~~~compilation terminated.error: command 'diffdock_pp/bin/nvcc' failed with exit code 1[end of output]note: This error originates from a subprocess, and is likely not a problem with pip.ERROR: Failed building wheel for torch-clusterRunning setup.py clean for torch-cluster
Failed to build torch-cluster
ERROR: Could not build wheels for torch-cluster, which is required to install pyproject.toml-based projects

解决方案,参考 [BUG] fatal error: cusolverDn.h: No such file or directory:

export PATH=/usr/local/cuda/bin:$PATH

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/289184.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

回归预测 | MATLAB实现GWO-DHKELM基于灰狼算法优化深度混合核极限学习机的数据回归预测 (多指标,多图)

回归预测 | MATLAB实现GWO-DHKELM基于灰狼算法优化深度混合核极限学习机的数据回归预测 &#xff08;多指标&#xff0c;多图&#xff09; 目录 回归预测 | MATLAB实现GWO-DHKELM基于灰狼算法优化深度混合核极限学习机的数据回归预测 &#xff08;多指标&#xff0c;多图&#…

SLA阿里云,腾讯云,华为云服务测量指标

SLA 的由来 在云计算时代&#xff0c;越来越多企业的服务迁移到云上&#xff0c;各大云服务厂商有自己服务发布的SLA&#xff0c;SLA是服务提供商与客户之间定义的正式承诺。 我们使用云服务提供商为我们提供的 APP 或者网站&#xff0c;如果出现购物无法下单、看视频打不开类…

浅析 ArrayList

ArrayList是一个使用List接口实现的Java类。顾名思义&#xff0c;Java ArrayList提供了动态数组的功能&#xff0c;其中数组的大小不是固定的。它实现了所有可选的列表操作&#xff0c;并允许所有元素&#xff0c;包括null。 ArrayList 继承于 AbstractList &#xff0c;实现了…

js知识点1:防抖节流

js知识点1&#xff1a;防抖节流 防抖节流 防抖节流&#xff0c;本质上是优化高频率执行代码的一种手段 定义&#xff1a; 防抖: n 秒后再执行该事件&#xff0c;若在 n 秒内被重复触发&#xff0c;则重新计时 节流: n 秒内只运行一次&#xff0c;若在 n 秒内重复触发&#xff0…

存储:The file system wasn‘t safely closed on Windows.

借鉴&#xff1a;mount -t ntfs-3g 挂载失败 The disk contains an unclean file system (0, 0). - 简书 (jianshu.com) 原因&#xff1a;进程未关闭&#xff0c;无法读写磁盘 [rootlocalhost /]# mount -t ntfs-3g /dev/sdb2 /data1/ The disk contains an unclean file sys…

ClickHouse中的CPU调度

本文字数&#xff1a;14267&#xff1b;估计阅读时间&#xff1a;36 分钟 作者&#xff1a;Maksim Kita 审校&#xff1a;庄晓东&#xff08;魏庄&#xff09; 本文在公众号【ClickHouseInc】首发 概述 在这篇文章中&#xff0c;我将描述向量化的工作原理&#xff0c;什么是CP…

《PySpark大数据分析实战》-16.云服务模式Databricks介绍运行案例

&#x1f4cb; 博主简介 &#x1f496; 作者简介&#xff1a;大家好&#xff0c;我是wux_labs。&#x1f61c; 热衷于各种主流技术&#xff0c;热爱数据科学、机器学习、云计算、人工智能。 通过了TiDB数据库专员&#xff08;PCTA&#xff09;、TiDB数据库专家&#xff08;PCTP…

浅析RoPE旋转位置编码的远程衰减特性

为什么 θ i \theta_i θi​的取值会造成远程衰减性 旋转位置编码的出发点为&#xff1a;通过绝对位置编码的方式实现相对位置编码。 对词向量 q \boldsymbol{q} q添加绝对位置信息 m m m&#xff0c;希望找到一种函数 f f f&#xff0c;使得&#xff1a; < f ( q , m ) …

windows netstat命令

文章目录 前言各选项的含义如下&#xff1a; 前言 Netstat是控制台命令,是一个监控TCP/IP网络的非常有用的工具&#xff0c;它可以显示路由表、实际的网络连接以及每一个网络接口设备的状态信息。Netstat用于显示与IP、TCP、UDP和ICMP协议相关的统计数据&#xff0c;一般用于检…

Python中的复数

复数一般表示为abi(a、b为有理数)&#xff0c;在python中i被挪着它用&#xff0c;虚数单位是不区分大小写的J。 (笔记模板由python脚本于2023年12月19日 18:58:39创建&#xff0c;本篇笔记适合认识复数的coder翻阅) 【学习的细节是欢悦的历程】 Python 官网&#xff1a;https:/…

AIGC:阿里开源大模型通义千问部署与实战

1 引言 通义千问-7B&#xff08;Qwen-7B&#xff09;是阿里云研发的通义千问大模型系列的70亿参数规模的模型。Qwen-7B是基于Transformer的大语言模型, 在超大规模的预训练数据上进行训练得到。预训练数据类型多样&#xff0c;覆盖广泛&#xff0c;包括大量网络文本、专业书籍…

机器学习算法--朴素贝叶斯(Naive Bayes)

实验环境 1. python3.7 2. numpy > 1.16.4 3. sklearn > 0.23.1 朴素贝叶斯的介绍 朴素贝叶斯算法&#xff08;Naive Bayes, NB) 是应用最为广泛的分类算法之一。它是基于贝叶斯定义和特征条件独立假设的分类器方法。NB模型所需估计的参数很少&#xff0c;对缺失数据不…