Ubuntu 24.04 RFdiffusion的安装

下载

If you want to set up RFdiffusion locally, follow the steps below:

To get started using RFdiffusion, clone the repo:

git clone https://github.com/RosettaCommons/RFdiffusion.git

You’ll then need to download the model weights into the RFDiffusion directory.

cd RFdiffusion
mkdir models && cd models
wget http://files.ipd.uw.edu/pub/RFdiffusion/6f5902ac237024bdd0c176cb93063dc4/Base_ckpt.pt
wget http://files.ipd.uw.edu/pub/RFdiffusion/e29311f6f1bf1af907f9ef9f44b8328b/Complex_base_ckpt.pt
wget http://files.ipd.uw.edu/pub/RFdiffusion/60f09a193fb5e5ccdc4980417708dbab/Complex_Fold_base_ckpt.pt
wget http://files.ipd.uw.edu/pub/RFdiffusion/74f51cfb8b440f50d70878e05361d8f0/InpaintSeq_ckpt.pt
wget http://files.ipd.uw.edu/pub/RFdiffusion/76d00716416567174cdb7ca96e208296/InpaintSeq_Fold_ckpt.pt
wget http://files.ipd.uw.edu/pub/RFdiffusion/5532d2e1f3a4738decd58b19d633b3c3/ActiveSite_ckpt.pt
wget http://files.ipd.uw.edu/pub/RFdiffusion/12fc204edeae5b57713c5ad7dcb97d39/Base_epoch8_ckpt.pt

Optional:
wget http://files.ipd.uw.edu/pub/RFdiffusion/f572d396fae9206628714fb2ce00f72e/Complex_beta_ckpt.pt

# original structure prediction weights
wget http://files.ipd.uw.edu/pub/RFdiffusion/1befcb9b28e2f778f53d47f18b7597fa/RF_structure_prediction_weights.pt

退回到RFdiffusion目录

安装

conda env create -f env/SE3nv.yml

conda activate SE3nv
cd env/SE3Transformer
pip install --no-cache-dir -r requirements.txt
python setup.py install
cd ../.. # change into the root directory of the repository
pip install -e . # install the rfdiffusion module from the root of the repository

运行到pip install时候报错,看样子是git不到东西

e3nn==0.3.3
wandb==0.12.0
pynvml==11.0.0
git+https://github.com/NVIDIA/dllogger#egg=dllogger
decorator==5.1.0
~ 

打开requirments是这样的,先把line 4以外的都install,
git的有问题就先下载了代码,再用

pip install .

回到env/SE3Transformer folder,

python setup.py install
cd ../.. 
pip install -e . # install the rfdiffusion module from the root of the repository

返回一串,最后一句
#Successfully installed rfdiffusion

Anytime you run diffusion you should be sure to activate this conda environment by running the following command:

conda activate SE3nv

测试&使用

tar -xvf examples/ppi_scaffolds_subset.tar.gz -C examples/

Let’s first look at how you would do unconditional design of a protein of length 150aa.
For this, we just need to specify three things:

  1. The length of the protein
  2. The location where we want to write files to
  3. The number of designs we want
./scripts/run_inference.py 'contigmap.contigs=[150-150]' inference.output_prefix=test_outputs/test inference.num_designs=10

然后提示cuda有问题,检查是系统本身的cuda版本是12, yml文件配置的cuda是11,pytorch是1.9. 把系统外部的cuda卸载了(上次AF2没成功,干脆把外部环境清理掉,稍后再用conda安装)

sudo apt remove --purge '^cuda-.*' nvidia-cuda-toolkit
nvcc --version
#bash: /usr/bin/nvcc: No such file or directory 卸载干净了
#重新安装
conda install cudatoolkit=11.1 -c conda-forge
conda install pytorch==1.9.1 torchvision==0.10.1 torchaudio==0.9.1 cudatoolkit=11.1 -c pytorch
nvcc --version                                                                                   
Command 'nvcc' not found, but can be installed with:            
#没有,但是conda list里有

直接python验证

>>> import torch
>>> print(torch.__version__) 
1.9.1
>>> print(torch.version.cuda)  
11.1
>>> print(torch.cuda.is_available())
True
>>> print(torch.cuda.get_device_name(0)) 
NVIDIA RTX A6000
>>> 
./scripts/run_inference.py 'contigmap.contigs=[150-150]' inference.output_prefix=test_outputs/test inference.num_designs=10
[2025-03-31 10:13:04,221][__main__][INFO] - Finished design in 0.52 minutes

成功了,output有10个pdb, 结构各种各样的,但是序列都是GGG。Anyway, 收工~

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值