LAMMPS 表面、QEqR 与介观刚体
用实际完成的 LAMMPS 输入展示参数、提交和结果文件,附各条件的操作记录。
阅读本篇目录
下载输入、Slurm 作业与实际结果。本例使用 LAMMPS 30 Sep 2026 的 P100 构建。附件保存 5 个已完成条件,按输入保留相互作用与操作参数。
选择条件#
解压并进入 lammps-surfaces-qeqr-and-mesoscopic-bodies-operations。CASES 每行对应一个作业数组索引,inputs 保存条件输入,reference 保存实际输出。gpu 条件使用 GPU 构建,其中普通 CPU 样式按输入直接运行;kokkos 条件启用 Kokkos。
| 条件目录 | 主要样式 | 运行模式 |
|---|---|---|
v100-triangular-surface-local |
pair_style hybrid, fix surface/local, fix nve/sphere, fix gravity, fix pour, fix wall/gran/region, compute temp, compute temp/sphere, dump custom, fix move |
gpu |
v100-water-relative-QEqR-periodic-electric-field |
pair_style reaxff, fix qeq/rel/reaxff, fix nvt, fix efield, compute property/atom, compute reduce, dump custom |
gpu |
p100-two-body-SMD-Hertz-contact-curve |
pair_style smd/hertz |
gpu |
p100-triangular-surface-global |
pair_style granular, fix surface/global, fix nve/sphere, fix gravity, fix pour, fix wall/gran/region, compute temp, compute temp/sphere, dump custom |
gpu |
p100-twelve-superellipsoid-gravity-contacts |
pair_style granular/superellipsoid, compute property/atom, fix gravity, fix nve/asphere, compute erotate/asphere, dump custom |
gpu |
输入与提交#
第一组的输入如下。单位、边界条件和参数以对应 in.lammps 为准。
# pouring spheres into box made of triangles
units lj
atom_style tri
atom_modify map array
boundary f f f
dimension 3
comm_modify vel yes cutoff 12.5
region box block -7 7 -7 7 0 9 units box
create_box 2 box
molecule tris surf.tri
fix 20 all surface/local input mol tris
pair_style hybrid granular surf/granular
pair_coeff 1 1 granular hooke 4000.0 100.0 &
tangential linear_history 1000.0 1.0 0.5 &
damping mass_velocity
pair_coeff 1 2 surf/granular hooke 4000.0 100.0 &
tangential linear_history 1000.0 1.0 0.5 &
damping mass_velocity
pair_coeff 2 2 none
group sphere type 1
group tri type 2
neighbor 0.3 bin
neigh_modify delay 0 every 1 check yes
fix 2 sphere nve/sphere
fix 3 sphere gravity 1.0 vector 0 0 -1
region slab block -2 2 -2 2 7 9 units box
fix ins sphere pour 100 1 4767548 vol 0.4 10 &
diam one 1.0 region slab ignore
region zcylinder cylinder z 0 0 7.0 INF INF units box
fix wall sphere wall/gran/region granular hooke 4000.0 100.0 &
tangential linear_history 1000.0 1.0 0.5 &
damping mass_velocity &
region zcylinder
timestep 0.005
compute 1 sphere temp
compute_modify 1 dynamic/dof yes
compute 2 sphere temp/sphere
compute_modify 2 dynamic/dof yes
thermo 100
thermo_style custom step atoms temp c_1 c_2 press
thermo_modify lost ignore
compute_modify thermo_temp dynamic/dof yes
#dump 2 all image 100 tmp.image.*.ppm type type &
# zoom 1.4 adiam 1.0 tri type 2 0.2
#dump_modify 2 pad 5
dump native_history all custom 100 particle-surface-history.dump id type x y z vx vy vz fx fy fz
dump_modify native_history sort id first yes
run 5000
fix 1 tri move rotate 0 0 0 0 0 1 25
run 5000
unfix 1
set group tri angmom 0.0 0.0 0.0
velocity tri set 0.0 0.0 0.0
run 5000
在附件根目录提交第一组或所选条件。
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/v100-triangular-surface-local
tail -n 35 native.out
本次第一组的原生日志片段如下。
Loop time of 0.277553 on 1 procs for 5000 steps with 100 atoms
Loop time of 0.250859 on 1 procs for 5000 steps with 48 atoms
Loop time of 0.16175 on 1 procs for 5000 steps with 39 atoms
Total wall time: 0:00:00
原始输入若包含 dump、数据表或其他导出命令,相应文件会保存在该条件目录。附件提供的参考数据文件为 particle-surface-history.dump。按自己的体系修改输入时,保留对应势函数文件、单位和原子样式设置。
再次运行前,将已有的同名 work-new 条件目录改名保存。
本次输出示例#
第一组原生热力学输出的开头如下,列名由该组输入的 thermo_style 设置。
Step Atoms Temp c_1 c_2 Press
0 4 0 0 0 0
100 28 0.36763289 0.43156905 0.21119336 0.005627034
200 28 0.62433559 0.73291569 0.35866087 0.009556157
需要根据你的体系选择资源?联系讨论计算需求。实际可用软件与权限,以当前账户和运行环境为准。