一文通自然是夸大的,但是这篇文章我觉得价值不小(特别是对于安装个软件就要崩溃的小白来说,官网和现在传播的方法实在太麻烦,即使对我这种老手不小心都要翻车)
GROMACS软件的安装
1.失败但是常见的安装方式
随便哪里一搜都是这种安装方式,毕竟官网也是这么写着的,但是这样是大坑,也许windows上自带的那个Linux或者是虚拟机安装的Linux由于自己权限高,所以应该能折腾成功?反正我用服务器折腾失败了,鉴于过去我为了安装软件而产生的某些心塞经历,我还是放弃了这条道路,但是还是记录一下
下载哪个版本视情况而定,目前官网是2022版本,但是还有之前的一些版本
Installation guide — GROMACS 2022.2 documentation
最好是有一定权限的机器才搞这个,最麻烦的就是安装这一步了
tar xfz gromacs-2022.2.tar.gz
cd gromacs-2022.2
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
2022需要cmake3.23 以及以上,所以需要升级cmake
升级 CMake版本 从 2.8.11 到 3.6.2 CentOS Linux_anton8801的博客-CSDN博客_yum升级cmake
折腾了半天才发现,上面的这些还是会报错,所以手动安装是失败了(所以如果系统配置没弄好的机器,还是不要折腾这些了)
2.Conda大法好
所以只能祭出conda大法了?什么,你不知道conda是啥?那就跟着这个自己弄一下吧conda的安装与使用(2021-04-27更新) - 简书 (jianshu.com)
不过看用conda上gromacs的下载,用这个安装的人也不少,只是中文貌似没人写过conda安装gromacs教程?而且不仅是中文文字,b站的教程也是在用原始安装方法。谷歌看了一眼好像真没有人这样做过,看来我还是把这个秘密揭开的中文第一个人?(貌似这玩意的培训要收钱来着,光是安装这一步估计就难掉不知道多少人了吧,所以应该值一百个赞?(划掉))
gromacs是比较老的玩意了,虽然不断在升级,但是conda上的gromacs属于2.7版本
conda create -n gromacs ## 不需要指定python版本
conda activate gromacs ##不需要我说这是干啥的吧
然后安装吧,conda会自动为你配置好需要的,只是最终安装好的gromacs是2018版本
conda install -c bioconda gromacs
### 不知道安装了多久
最终安装的gromacs是gromacs-2018.6版本
fftw-3.3.10 |nompi_h77c792f_102 6.4 MB conda-forge
gromacs-2018.6 | h3ddc34e_2 16.7 MB bioconda
icu-68.2 | h9c3ff4c_0 13.1 MB conda-forge
libgfortran-ng-12.1.0 | h69a702a_16 23 KB conda-forge
libgfortran5-12.1.0 | hdcd56e2_16 1.8 MB conda-forge
libhwloc-1.11.13 | h3c4fd83_0 2.1 MB conda-forge
libxml2-2.9.10 | h72842e0_4 774 KB conda-forge
ocl-icd-2.3.1 | h7f98852_0 119 KB conda-forge
安装gromacs指定版本为2021年的
应该不能安装2022版本的,conda上已经一年没更新了,不过这个版本应该够用
conda install -y gromacs==2021.3
##conda install -y https://anaconda.org/bioconda/gromacs/2021.3/download/linux-64/gromacs-2021.3-nompi_hcc3dda7_0.tar.bz2
##conda install -y https://anaconda.org/conda-forge/fftw/3.3.10/download/linux-64/fftw-3.3.10-nompi_h77c792f_102.tar.bz2
##conda install -y https://anaconda.org/conda-forge/ocl-icd/2.3.1/download/linux-64/ocl-icd-2.3.1-h7f98852_0.tar.bz2
gromacs-2022.1 |nompi_hca75aac_101 28.7 MB conda-forge
icu-70.1 | h27087fc_0 13.5 MB conda-forge
libhwloc-2.7.1 | h32351e8_0 2.9 MB conda-forge
libxml2-2.9.14 | h22db469_3 781 KB conda-forge
libzlib-1.2.12 | h166bdaf_1 63 KB conda-forge
zlib-1.2.12 | h166bdaf_1 91 KB conda-forge
gmx -h
Command line:
gmx -h
SYNOPSIS
gmx [-[no]h] [-[no]quiet] [-[no]version] [-[no]copyright] [-nice <int>]
[-[no]backup]
OPTIONS
Other options:
-[no]h (no)
Print help and quit
-[no]quiet (no)
Do not print common startup info or quotes
-[no]version (no)
Print extended version information and quit
-[no]copyright (no)
Print copyright information on startup
-nice <int> (19)
Set the nicelevel (default depends on command)
-[no]backup (yes)
Write backups if output files exist
Additional help is available on the following topics:
commands List of available commands
selections Selection syntax and usage
To access the help, use 'gmx help <topic>'.
For help on a command, use 'gmx help <command>'.
GROMACS reminds you: "Somewhere, something incredible is waiting to be known." (Carl Sagan)
总结一下,如果上面都想不看的话,有conda的就三行代码搞定安装
conda create -n gromacs ## 不需要指定python版本
conda activate gromacs
conda install -y gromacs==2021.3
GROMACS的使用
具体使用方向各取所需就行了,搞定完最关键的安装后面其实就是copy代码的事情
These tutorials are designed as introductory material into using the GROMACS simulation package. GROMACS is free, open-source software, and has consistently been one of the fastest (if not the fastest) molecular dynamics codes available.
这些教程被设计成使用 GROMACS 模拟包的入门材料。GROMACS 是免费的,开源软件的,并且一直是最快(如果不是最快的话)的分子动力学软件之一。
There are currently seven tutorials available:
目前有七个教程:
Lysozyme in Water: The intent of this tutorial is to give new users a basic introduction into the tools used to prepare, run, and perform simple analysis on a "typical" system with GROMACS.
水中溶菌酶: 本教程的目的是向新用户介绍用于准备、运行和使用 GROMACS 对“经典的”系统进行简单分析的工具。KALP15 in DPPC: This tutorial is more advanced, and is designed for more experienced users who want to simulate membrane proteins and understand force field structure and modification.
DPPC中的 KALP15: 这个教程是更高级的,是专为更有经验的想要模拟膜蛋白质和理解甚至修改力场结构的用户而准备。Umbrella Sampling: Also somewhat advanced, this tutorial is intended for users who wish to learn to use umbrella sampling to calculate the potential of mean force (PMF) along a single, linear degree of freedom.
雨伞取样: 也有些高级,这个教程是为用户那些希望学习使用雨伞取样,以计算单一的,线性的自由度的PMF而准备的。Biphasic Systems: The construction of a biphasic cyclohexane-water system.
双相系统: 构建双相环己烷-水系统。Protein-Ligand Complex: The fifth tutorial instructs the user on how to deal with a protein-ligand system, with a focus on proper ligand parametrization and topology handling.
蛋白质-配体复合体: 第五个教程指导用户如何处理蛋白质-配体系统,着重于适当的配体参数化和拓扑处理。Free Energy of Solvation: This tutorial describes the procedure for carrying out a simple free energy calculation, the elimination of van der Waals interactions between a simple molecule (methane) and water. More complicated systems are discussed.
溶剂化的自由能: 本教程描述了进行一个简单的自由能计算的过程,即消除简单分子(甲烷)和水之间的范德华力。接着讨论了更复杂的系统。Virtual Sites: This tutorial guides the user through manual construction of virtual sites for a very simple linear, triatomic molecule (CO2).
虚拟站点: 本教程指导用户手动构建一个非常简单的线性三原子分子(CO2)的虚拟站点。
这些教程都是基于gromacs2018及其以上
这篇教程从头到尾,为何选择分子动力学模拟,如何选择gromacs的东西都手把手写出来了,部分内容是上面的那个英文教程的中文翻译,但是也加了不少案例
GROMACS中文教程|Jerkwin
如果想从分子动力学模拟走到更远的道路,建议这篇
https://www.zhihu.com/question/23616771/answer/2278055962