赞
踩
推文
文献
Molecule Generation For Target Protein Binding with Structural Motifs | OpenReview
将源码克隆到本地
激活环境
conda env create -f flag_env.yaml
把目录更改为FALG下:
pushd FLAG
下载数据集并解压到本地服务器
Update the dataset (refer to README.MD in the dataa folder)
download the crossdocked_pocket10.tar.gz
tar -xzvf crossdocked_pocket10.tar.gz.
数据集文件下载在本地 C:/中
将本地c盘中的文件传输/复制至远程服务器上
用filezilla传输
报错1:
打开 mol_tree.py, 将index_path = '/data/FLAG/crossdocked_pocket10/index.pkl'修改为本地路径例如:index_path = '/data/user/liwh/FLAG/crossdocked_pocket10/index.pkl'
(同样,将utils文件下的 train_model.yml 和sample.yml中的相对路径改为本地路径)
报错2:
可能是 train.py 脚本在当前目录中找不到父级包,将“.warm up" 改为” warm up"
报错3:
说明 Python 找不到名为 chemutils 的模块。
将mol_tree.py文件中的
from chemutils import get_clique_mol, tree_decomp, get_mol, get_smiles, set_atommap, get_clique_mol_simple改为
from utils.chemutils import get_clique_mol, tree_decomp, get_mol, get_smiles, set_atommap, get_clique_mol_simple
报错4:
找不到这个文件
修改代码 utils/datasets/pl.py
报错5:
之后运行train.py可能会出现数据全都被skipping的情况例如:
Skipping (183455) ZIPA_ECOLI_187_328_0/1y2g_A_rec_1s1j_iqz_lig_tt_docked_15.sdf
Skipping (183456) ZIPA_ECOLI_187_328_0/1y2g_A_rec_1y2g_cl3_lig_tt_docked_3.sdf
Skipping (183457) ZIPA_ECOLI_187_328_0/1s1j_A_rec_1y2g_cl3_lig_tt_min_0.sdf
Skipping (183458) ZIPA_ECOLI_187_328_0/1y2g_A_rec_1y2g_cl3_lig_tt_min_0.sdf
Skipping (183459) ZAP70_HUMAN_327_607_0/1u59_A_rec_1u59_stu_lig_tt_min_0.sdf
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████▉|
修改utils/datasets/pl.py中_process 函数except块中添加更多的打印语句,以便查看具体哪些数据点出现了异常,并打印出异常信息:
注意要把crossdocked_pocket10_name2id.pt文件删除后才能重新生成数据
再次运行train.py文件,可查看出现报错的原因,例如:
Skipping (183463) ZIPA_ECOLI_187_328_0/1s1s_B_rec_1s1j_iqz_lig_tt_docked_7.sdf
Exception message: module 'numpy' has no attribute 'long'
解决的几个方法:
1. 尝试显式地指定使用整数类型 'int64' 来避免使用 'long' 属性。在代码中使用 'int64' 替代 'long':
2. 重装numpy,我原先的版本是1.24.1,重装为:1.23.0:pip install numpy==1.23.
训练时间过长,目前还没有出结果,所以不一定正确
Sampling
python motif_sample.py
报错:
源代码中没有提供预训练模型./pretrained/model.pt
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。