Rosetta基础1:centos8安装Rosetta

本文详细记录了在CentOS 8上安装Rosetta 2019.12.60667版本的过程,包括依赖库的安装,OpenMPI的配置,以及如何编译多线程版本并进行基本测试。还解决了Python版本不匹配的问题,确保Rosetta能正常使用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在今天之前了解过Rosetta,也试着装过但没装上,感觉看软件命令跟看天书似的,它认识我,我不认识它、但今天我俩达成了共识,互相认识,在服务器装上了Rosetta,记录一下:
软件包和编译命令都来自于计算化学公社Rosetta包和命令,我下载的是2019.12.60667版,按照教程的命令输出如下:

# Rosetta依赖OPENMPI以及BOOST
# Boost与其他开发环境
[root@localhost user]# yum install boost-devel libstdc++ zlib zlib-devel bzip2
Repository AppStream is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository PowerTools is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
CentOS-8 - AppStream                                                                         1.9 kB/s | 4.3 kB     00:02    
CentOS-8 - Base - mirrors.aliyun.com                                                         3.6 kB/s | 3.9 kB     00:01    
CentOS-8 - Extras - mirrors.aliyun.com                                                       1.4 kB/s | 1.5 kB     00:01    
Extra Packages for Enterprise Linux Modular 8 - x86_64                                       4.6 kB/s | 8.5 kB     00:01    
Extra Packages for Enterprise Linux 8 - x86_64                                               2.9 kB/s | 3.6 kB     00:01    
Extra Packages for Enterprise Linux 8 - x86_64                                               1.4 MB/s |  10 MB     00:06    
packages-microsoft-com-prod                                                                  2.7 kB/s | 3.0 kB     00:01    

=============================================================================================================================
 Package                               Arch                   Version                        Repository                 Size
=============================================================================================================================
Installing:
 boost-devel                           x86_64                 1.66.0-10.el8                  AppStream                  10 M
Upgrading:
 boost-atomic                          x86_64                 1.66.0-10.el8                  AppStream                  14 k
 boost-chrono                          x86_64                 1.66.0-10.el8                  AppStream                  23 k
.....
Installed:
  boost-devel-1.66.0-10.el8.x86_64       boost-1.66.0-10.el8.x86_64               boost-container-1.66.0-10.el8.x86_64     
  boost-context-1.66.0-10.el8.x86_64     boost-coroutine-1.66.0-10.el8.x86_64     boost-fiber-1.66.0-10.el8.x86_64         
  boost-filesystem-1.66.0-10.el8.x86_64  boost-graph-1.66.0-10.el8.x86_64         boost-locale-1.66.0-10.el8.x86_64        
  boost-log-1.66.0-10.el8.x86_64         boost-math-1.66.0-10.el8.x86_64          boost-serialization-1.66.0-10.el8.x86_64 
  boost-signals-1.66.0-10.el8.x86_64     boost-stacktrace-1.66.0-10.el8.x86_64    boost-test-1.66.0-10.el8.x86_64          
  boost-timer-1.66.0-10.el8.x86_64       boost-type_erasure-1.66.0-10.el8.x86_64  boost-wave-1.66.0-10.el8.x86_64          
  libicu-devel-60.3-2.el8_1.x86_64      

Complete!
[root@localhost user]# 

# 安装openmpi
[root@localhost user]# yum install openmpi openmpi-devel -y
Repository AppStream is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository PowerTools is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Last metadata expiration check: 0:03:04 ago on Mon 05 Jul 2021 04:10:27 AM EDT.
Dependencies resolved.
=============================================================================================================================
 Package                             Arch                   Version                          Repository                 Size
=============================================================================================================================
Installing:
 openmpi                             x86_64                 4.0.5-3.el8                      AppStream                 2.8 M
 openmpi-devel                       x86_64                 4.0.5-3.el8                      AppStream                 1.2 M
Upgrading:
 libibumad                           x86_64                 32.0-4.el8                       base                       33 k
 libibverbs                          x86_64                 32.0-4.el8                       base                      321 k
 librdmacm                           x86_64                 32.0-4.el8                       base                       77 k
 rdma-core                           x86_64                 32.0-4.el8                       base                       59 k
