
Conda环境可以使用env.yaml配置构建:
conda env create -f env.yaml使用CUDA版本11.7和Pytorch版本1.13.1对代码进行了测试。
在运行代码之前,不要忘记激活环境:
conda activate PepGLADPyrosetta用于计算生成肽的界面能量。如果您对此感兴趣,请在此处按照此处进行安装。
这些数据集仅用于基准模型。如果您只想使用训练有素的权重来推断案例,则无需下载这些数据集。
最初在本文中介绍的数据集在此URL上上传到Zenodo。您可以按以下方式下载它们:
mkdir datasets # all datasets will be put into this directory
wget https://zenodo.org/records/13373108/files/train_valid.tar.gz ? download=1 -O ./datasets/train_valid.tar.gz # training/validation
wget https://zenodo.org/records/13373108/files/LNR.tar.gz ? download=1 -O ./datasets/LNR.tar.gz # test set
wget https://zenodo.org/records/13373108/files/ProtFrag.tar.gz ? download=1 -O ./datasets/ProtFrag.tar.gz # augmentation datasettar zxvf ./datasets/train_valid.tar.gz -C ./datasets
tar zxvf ./datasets/LNR.tar.gz -C ./datasets
tar zxvf ./datasets/ProtFrag.tar.gz -C ./datasetspython -m scripts.data_process.process --index ./datasets/train_valid/all.txt --out_dir ./datasets/train_valid/processed # train/validation set
python -m scripts.data_process.process --index ./datasets/LNR/test.txt --out_dir ./datasets/LNR/processed # test set
python -m scripts.data_process.process --index ./datasets/ProtFrag/all.txt --out_dir ./datasets/ProtFrag/processed # augmentation dataset需要如下生成火车/验证拆分的处理数据的索引,这将导致datasets/train_valid/processed/train_index.txt和datasets/train_valid/processed/valid_index.txt :
python -m scripts.data_process.split --train_index datasets/train_valid/train.txt --valid_index datasets/train_valid/valid.txt --processed_dir datasets/train_valid/processed/wget http://huanglab.phys.hust.edu.cn/pepbdb/db/download/pepbdb-20200318.tgz -O ./datasets/pepbdb.tgztar zxvf ./datasets/pepbdb.tgz -C ./datasets/pepbdbpython -m scripts.data_process.pepbdb --index ./datasets/pepbdb/peptidelist.txt --out_dir ./datasets/pepbdb/processed
python -m scripts.data_process.split --train_index ./datasets/pepbdb/train.txt --valid_index ./datasets/pepbdb/valid.txt --test_index ./datasets/pepbdb/test.txt --processed_dir datasets/pepbdb/processed/
mv ./datasets/pepbdb/processed/pdbs ./dataset/pepbdb # re-locate./checkpoint/codesign.ckpt codesign.ckpt./checkpoints/fixseq.ckpt fixseq.ckpt两者都可以在发布页面上下载。这些检查站在Pepbench上进行了培训。
以./assets/1ssc_A_B.pdb为例,其中链A是目标蛋白:
# obtain the binding site, which might also be manually crafted or from other ligands (e.g. small molecule, antibodies)
python -m api.detect_pocket --pdb assets/1ssc_A_B.pdb --target_chains A --ligand_chains B --out assets/1ssc_A_pocket.json
# sequence-structure codesign with length in [8, 15)
CUDA_VISIBLE_DEVICES=0 python -m api.run
--mode codesign
--pdb assets/1ssc_A_B.pdb
--pocket assets/1ssc_A_pocket.json
--out_dir ./output/codesign
--length_min 8
--length_max 15
--n_samples 10然后,将在文件夹中输出10代./output/codesign 。
以./assets/1ssc_A_B.pdb为例,其中链A是目标蛋白:
# obtain the binding site, which might also be manually crafted or from other ligands (e.g. small molecule, antibodies)
python -m api.detect_pocket --pdb assets/1ssc_A_B.pdb --target_chains A --ligand_chains B --out assets/1ssc_A_pocket.json
# generate binding conformation
CUDA_VISIBLE_DEVICES=0 python -m api.run
--mode struct_pred
--pdb assets/1ssc_A_B.pdb
--pocket assets/1ssc_A_pocket.json
--out_dir ./output/struct_pred
--peptide_seq PYVPVHFDASV
--n_samples 10然后,将在./output/struct_pred夹中输出10个构象。
每个任务都需要以下步骤,我们已将其集成到脚本中./scripts/run_exp_pipe.sh :
另一方面,如果要评估现有检查点,请按照以下说明(例如构象生成):
# generate results on the test set and save to ./results/fixseq
python generate.py --config configs/pepbench/test_fixseq.yaml --ckpt checkpoints/fixseq.ckpt --gpu 0 --save_dir ./results/fixseq
# calculate metrics
python cal_metrics.py --results ./results/fixseq/results.jsonlpepbench上的代码实验:
GPU=0 bash scripts/run_exp_pipe.sh pepbench_codesign configs/pepbench/autoencoder/train_codesign.yaml configs/pepbench/ldm/train_codesign.yaml configs/pepbench/ldm/setup_latent_guidance.yaml configs/pepbench/test_codesign.yamlpepbench上的构象产生实验:
GPU=0 bash scripts/run_exp_pipe.sh pepbench_fixseq configs/pepbench/autoencoder/train_fixseq.yaml configs/pepbench/ldm/train_fixseq.yaml configs/pepbench/ldm/setup_latent_guidance.yaml configs/pepbench/test_fixseq.yaml感谢您对我们的工作的兴趣!
请随时询问有关算法,代码以及运行它们遇到的问题的任何问题,以便我们可以使其更清晰,更好。您可以在GitHub回购中创建问题,也可以通过[email protected]与我们联系。
@article { kong2024full ,
title = { Full-atom peptide design with geometric latent diffusion } ,
author = { Kong, Xiangzhe and Huang, Wenbing and Liu, Yang } ,
journal = { arXiv preprint arXiv:2402.13555 } ,
year = { 2024 }
}