LAMMPS AMOEBA 与 HIPPO 极化势
用实际完成的 LAMMPS 输入展示参数、提交和结果文件,附各条件的操作记录。
阅读本篇目录
下载输入、Slurm 作业与实际结果。本例使用 LAMMPS 30 Sep 2026 的 P100 构建。附件保存 5 个已完成条件,按输入保留相互作用与操作参数。
选择条件#
解压并进入 lammps-polarizable-amoeba-hippo-operations。CASES 每行对应一个作业数组索引,inputs 保存条件输入,reference 保存实际输出。gpu 条件使用 GPU 构建,其中普通 CPU 样式按输入直接运行;kokkos 条件启用 Kokkos。
| 条件目录 | 主要样式 | 运行模式 |
|---|---|---|
water-HIPPO-CPU |
bond_style class2, angle_style amoeba, dihedral_style none, pair_style hippo, fix property/atom, compute pressure, fix nve, compute pair, dump custom |
gpu |
water-AMOEBA-CPU |
bond_style class2, angle_style amoeba, dihedral_style none, pair_style amoeba, fix property/atom, compute pressure, fix nve, compute pair, dump custom |
gpu |
water-AMOEBA-GPU |
bond_style class2, angle_style amoeba, dihedral_style none, pair_style amoeba/gpu, fix property/atom, compute pressure, fix nve, compute pair, dump custom |
gpu |
water-HIPPO-GPU |
bond_style class2, angle_style amoeba, dihedral_style none, pair_style hippo/gpu, fix property/atom, compute pressure, fix nve, compute pair, dump custom |
gpu |
ubiquitin-AMOEBA-GPU |
bond_style class2, angle_style amoeba, dihedral_style fourier, improper_style amoeba, pair_style amoeba/gpu, fix property/atom, fix amoeba/pitorsion, fix amoeba/bitorsion, fix types", fix PiTorsions, fix BiTorsions, compute pressure, fix nve, compute pair, dump custom |
gpu |
输入与提交#
第一组的输入如下。单位、边界条件和参数以对应 in.lammps 为准。
# water box with AMOEBA or HIPPO
units real
newton on on
boundary p p p
atom_style amoeba
bond_style class2
angle_style amoeba
dihedral_style none
# per-atom properties required by AMOEBA or HIPPO
fix amtype all property/atom i_amtype ghost yes
fix extra all property/atom i_amgroup d_redID d_pval ghost yes
fix extra2 all property/atom i_polaxe d2_xyzaxis 3
# read data file
read_data data.water_box.hippo fix amtype NULL "Tinker Types"
# force field
pair_style hippo
pair_coeff * * hippo_water.prm hippo_water_box.key
special_bonds lj/coul 0.5 0.5 0.5 one/five yes
# thermo output
compute virial all pressure NULL virial
thermo_style custom step temp epair ebond eangle edihed eimp &
emol etotal press c_virial[*]
#dump 1 all custom 10 dump.water_box id type x y z fx fy fz
#dump_modify 1 sort id
# dynamics
fix 1 all nve
thermo 10
compute energyParts all pair hippo
thermo_style custom step atoms temp pe c_energyParts[*]
thermo_modify norm no format float %.16e
dump history all custom 10 atoms-history.dump id mol type x y z fx fy fz
dump_modify history first yes sort id format float %.16e
run 100
write_data final.data nocoeff
在附件根目录提交第一组或所选条件。
sbatch --array=0 run.slurm
# 按 CASES 的完整列表提交
sbatch run.slurm
脚本申请一个 MPI 任务、一个 CPU 核和一张 P100,根据 MODES 加载对应模块。实际调用保存在 cases.json,例如第一组的命令参数为:
lmp -k off -pk omp 1 -echo both -in in.lammps > native.out
查看输出#
结果写入 work-new/条件名。先查看日志中的实际热力学表与结束信息。
cd work-new/water-HIPPO-CPU
tail -n 35 native.out
本次第一组的原生日志片段如下。
Loop time of 7.48653 on 1 procs for 100 steps with 648 atoms
Total wall time: 0:00:07
原始输入若包含 dump、数据表或其他导出命令,相应文件会保存在该条件目录。附件提供的参考数据文件为 atoms-history.dump, final.data。按自己的体系修改输入时,保留对应势函数文件、单位和原子样式设置。
再次运行前,将已有的同名 work-new 条件目录改名保存。
本次输出示例#
第一组原生热力学输出的开头如下,列名由该组输入的 thermo_style 设置。
Step Atoms Temp PotEng c_energyParts[1] c_energyParts[2] c_energyParts[3] c_energyParts[4] c_energyParts[5] c_energyParts[6]
0 648 0.0000000000000000e+00 -1.9442893114522158e+03 0.0000000000000000e+00 4.0696525127532932e+03 -9.5035197547006157e+02 -3.5467585641161454e+03 -7.9231493544656212e+02 -9.6882107663282272e+02
10 648 1.0094690902383772e+02 -2.1454943590376201e+03 0.0000000000000000e+00 4.1600588580125323e+03 -9.5707411665455072e+02 -3.7142618591726628e+03 -8.3547997190527212e+02 -1.0034348821141274e+03
20 648 1.5391621859933690e+02 -2.2556842143972362e+03 0.0000000000000000e+00 4.1034876926876204e+03 -9.5550011489463793e+02 -3.6741371839766011e+03 -8.3833356539125816e+02 -9.9382266374421215e+02
需要根据你的体系选择资源?联系讨论计算需求。实际可用软件与权限,以当前账户和运行环境为准。