Installing dependencies:
 munge                               x86_64                 0.5.13-2.el8                     AppStream                 122 k
 munge-libs                          x86_64                 0.5.13-2.el8                     AppStream                  30 k
 pmix                                x86_64                 2.2.4rc1-1.el8                   AppStream                 740 k
 rpm-mpi-hooks                       noarch                 5-4.el8                          AppStream                  13 k
 torque-libs                         x86_64                 4.2.10-25.el8                    AppStream                 142 k
 ucx                                 x86_64                 1.9.0-1.el8                      AppStream                 525 k
 environment-modules                 x86_64                 4.5.2-1.el8                      base                      421 k
 hwloc-libs                          x86_64                 2.2.0-1.el8                      base                      2.0 M
......
  Verifying        : librdmacm-22-2.el8.x86_64                                                                         20/22 
  Verifying        : rdma-core-32.0-4.el8.x86_64                                                                       21/22 
  Verifying        : rdma-core-22-2.el8.x86_64                                                                         22/22 

Upgraded:
  libibumad-32.0-4.el8.x86_64   libibverbs-32.0-4.el8.x86_64   librdmacm-32.0-4.el8.x86_64   rdma-core-32.0-4.el8.x86_64  

Installed:
  openmpi-4.0.5-3.el8.x86_64             openmpi-devel-4.0.5-3.el8.x86_64       munge-0.5.13-2.el8.x86_64                   
  munge-libs-0.5.13-2.el8.x86_64         pmix-2.2.4rc1-1.el8.x86_64             rpm-mpi-hooks-5-4.el8.noarch                
  torque-libs-4.2.10-25.el8.x86_64       ucx-1.9.0-1.el8.x86_64                 environment-modules-4.5.2-1.el8.x86_64      
  hwloc-libs-2.2.0-1.el8.x86_64          libfabric-1.11.2-1.el8.x86_64          libpsm2-11.2.185-1.el8.x86_64               
  opensm-libs-3.3.23-4.el8.x86_64        tcl-1:8.6.8-2.el8.x86_64              

Complete!
[root@localhost user]# vi ~/.bashrc
#Rosetta
export ROSETTA=/mnt/sdd/software/rosetta_src_201x.xx.xxxxxx_bundle
export ROSETTA3_DB=$ROSETTA/main/database
export ROSETTA_BIN=$ROSETTA/main/source/bin
export PATH=$PATH:$ROSETTA_BIN
export LD_LIBRARY_PATH=$ROSETTA/main/source/bin:$LD_LIBRARY_PATH

