安装必要包
apt-get update
apt install bc csh flex xorg-dev zlib1g-dev build-essential libbz2-dev patch cmake bison gfortran python
到Amber官网下载代码
https://ambermd.org/index.php
tar xvfj AmberTools22.tar.bz2 # Ambertools are open source
tar xvfj Amber22.tar.bz2 # only when you have amber
编译程序、库、文档等
cd amber22_src
./update_amber --upgrade
mkdir build-001
cd build-001
#应用cmake命令生成相应的makefile
cmake ../ \
-DCMAKE_INSTALL_PREFIX=~/Software/Amber22_cuda \
-DCOMPILER=GNU \
-DMPI=FALSE \
-DCUDA=TRUE \
-DINSTALL_TESTS=TRUE \
-DDOWNLOAD_MINICONDA=TRUE \
-DMINICONDA_USE_PY3=TRUE
配置环境变量
vim ~/.bashrc #打开 bashrc文件
test -f /root/Software/Amber22_cuda/amber.sh && source /root/Software/Amber22_cuda/amber.sh
source ~/.bashrc #source 后立即生效
安装已经编译好的程序
#使用makefile安装软件
make install -j 8 # 8 cores will be used, change accordingly
到对应文件夹下进行测试
source ~/Software/Amber22_cuda/amber.sh
cd ~/Software/Amber22_cuda
make test.cuda.serial
make test.serial