LAMMPS 反应势与 GLE
用实际完成的 LAMMPS 输入展示参数、提交和结果文件,附各条件的操作记录。
阅读本篇目录
下载输入、Slurm 作业与实际结果。本例使用 LAMMPS 30 Sep 2026 的 P100 构建。附件保存 2 个已完成条件,按输入保留相互作用与操作参数。
选择条件#
解压并进入 lammps-reactive-potentials-and-gle-operations。CASES 每行对应一个作业数组索引,inputs 保存条件输入,reference 保存实际输出。gpu 条件使用 GPU 构建,其中普通 CPU 样式按输入直接运行;kokkos 条件启用 Kokkos。
| 条件目录 | 主要样式 | 运行模式 |
|---|---|---|
p100-water-GLE-quantum |
pair_style lj/cut/tip4p/long, bond_style class2, angle_style harmonic, kspace_style pppm/tip4p, fix gle, compute chunk/atom, compute ke/atom, fix ave/time, dump custom |
gpu |
p100-water-GLE-smart |
pair_style lj/cut/tip4p/long, bond_style class2, angle_style harmonic, kspace_style pppm/tip4p, fix gle, compute chunk/atom, compute ke/atom, fix ave/time, dump custom |
gpu |
输入与提交#
第一组的输入如下。单位、边界条件和参数以对应 in.lammps 为准。
units real
atom_style full
pair_style lj/cut/tip4p/long 1 2 1 1 0.14714951 8
bond_style class2
angle_style harmonic
kspace_style pppm/tip4p 0.0001
read_data data.h2o-quantum
pair_coeff * 2 0.0 0.0
pair_coeff 1 1 0.1852 3.1589022
#q-tip4pf bond parameters
bond_coeff 1 0.9419 607.19354 -1388.6516 1852.577
angle_coeff 1 43.93 107.4
timestep 0.5
# mean velocity is higher than target T because of zero point energy
velocity all create 800.0 1112 dist gaussian mom yes
thermo 100
thermo_style custom step temp pe ke etotal
# some problem
fix 1 all gle 6 300.0 300.0 31415 qt-300k.A noneq qt-300k.C
#dump 1 all atom 100 h2o-smart.lammpstrj
#dump 2 all image 1000 h2o-smart.*.jpg element element &
# zoom 1.4
#dump_modify 2 pad 5 element O H
#dump 3 all movie 100 movie.mp4 element element &
# zoom 1.4
#dump_modify 3 pad 5 element O H
compute mol all chunk/atom molecule
compute kin all ke/atom
fix hist all ave/time 10 1 10 c_thermo_temp file temperature-history.dat
dump atoms all custom 100 trajectory.lammpstrj id mol type x y z vx vy vz c_kin
dump_modify atoms sort id
run 2000
write_restart final.restart
在附件根目录提交第一组或所选条件。
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/p100-water-GLE-quantum
tail -n 35 native.out
本次第一组的原生日志片段如下。
Step Temp PotEng KinEng TotEng
Loop time of 3.06641 on 1 procs for 2000 steps with 192 atoms
Total wall time: 0:00:03
原始输入若包含 dump、数据表或其他导出命令,相应文件会保存在该条件目录。附件提供的参考数据文件为 temperature-history.dat。按自己的体系修改输入时,保留对应势函数文件、单位和原子样式设置。
再次运行前,将已有的同名 work-new 条件目录改名保存。
本次输出示例#
第一组原生热力学输出的开头如下,列名由该组输入的 thermo_style 设置。
Step Temp PotEng KinEng TotEng
0 800 -397.88978 455.46778 57.578
100 672.59627 -423.05802 382.93241 -40.125617
200 642.7945 -422.88911 365.96523 -56.923878
需要根据你的体系选择资源?联系讨论计算需求。实际可用软件与权限,以当前账户和运行环境为准。