WebCal
Ctrl K

向导

Gromacs

向导集成常见问题支持
定价博客
快速开始充值与计费学术资源加速快速开始简介维护与故障网络
平台信息JetBrain ProjectorTmpWebCal学者计划@2026公测/宿迁A区介绍关于我们实例间数据拷贝服务器的性能指标分析潮汐算力负载均衡
国产芯片使用华为MindIE华为昇腾NPU摩尔线程GPU
配置环境CUDA/cuDNNMinicondaPython3.X依赖安装概要镜像
企业高级功能弹性部署弹性部署更新日志弹性部署最佳实践性能指标监控
容器实例JupyterLabSSH远程连接保存镜像升降配置多机多卡并行守护进程概述转换计费方式迁移实例(同地区)迁移实例远程桌面重置系统
如何选择 GPUGPU选型性能实测
数据上传数据下载数据公开数据公网网盘(强烈推荐)压缩 / 解压文件存储本地数据盘概要
最佳实践FileZillaGitGromacsHuggingFaceKataGoLinux基础MPIOpenCLPyCharm远程开发R(Rstudio)安装SSH隧道TensorBoardVSCode远程开发VisdomVulkanXShell开放端口微信消息性能篇暴露多个服务省钱绝招计算精度问题软件源

最佳实践

Gromacs

2026/07/3046854 次浏览

Gromacs是用于研究生物分子体系的分子动力学程序包。在WebCal创建实例选择镜像时使用Gromacs镜像,即可创建带有Gromacs软件包的实例。预置的Gromacs已使用CUDA编译,默认将使用GPU加速计算。

以下Gromacs的测试用例(用例来源):

# Step.0: 准备
mkdir test && cd test
wget https://confluence.csuc.cat/download/attachments/29362353/2n6m.pdb

# Step.1: 生成输入文件。这条命令请单独执行,否则会卡住。提示时选择14: GROMOS96 54a7和1:SPC.
gmx pdb2gmx -f 2n6m.pdb -o esculentin.gro -p esculentin.top -ignh

# Step.2: 设置模拟参数
gmx editconf -f esculentin.gro -o esculenbox.gro -box 5 5 5
gmx solvate -cp esculenbox.gro -o solvated.gro -p esculentin.top

# Step.3: 配置
cat > options.mdp << EOF
integrator        = md
nsteps            = 50000000
nstxout            = 50000
coulombtype        = PME
fourierspacing    = 0.15
tcoupl            = v-rescale
tau-t            = 0.2 0.2
ref-t            = 298.15 298.15
tc-grps            = Protein Non-protein
pcoupl            = berendsen
compressibility    = 4.5e-5
tau-p            = 0.2
ref-p            = 1.0
EOF
gmx grompp -f options.mdp -c solvated.gro -p esculentin.top -o esculentin.tpr -maxwarn 100

# Step.4: 运行
gmx mdrun -s esculentin.tpr

附Gromacs安装脚本:

wget https://ftp.gromacs.org/gromacs/gromacs-2022.2.tar.gz \
    && tar xfz gromacs-2022.2.tar.gz \
    && cd gromacs-2022.2 \
    && mkdir build \
    && cd build \
    && /root/miniconda3/bin/cmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_GPU=CUDA -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda \
    && make -j8 && make check && make install \
    && cd ../../ && rm -rf gromacs-* \
    && echo "PATH=/usr/local/gromacs/bin/:\$PATH" >> /etc/profile

如果自行编译Gromacs==2022版本请注意不要使用CUDA11.3版本,查看官方解释

下一篇公开数据
WebCal文档返回向导