# 编译多线程rosetta, 此处调用40个核为例
[root@localhost source]# ./scons.py -j 40 mode=release bin extras=mpi
....
....
mpiCC -o build/src/release/linux/4.18/64/x86/gcc/8/mpi/torsional_potential_corrections.mpi.linuxgccrelease -Wl,-rpath=/home/user/software/rosetta_src_2019.12.60667_bundle/main/source/build/src/release/linux/4.18/64/x86/gcc/8/mpi -Wl,-rpath=/home/user/software/rosetta_src_2019.12.60667_bundle/main/source/build/external/release/linux/4.18/64/x86/gcc/8/mpi -Wl,-rpath=\$ORIGIN -Wl,-rpath=\$ORIGIN/../lib build/src/release/linux/4.18/64/x86/gcc/8/mpi/apps/public/weight_optimization/torsional_potential_corrections.o -Lexternal/lib -Lbuild/src/release/linux/4.18/64/x86/gcc/8/mpi -Lsrc -Lbuild/external/release/linux/4.18/64/x86/gcc/8/mpi -Lexternal -L/home/user/software/amber18/lib -L/usr/lib -L/usr/local/lib -ldevel -lprotocols.8 -lprotocols.7 -lprotocols_e.6 -lprotocols_d.6 -lprotocols_c.6 -lprotocols_b.6 -lprotocols_a.6 -lprotocols_h.5 -lprotocols_g.5 -lprotocols_f.5 -lprotocols_e.5 -lprotocols_d.5 -lprotocols_c.5 -lprotocols_b.5 -lprotocols_a.5 -lprotocols.4 -lprotocols.3 -lprotocols_b.2 -lprotocols_a.2 -lprotocols.1 -lcore.5 -lcore.4 -lcore.3 -lcore.2 -lcore.1 -lbasic -lnumeric -lutility -lObjexxFCL -lz -lcppdb -lsqlite3 -lcifparse -lxml2 -lzmq
Install file: "build/src/release/linux/4.18/64/x86/gcc/8/mpi/swa_rna_util.mpi.linuxgccrelease" as "bin/swa_rna_util.mpi.linuxgccrelease"
Install file: "build/src/release/linux/4.18/64/x86/gcc/8/mpi/torsional_potential_corrections.mpi.linuxgccrelease" as "bin/torsional_potential_corrections.mpi.linuxgccrelease"
apps.public.generate_database_cache: (0) Generated Dunbrack binary cache for -beta: /home/user/software/rosetta_src_2019.12.60667_bundle/main/database/rotamer/beta_nov2016/Dunbrack10.lib.bin
apps.public.generate_database_cache: (0) Generated Dunbrack binary cache for -restore_talaris_behavior: /home/user/software/rosetta_src_2019.12.60667_bundle/main/database/rotamer/ExtendedOpt1-5/Dunbrack10.lib.bin
apps.public.generate_database_cache: (0) Generated Dunbrack binary cache for -restore_pre_talaris_2013_behavior: /home/user/software/rosetta_src_2019.12.60667_bundle/main/database/rotamer/bbdep02.May.sortlib.Dunbrack02.lib.bin
apps.public.generate_database_cache: (0) Generated Dunbrack binary cache for -restore_pre_talaris_2013_behavior -correct: /home/user/software/rosetta_src_2019.12.60667_bundle/main/database/rotamer/bbdep02.May.sortlib-correct.12.2010.Dunbrack02.lib.bin
scons: done building targets.

# 测试运行
[root@localhost rosetta_src_2019.12.60667_bundle]# main/source/bin/antibody.mpi.linuxgccrelease
.....
.....
 basic.execute: (0) Unzipping pdb5sv4_chothia.pdb.bz2 cd /home/user/software/rosetta_src_2019.12.60667_bundle/tools/antibody/antibody_database/ && bunzip2 -k pdb5sv4_chothia.pdb.bz2
basic.execute: (0) Unzipping pdb5td8_chothia.pdb.bz2 cd /home/user/software/rosetta_src_2019.12.60667_bundle/tools/antibody/antibody_database/ && bunzip2 -k pdb5td8_chothia.pdb.bz2
basic.execute: (0) Unzipping pdb5tjw_chothia.pdb.bz2 cd /home/user/software/rosetta_src_2019.12.60667_bundle/tools/antibody/antibody_database/ && bunzip2 -k pdb5tjw_chothia.pdb.bz2
basic.execute: (0) Unzipping pdb5toj_chothia.pdb.bz2 cd /home/user/software/rosetta_src_2019.12.60667_bundle/tools/antibody/antibody_database/ && bunzip2 -k pdb5toj_chothia.pdb.bz2
basic.execute: (0) Unzipping pdb5tok_chothia.pdb.bz2 cd /home/user/software/rosetta_src_2019.12.60667_bundle/tools/antibody/antibody_database/ && bunzip2 -k pdb5tok_chothia.pdb.bz2
basic.execute: (0) Unzipping pdb5tp3_chothia.pdb.bz2 cd /home/user/software/rosetta_src_2019.12.60667_bundle/tools/antibody/antibody_database/ && bunzip2 -k pdb5tp3_chothia.pdb.bz2
basic.execute: (0) Unzipping pdb5uk4_chothia.pdb.bz2 cd /home/user/software/rosetta_src_2019.12.60667_bundle/tools/antibody/antibody_database/ && bunzip2 -k pdb5uk4_chothia.pdb.bz2
basic.execute: (0) Unzipping pdb5ukb_chothia.pdb.bz2 cd /home/user/software/rosetta_src_2019.12.60667_bundle/tools/antibody/antibody_database/ && bunzip2 -k pdb5ukb_chothia.pdb.bz2
basic.execute: (0) Unzipping pdb6fab_chothia.pdb.bz2 cd /home/user/software/rosetta_src_2019.12.60667_bundle/tools/antibody/antibody_database/ && bunzip2 -k pdb6fab_chothia.pdb.bz2
basic.execute: (0) Unzipping pdb8fab_chothia.pdb.bz2 cd /home/user/software/rosetta_src_2019.12.60667_bundle/tools/antibody/antibody_database/ && bunzip2 -k pdb8fab_chothia.pdb.bz2
antibody: (0) Done unzipping.

