赞
踩
项目源头: https://github.com/clinfo/SBMolGen
下文用到的安装包关注grosetta公众号,后台回复“sbmolgen”全部获得。
#创建一个新的python3.7环境
conda create -n sbmolgen python=3.7
conda activate sbmolgen
pip install keras==2.0.5
pip install tensorflow==1.15.2
conda install rdkit
另外还需按照常规方式安装rDock,安装过程查看往期内容。
#配置环境变量:
export SBMolGen_PATH=/Path to SBMolGen/SBMolGen
export PATH=${SBMolGen_PATH}:${PATH}
export RBT_ROOT=/Path to rDock
export LD_LIBRARY_PATH=${RBT_ROOT}/lib:${LD_LIBRARY_PATH}
cd ${SBMolGen_PATH}/train_RNN
python train_RNN.py train_RNN.yaml
文件
train_RNN.yaml
中包含RNN模型训练参数。自己根据需求调整
cd ${SBMolGen_PATH}/example_ligand_design
python ${SBMolGen_PATH}/sbmolgen.py setting.yaml
- 切记
${SBMolGen_PATH}/example_ligand_design
路径下的cavity.as
cavity.prm
文件不可删除,它们包含了受体中活性空腔位置信息。receptor.mol2
为受体文件,也不能删除。setting.yaml
设定生成分子的参数(如生成时间,受体所在路径等)
TypeError: Descriptors cannot not be created directly.If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.If you cannot immediately regenerate your protos, some other possible workarounds are:
- Downgrade the protobuf package to 3.20.x or lower.
- Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
解决措施
pip install protobuf~=3.19.0
TypeError: load() missing 1 required positional argument: ‘Loader‘
解决措施:
pip uninstall pyyaml #卸载当前高版本pyyaml
#下载并解压低版本pyyaml安装包(关注grosetta公众号,后台回复"sbmolgen"获取安装包)
tar -zvxf pyyaml-3.12.tar.gz
cd pyyaml-3.12
python setup.py install
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。