首先下载软件 :http://www.gromacs.org/Downloads
选择你要安装的版本并下载到电脑,我下载到了Downloads文件夹了。
要安装fftw和cmake
先安装了cmake,我直接用centos7.2 yum命令安装的,不需要累赘说明配置。
然后我再安装fftw:下载最新的fftw后解压到文件夹》进入文件夹》运行在终端切换到该文件夹执行以下命令:
./configure prefix=/home/brisk/fftw --enable-float --enable-shared
make
sudo make install
命令说明:prefix后面是设置安装位置,也可以保持默认,enalbe-floa是精度设置。
然后将下载的gromacs解压,进入文件夹,在这里打开终端,新建文件夹build,然后执行以下命令:
cmake .. cmake .. -DGMX_SIMD=SSE4.1 (-DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON)make
sudo make install
source /usr/local/gromacs/bin/GMXRC
说明:我的是amd的cup,不设置-DGMX_SIMD=SSE4.1则执行gromacs命令会有Illegal instruction (core dumped)报错,无法
不过后来虽然成功了,到后面至今将内存消耗殆尽,最终还是失败了,将-DGMX-SIMD设为AVX_128_FMA重新编译!
继续,跟着官方的说法,所以需要配置。括号里面三下载FFTW和CMAKE有了就不需要了。
安装完成后配在一下环境变量即可,如果没有配置环境变量那么在执行gmx相关命令前需要执行source /usr/local/gromacs/bin/GMXRC
命令。建议配置全局变量。make check是检测的,可以不需要,也可以用。
下面是官方的教程:
And then read the install documents. like the next:
Quick and dirty installation Get the latest version of your C and C++ compilers.
Check that you have CMake version 2.8.8 or later.
Get and unpack the latest version of the GROMACS tarball.
Make a separate build directory and change to it.
Runcmakewith the path to the source as an argument
Runmake,make check, andmake install
Or, as a sequence of commands to execute:
tar xfz gromacs-5.0.7.tar.gz
cd gromacs-5.0.7
mkdir build
cd build
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON
make
make check
sudo make install
source /usr/local/gromacs/bin/GMXRC
I was install the version of gromacs5.0.6 to my ZorinOS .
Input the install command, and the result like this:
.......
-- Installing: Creating symbolic link /usr/local/gromacs/bin/g_wheel
以下是测试安装后:
brisklan@brisklan-Lenovo:~/下载/gromacs-5.0.6/build$ source /usr/local/gromacs/bin/GMXRC
brisklan@brisklan-Lenovo:~/下载/gromacs-5.0.6/build$
OK,every step was finished!
I input 'pdb' for check:
brisklan@brisklan-Lenovo:~/下载/gromacs-5.0.6/build$ pdb
pdb pdb2.7 pdb2gmx pdb3 pdb3.5
brisklan@brisklan-Lenovo:~/下载/gromacs-5.0.6/build$ pdb
It shows that I was success!
starting mdrun 'LYSOZYME in water'
500000 steps, 1000.0 ps.
……