实践GROMACS-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文

实践GROMACS

2017-10-26 13:53:15 2796 1

GROMACS 简介


GROMACS(GROningen MAchine for Chemical Simulations)是一款通用软件包,用于对具有数百万颗粒子的系统进行基于牛顿运动方程的分子动力学模拟。GROMACS主要用于生物化学分子,如蛋白质,脂质等具有多种复杂键合相互作用的核酸。由于GROMACS在计算典型的主流模拟应用如非键合相互作用非常高效,许多研究人员将其用于非生物系统如聚合物的研究。
GROMACS支持从现代分子动力学实现中预期的所有常见算法,其代码由世界各地的开发人员维护。详情可参见官网 www.gromacs.org

准备工作

运行以下示例需要在创建集群时选择安装GROMACS相关软件包。

[backcolor=transparent]注:若需运行gromacs-gpu算例,在创建集群时[backcolor=transparent]必须使用GPU系列机型作为计算节点,否则集群创建或gromacs-gpu无法按照以下指引运行。
同时还需选择所依赖的相关MPI库


运行算例
[backcolor=transparent]注意:运行算例前务必做好 提交作业中准备工作部分的操作。

GROMACS 算例1:水中的溶菌酶(Lysozyme in Water)


本样例为用户设置一个蛋白质(lysozyme)加上离子在水盒子里的模拟过程。
官方教程链接: http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin/gmx-tutorials/lysozyme/index.html
非官方中文翻译链接: http://jerkwin.github.io/GMX/GMXtut-1/

下载地址
http://public-ehs.oss-cn-hangzhou.aliyuncs.com/packages/Lysozyme.tar.gz

运行步骤
a. 串行版本$ ./serial_run.sh
b. 并行版本$ ./parallel_run.sh

GROMACS算例2:水分子运动
本算例为模拟大量水分子在给定空间、温度内的运动过程,以下运行实例为GPU加速版。

运行步骤
  • 设置环境变量,运行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算例

假设当前目录在当前用户的$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

  • 提交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

取消 提交回答
全部回答(1)
  • sunnysean
    2018-01-01 08:13:44
    Re实践GROMACS
    这个实例购买位置在哪儿?
    0 0
相关问答

38

回答

干货分享:DBA专家门诊一期:索引与sql优化问题汇总

xiaofanqie 2014-12-25 15:13:38 92134浏览量 回答数 38

18

回答

【大咖问答】对话PostgreSQL 中国社区发起人之一,阿里云数据库高级专家 德哥

阿里ACE 彭飞 2019-07-10 09:36:10 1051110浏览量 回答数 18

111

回答

OSS存储服务-客户端工具

newegg11 2012-05-17 15:37:18 295724浏览量 回答数 111

294

回答

Linux Bash严重漏洞修复紧急通知(已全部给出最终修复方案)

qilu 2014-09-25 13:26:50 434674浏览量 回答数 294

82

回答

OSS入门教程

belle.zhoux 2014-07-07 17:14:27 151595浏览量 回答数 82

88

回答

手把手教你搭建自己的OSS FTP 服务器

lei.zhuol 2012-05-16 14:48:33 90148浏览量 回答数 88

97

回答

Redhat/CentOS一键安装web环境全攻略

xiaofanqie 2011-08-11 14:51:38 123760浏览量 回答数 97

24

回答

【精品问答】python技术1000问(1)

问问小秘 2019-11-15 13:25:00 475940浏览量 回答数 24

2

回答

区域选择帮助

fanyue88888 2012-12-07 15:54:30 204449浏览量 回答数 2

78

回答

【2013.9.5修正版图文】新手如何使用阿里云(linux)服务器建站(搬站)

姑苏公子 2013-04-11 00:39:13 108031浏览量 回答数 78
+关注
757
文章
549
问答
问答排行榜
最热
最新
相关电子书
更多
《2021云上架构与运维峰会演讲合集》
立即下载
《零基础CSS入门教程》
立即下载
《零基础HTML入门教程》
立即下载