smina
smina 是基于Autodock Vina的软件,主要聚焦于提升算法和最小化。主要的改变包括:
- 通过OpenBabel提供能多的配体分子格式
- 支持多配体文件
- 增加术语类型(例如:去溶剂化能,静电势能)
- 支持用户自定义得分参数和得分功能
- 基于特异的结合配体自动计算盒子
- 允许输出超过20个对接姿势
- 提升了最小化算法
- 如果配体不是pdbqt格式,那么在文件中需要局部电荷。完成这项工作在OpenBabel和AutoDock Tools中的prepare_ligand4.py脚本中会有不同的结果。
一 安装
静态编译文件提供了openbabel和boost(1.5.4),但是要求内核高于2.6.24
- boost 安装(见之前的博文,安装路径设置为/data/software/smina/library/)
- openbabel 安装(见之前的博文,安装路径设置为/data/software/smina/library/)
1.1 下载安装
下载地址: https://sourceforge.net/projects/smina/
cd /data/software/smina
git clone https://git.code.sf.net/p/smina/code smina-code
apt install git libboost-all-dev libopenbabel-dev build-essential libeigen3-dev # Ubuntu 14.04可以这么安装,centos yum如果没有这些库的话,则需要单独安装
cd smina-code/build/linux/release
vim Makefile
将 OPENBABEL_INCLUDE=/usr/local/include/openbabel3改成 OPENBABEL_INCLUDE=/data/software/smina/library/openbabel-2.4.1/include/openbabel-2.0
然后
make -j12 # 12表示这个命令使用12线路去执行,不过关键线程数不能超过电脑cpu的线程数
1.2 其他节点安装
smina已安装在C04,server,smina,tosmina程序在/data/software/smina/smina-code/build/linux/release
每个节点上都需要配置smina.conf:
vim /etc/ld.so.conf.d/smina.conf
/data/software/smina/library/boost-1.54/lib
/data/software/smina/library/eigen3/lib
/data/software/smina/library/openbabel-2.4.1/lib
cp /data/software/smina/smina.conf /etc/ld.so.conf.d/ ;ldconfig
然后使其生效 : ldconfig
最后每个节点,检查程序是否正常:
cd /data/software/smina/smina-code/build/linux/release
./server --help
二、 报错
报错1
g++ -ansi -O3 -DNDEBUG -g -I /usr/local/boost-1.54/include -I /usr/local/include/openbabel-2.0 -o smina main.o builtinscoring.o cache.o coords.o custom_terms.o everything.o flexinfo.o grid.o szv_grid.o model.o monte_carlo.o mutate.o my_pid.o naive_non_cache.o non_cache.o obmolopener.o parallel_mc.o parse_pdbqt.o pdb.o quasi_newton.o quaternion.o random.o ssd.o terms.o weighted_terms.o molgetter.o result_info.o PDBQTUtilities.o SminaConverter.o -l openbabel -l boost_iostreams -l boost_timer -lz -l boost_system -l boost_regex -l boost_thread -l boost_serialization -l boost_filesystem -l boost_program_options -l boost_date_time -L /usr/local/boost-1.54/lib
/usr/bin/ld: cannot find -lboost_iostreams
/usr/bin/ld: cannot find -lboost_timer
/usr/bin/ld: cannot find -lboost_system
/usr/bin/ld: cannot find -lboost_regex
/usr/bin/ld: cannot find -lboost_thread
找不到对应的库,因为gcc默认编译的时候,去/usr/lib, /lib ,/usr/lib64中找库。
vim ../../makefile_common
LIBS = -l openbabel -l boost_iostreams${BOOST_LIB_VERSION} -l boost_timer${BOOST_LIB_VERSION} -lz -l boost_system${BOOST_LI B_VERSION} -l boost_regex${BOOST_LIB_VERSION} -l boost_thread${BOOST_LIB_VERSION} -l boost_serialization${BOOST_LIB_VERSION } -l boost_filesystem${BOOST_LIB_VERSION} -l boost_program_options${BOOST_LIB_VERSION} -l boost_date_time${BOOST_LIB_VERSION}
改成:
LIBS = -l openbabel -l boost_iostreams${BOOST_LIB_VERSION} -l boost_timer${BOOST_LIB_VERSION} -lz -l boost_system${BOOST_LI B_VERSION} -l boost_regex${BOOST_LIB_VERSION} -l boost_thread${BOOST_LIB_VERSION} -l boost_serialization${BOOST_LIB_VERSION } -l boost_filesystem${BOOST_LIB_VERSION} -l boost_program_options${BOOST_LIB_VERSION} -l boost_date_time${BOOST_LIB_VERSION} -L /data/software/smina/library/boost-1.54/lib
然后让这些动态库可以被发现:
ldconfig
ldconfig -p |grep boost
能够看到 boost_iostreams
vim /etc/ld.so.conf.d/smina.conf
/data/software/smina/library/boost-1.54/lib
/data/software/smina/library/eigen3/lib
/data/software/smina/library/openbabel-2.4.1/lib
接着找一下这个库;
[sam@c04 release]$ ldconfig -p |grep boost_ios
libboost_iostreams.so.1.53.0 (libc6,x86-64) => /lib64/libboost_iostreams.so.1.53.0
libboost_iostreams-mt.so.1.53.0 (libc6,x86-64) => /lib64/libboost_iostreams-mt.so.1.53.0
用已有的libboost_iostreams.so.1.53.0冒充libboost_iostreams.so.1.54.0:
cp /lib64/libboost_iostreams.so.1.53.0 /data/software/smina/library/boost-1.54/lib/
cd /data/software/smina/library/boost-1.54/lib
ln -s libboost_iostreams.so.1.53.0 libboost_iostreams.so
报错2
[sam@c04 release]$ g++ -ansi -O3 -DNDEBUG -g -I /usr/local/boost-1.54/include -I /usr/local/include/openbabel-2.0 -I ../../../src/lib -o server.o -c ../../../src/server/server.cpp
In file included from ../../../src/server/MinimizationQuery.h:13:0,
from ../../../src/server/QueryManager.h:16,
from ../../../src/server/server.cpp:13:
../../../src/server/Reorienter.h:14:29: fatal error: eigen3/Eigen/Core: No such file or directory
#include <eigen3/Eigen/Core>
^
compilation terminated.
需要安装eigen3。具体见之前博文
参考资料
个人公众号,比较懒,很少更新,可以在上面提问题,如果回复不及时,可发邮件给我: tiehan@sina.cn