ERROR: Error: no input sequences were specified!
ERROR:: Exit from: src/apps/public/antibody/antibody.cc line: 203
BACKTRACE:
/home/user/software/rosetta_src_2019.12.60667_bundle/main/source/build/src/release/linux/4.18/64/x86/gcc/8/mpi/libutility.so(utility::exit(char const*, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)+0x2cd) [0x7f8cb32185dd]
main/source/bin/antibody.mpi.linuxgccrelease() [0x419914]
main/source/bin/antibody.mpi.linuxgccrelease() [0x4155b1]
/lib64/libc.so.6(__libc_start_main+0xf3) [0x7f8cb0977813]
main/source/bin/antibody.mpi.linuxgccrelease() [0x4157ce]
caught exception 

File: src/apps/public/antibody/antibody.cc:203
[ ERROR ] UtilityExitException
ERROR: Error: no input sequences were specified!
#不知道是否正确装上rosetta

其实这时已经安装好Rosetta了,按照博文Rosetta基础2中的对PDB文件进行预处理检测是否安装好

(base) [user@localhost Rosetta]$ python /home/user/software/rosetta_src_2019.12.60667_bundle/tools/protein_tools/scripts/clean_pdb.py 1ia1.pdb AB
File "/home/user/software/rosetta_src_2019.12.60667_bundle/tools/protein_tools/scripts/clean_pdb.py", line 56
    print wget_cmd
                 ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(wget_cmd)?

(base) [user@localhost Rosetta]$ python -V
Python 3.7.6

查看之后是python版本不对应,Rosetta使用的是python2,Centos8自带3.7.6,所以安装python2链接,运行就没有问题

(base) [user@localhost Rosetta]$ /usr/local/python-2.7.16/bin/python2 /home/user/software/rosetta_src_2019.12.60667_bundle/tools/protein_tools/scripts/clean_pdb.py 1ia1.pdb AB
Found existing PDB file at 1ia1.pdb
1ia1 AB   384 ALT --- MOD --- OK
>1ia1_A
MLKPNVAIIVAALKPALGIGYKGKMPWRLRKEIRYFKDVTTRTTKPNTRNAVIMGRKTWESIPQKFRPLPDRLNIILSRSYENEIIDDNIIHASSIESSLNLVSDVERVFIIGGAEIYNELINNSLVSHLLITEIEHPSPESIEMDTFLKFPLESWTKQPKSELQKFVGDTVLEDDIKEGDFTYNYTLWTRK
>1ia1_B
MLKPNVAIIVAALKPALGIGYKGKMPWRLRKEIRYFKDVTTRTTKPNTRNAVIMGRKTWESIPQKFRPLPDRLNIILSRSYENEIIDDNIIHASSIESSLNLVSDVERVFIIGGAEIYNELINNSLVSHLLITEIEHPSPESIEMDTFLKFPLESWTKQPKSELQKFVGDTVLEDDIKEGDFTYNYTLWTRK
(base) [user@localhost Rosetta]$ ll
total 600
-rw-rw-r-- 1 user user 252076 Jul  5 06:00 1ia1_AB.pdb
-rw-rw-r-- 1 user user    201 Jul  5 06:00 1ia1_A.fasta
-rw-rw-r-- 1 user user    201 Jul  5 06:00 1ia1_B.fasta
-rw-rw-r-- 1 user user 350811 Jul  5 05:35 1ia1.pdb
(base) [user@localhost Rosetta]$ 

Rosetta刚刚安装上,还需要学很多才能正确使用Rosetta,加油~

参考博文:
http://bbs.keinsci.com/thread-12685-1-1.html
https://blog.youkuaiyun.com/weixin_31188927/article/details/112117358
https://blog.youkuaiyun.com/sinat_41800381/article/details/95035560

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值