阿里云
发表主题 回复主题
  • 1110阅读
  • 1回复

[干货分享]实践GROMACS

级别: 论坛粉丝
发帖
1227
云币
2325
q9_AL8_  
GROMACS 简介 ( ./MFf  
_:NQF7X#ug  
Nz3+yxv1  
GROMACS(GROningen MAchine for Chemical Simulations)是一款通用软件包,用于对具有数百万颗粒子的系统进行基于牛顿运动方程的分子动力学模拟。GROMACS主要用于生物化学分子,如蛋白质,脂质等具有多种复杂键合相互作用的核酸。由于GROMACS在计算典型的主流模拟应用如非键合相互作用非常高效,许多研究人员将其用于非生物系统如聚合物的研究。 z.SKawm6T  
GROMACS支持从现代分子动力学实现中预期的所有常见算法,其代码由世界各地的开发人员维护。详情可参见官网www.gromacs.org "(W;rl  
dHiir&Rd9`  
准备工作 At<MY`ka  
@,= pG  
运行以下示例需要在创建集群时选择安装GROMACS相关软件包。
0U/[hG"DKN  
[backcolor=transparent]注:若需运行gromacs-gpu算例,在创建集群时[backcolor=transparent]必须使用GPU系列机型作为计算节点,否则集群创建或gromacs-gpu无法按照以下指引运行。 _kRc"MaB  
同时还需选择所依赖的相关MPI库
3O4lG e#u  
mzM95yQ^Z  
运行算例 3f^jy(  
[backcolor=transparent]注意:运行算例前务必做好提交作业中准备工作部分的操作 Z2g<"M  
{*n<A{$[ m  
GROMACS 算例1:水中的溶菌酶(Lysozyme in Water) gfN=0Xj4  
_IOUhMo  
Opf)TAl{  
本样例为用户设置一个蛋白质(lysozyme)加上离子在水盒子里的模拟过程。 >G"fMOOkW  
官方教程链接:http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin/gmx-tutorials/lysozyme/index.html 5tkKd4VfL  
非官方中文翻译链接:http://jerkwin.github.io/GMX/GMXtut-1/ 'l!\2Wv2  
b"#S92R+  
下载地址 Bca$%3M  
http://public-ehs.oss-cn-hangzhou.aliyuncs.com/packages/Lysozyme.tar.gz hTO 2+F*  
j3%Wrt  
运行步骤 #E=8kbD7  
a. 串行版本$ ./serial_run.sh j>\rs|^O  
b. 并行版本$ ./parallel_run.sh uSI@Cjp  
ZRc^}5}WA  
GROMACS算例2:水分子运动 8;"%x|iBoL  
本算例为模拟大量水分子在给定空间、温度内的运动过程,以下运行实例为GPU加速版。 t>%b[(a  
` W );+s  
运行步骤 Z/:yYSq  
  • 设置环境变量,运行module avail 查看是否安装GROMACS 软件。
  1. [backcolor=transparent]$ export MODULEPATH[backcolor=transparent]=/[backcolor=transparent]opt[backcolor=transparent]/[backcolor=transparent]ehpcmodulefiles[backcolor=transparent]/[backcolor=transparent]   [backcolor=transparent]# module命令依赖的环境变量
  2. [backcolor=transparent]$ module avail
  3. [backcolor=transparent]------------------------------[backcolor=transparent] [backcolor=transparent]/[backcolor=transparent]opt[backcolor=transparent]/[backcolor=transparent]ehpcmodulefiles [backcolor=transparent]-------------------------------------
  4. [backcolor=transparent]gromacs[backcolor=transparent]-[backcolor=transparent]gpu[backcolor=transparent]/[backcolor=transparent]2016.3[backcolor=transparent]      openmpi[backcolor=transparent]/[backcolor=transparent]1.10[backcolor=transparent].[backcolor=transparent]7
  • 运行 module load 加载 GROMACS,OpenMPI。
  1. [backcolor=transparent]$ module load openmpi
  2. [backcolor=transparent]$ module load gromacs[backcolor=transparent]-[backcolor=transparent]gpu
  3. [backcolor=transparent]$ which gmx_mpi
  4. [backcolor=transparent]/[backcolor=transparent]opt[backcolor=transparent]/[backcolor=transparent]gromacs[backcolor=transparent]-[backcolor=transparent]gpu[backcolor=transparent]/[backcolor=transparent]2016.3[backcolor=transparent]/[backcolor=transparent]bin[backcolor=transparent]/[backcolor=transparent]gmx_mpi
  • 下载water算例
)S4ga  
假设当前目录在当前用户的$HOME下面
  1. [backcolor=transparent]$ pwd
  2. [backcolor=transparent]/[backcolor=transparent]home[backcolor=transparent]/<[backcolor=transparent]current_user_name[backcolor=transparent]>
  3. [backcolor=transparent]$ wget http[backcolor=transparent]://[backcolor=transparent]public[backcolor=transparent]-[backcolor=transparent]ehs[backcolor=transparent].[backcolor=transparent]oss[backcolor=transparent]-[backcolor=transparent]cn[backcolor=transparent]-[backcolor=transparent]hangzhou[backcolor=transparent].[backcolor=transparent]aliyuncs[backcolor=transparent].[backcolor=transparent]com[backcolor=transparent]/[backcolor=transparent]packages[backcolor=transparent]/[backcolor=transparent]water_GMX50_bare[backcolor=transparent].[backcolor=transparent]tar[backcolor=transparent].[backcolor=transparent]gz
  4. [backcolor=transparent]$ tar xzvf water_GMX50_bare[backcolor=transparent].[backcolor=transparent]tar[backcolor=transparent].[backcolor=transparent]gz
  • GwDOxH'  
    提交PBS作业运行water算例。高配置计算节点(>32 CPU核,双GPU卡)的PBS作业脚本
  1. [backcolor=transparent]$ cat [backcolor=transparent]>[backcolor=transparent] gromacs_single_node[backcolor=transparent].[backcolor=transparent]pbs
  2. [backcolor=transparent]#!/bin/sh
  3. [backcolor=transparent]#PBS -l ncpus=32,mem=4gb
  4. [backcolor=transparent]#PBS -l walltime=00:20:00
  5. [backcolor=transparent]#PBS -o gromacs_gpu_pbs.log
  6. [backcolor=transparent]#PBS -j oe
  7. [backcolor=transparent]cd [backcolor=transparent]/[backcolor=transparent]home[backcolor=transparent]/[backcolor=transparent]water[backcolor=transparent]-[backcolor=transparent]cut1[backcolor=transparent].[backcolor=transparent]0[backcolor=transparent]_GMX50_bare[backcolor=transparent]/[backcolor=transparent]1536
  8. [backcolor=transparent]/[backcolor=transparent]opt[backcolor=transparent]/[backcolor=transparent]gromacs[backcolor=transparent]-[backcolor=transparent]gpu[backcolor=transparent]/[backcolor=transparent]2016.3[backcolor=transparent]/[backcolor=transparent]bin[backcolor=transparent]/[backcolor=transparent]gmx_mpi grompp [backcolor=transparent]-[backcolor=transparent]f pme[backcolor=transparent].[backcolor=transparent]mdp [backcolor=transparent]-[backcolor=transparent]c conf[backcolor=transparent].[backcolor=transparent]gro [backcolor=transparent]-[backcolor=transparent]p topol[backcolor=transparent].[backcolor=transparent]top [backcolor=transparent]-[backcolor=transparent]o topol_pme[backcolor=transparent].[backcolor=transparent]tpr
  9. [backcolor=transparent]/[backcolor=transparent]opt[backcolor=transparent]/[backcolor=transparent]openmpi[backcolor=transparent]/[backcolor=transparent]1.10[backcolor=transparent].[backcolor=transparent]7[backcolor=transparent]/[backcolor=transparent]bin[backcolor=transparent]/[backcolor=transparent]mpirun [backcolor=transparent]-[backcolor=transparent]np [backcolor=transparent]4[backcolor=transparent] [backcolor=transparent]/[backcolor=transparent]opt[backcolor=transparent]/[backcolor=transparent]gromacs[backcolor=transparent]-[backcolor=transparent]gpu[backcolor=transparent]/[backcolor=transparent]2016.3[backcolor=transparent]/[backcolor=transparent]bin[backcolor=transparent]/[backcolor=transparent]gmx_mpi mdrun [backcolor=transparent]-[backcolor=transparent]ntomp [backcolor=transparent]8[backcolor=transparent] [backcolor=transparent]-[backcolor=transparent]resethway [backcolor=transparent]-[backcolor=transparent]noconfout [backcolor=transparent]-[backcolor=transparent]nsteps [backcolor=transparent]8000[backcolor=transparent] [backcolor=transparent]-[backcolor=transparent]v [backcolor=transparent]-[backcolor=transparent]pin on [backcolor=transparent]-[backcolor=transparent]nb gpu [backcolor=transparent]-[backcolor=transparent]gpu_id [backcolor=transparent]0011[backcolor=transparent] [backcolor=transparent]-[backcolor=transparent]s topol_pme[backcolor=transparent].[backcolor=transparent]tpr
  • 较低配置节点的PBS作业脚本
  1. [backcolor=transparent]$ cat [backcolor=transparent]>[backcolor=transparent] gromacs_single_node[backcolor=transparent].[backcolor=transparent]pbs
  2. [backcolor=transparent]#!/bin/sh
  3. [backcolor=transparent]#PBS -l ncpus=4,mem=4gb
  4. [backcolor=transparent]#PBS -l walltime=00:20:00
  5. [backcolor=transparent]#PBS -o gromacs_gpu_pbs.log
  6. [backcolor=transparent]#PBS -j oe
  7. [backcolor=transparent]cd [backcolor=transparent]/[backcolor=transparent]home[backcolor=transparent]/[backcolor=transparent]water[backcolor=transparent]-[backcolor=transparent]cut1[backcolor=transparent].[backcolor=transparent]0[backcolor=transparent]_GMX50_bare[backcolor=transparent]/[backcolor=transparent]1536
  8. [backcolor=transparent]/[backcolor=transparent]opt[backcolor=transparent]/[backcolor=transparent]gromacs[backcolor=transparent]-[backcolor=transparent]gpu[backcolor=transparent]/[backcolor=transparent]2016.3[backcolor=transparent]/[backcolor=transparent]bin[backcolor=transparent]/[backcolor=transparent]gmx_mpi grompp [backcolor=transparent]-[backcolor=transparent]f pme[backcolor=transparent].[backcolor=transparent]mdp [backcolor=transparent]-[backcolor=transparent]c conf[backcolor=transparent].[backcolor=transparent]gro [backcolor=transparent]-[backcolor=transparent]p topol[backcolor=transparent].[backcolor=transparent]top [backcolor=transparent]-[backcolor=transparent]o topol_pme[backcolor=transparent].[backcolor=transparent]tpr
  9. [backcolor=transparent]/[backcolor=transparent]opt[backcolor=transparent]/[backcolor=transparent]openmpi[backcolor=transparent]/[backcolor=transparent]1.10[backcolor=transparent].[backcolor=transparent]7[backcolor=transparent]/[backcolor=transparent]bin[backcolor=transparent]/[backcolor=transparent]mpirun [backcolor=transparent]-[backcolor=transparent]np [backcolor=transparent]1[backcolor=transparent] [backcolor=transparent]/[backcolor=transparent]opt[backcolor=transparent]/[backcolor=transparent]gromacs[backcolor=transparent]-[backcolor=transparent]gpu[backcolor=transparent]/[backcolor=transparent]2016.3[backcolor=transparent]/[backcolor=transparent]bin[backcolor=transparent]/[backcolor=transparent]gmx_mpi mdrun [backcolor=transparent]-[backcolor=transparent]ntomp [backcolor=transparent]4[backcolor=transparent] [backcolor=transparent]-[backcolor=transparent]resethway [backcolor=transparent]-[backcolor=transparent]noconfout [backcolor=transparent]-[backcolor=transparent]nsteps [backcolor=transparent]8000[backcolor=transparent] [backcolor=transparent]-[backcolor=transparent]v [backcolor=transparent]-[backcolor=transparent]pin on [backcolor=transparent]-[backcolor=transparent]nb gpu [backcolor=transparent]-[backcolor=transparent]s topol_pme[backcolor=transparent].[backcolor=transparent]tpr
  • 通过PBS作业脚本提交作业
  1. [backcolor=transparent]$ qsub gromacs_single_node[backcolor=transparent].[backcolor=transparent]pbs
  2. [backcolor=transparent]1.iZ2zedptfv8e8dc9c2zt0tZ
  3. [backcolor=transparent]$ qstat
  4. [backcolor=transparent]                                                            [backcolor=transparent]Req[backcolor=transparent]'d  Req'[backcolor=transparent]d   [backcolor=transparent]Elap
  5. [backcolor=transparent]Job[backcolor=transparent] ID          [backcolor=transparent]Username[backcolor=transparent] [backcolor=transparent]Queue[backcolor=transparent]    [backcolor=transparent]Jobname[backcolor=transparent]    [backcolor=transparent]SessID[backcolor=transparent] NDS TSK [backcolor=transparent]Memory[backcolor=transparent] [backcolor=transparent]Time[backcolor=transparent]  S [backcolor=transparent]Time
  6. [backcolor=transparent]---------------[backcolor=transparent] [backcolor=transparent]--------[backcolor=transparent] [backcolor=transparent]--------[backcolor=transparent] [backcolor=transparent]----------[backcolor=transparent] [backcolor=transparent]------[backcolor=transparent] [backcolor=transparent]---[backcolor=transparent] [backcolor=transparent]---[backcolor=transparent] [backcolor=transparent]------[backcolor=transparent] [backcolor=transparent]-----[backcolor=transparent] [backcolor=transparent]-[backcolor=transparent] [backcolor=transparent]-----
  7. [backcolor=transparent]1.iZ2zedptfv8e8[backcolor=transparent] mingying workq    gromacs_si  [backcolor=transparent]20775[backcolor=transparent]   [backcolor=transparent]1[backcolor=transparent]   [backcolor=transparent]4[backcolor=transparent]    [backcolor=transparent]4gb[backcolor=transparent] [backcolor=transparent]00[backcolor=transparent]:[backcolor=transparent]20[backcolor=transparent] R [backcolor=transparent]00[backcolor=transparent]:[backcolor=transparent]03
ziO(`"v  
[ 此帖被反向一觉在2017-10-26 13:54重新编辑 ]
级别: 新人
发帖
1
云币
1
只看该作者 沙发  发表于: 01-01
Re实践GROMACS
这个实例购买位置在哪儿?
发表主题 回复主题
« 返回列表上一主题下一主题

限100 字节
批量上传需要先选择文件,再选择上传
 
验证问题: 78 - 53 = ?
上一个 下一个