LAMMPS CGDNA、RHEO、BPM 与 TLSPH
用实际完成的 LAMMPS 输入展示参数、提交和结果文件,附各条件的操作记录。
阅读本篇目录
下载输入、Slurm 作业与实际结果。本例使用 LAMMPS 30 Sep 2026 的 P100 构建。附件保存 12 个已完成条件,按输入保留相互作用与操作参数。
选择条件#
解压并进入 lammps-cgdna-rheo-bpm-tlsph-operations。CASES 每行对应一个作业数组索引,inputs 保存条件输入,reference 保存实际输出。gpu 条件使用 GPU 构建,其中普通 CPU 样式按输入直接运行;kokkos 条件启用 Kokkos。
| 条件目录 | 主要样式 | 运行模式 |
|---|---|---|
cases-BODY-nparticle |
pair_style body/nparticle, fix nve/body, fix enforce2d, dump custom |
gpu |
cases-BPM-bending-wires |
pair_style granular, bond_style bpm/rotational, fix nve/bpm/sphere, fix settorque/atom, fix setforce, fix move, fix viscous, compute property/atom, dump custom |
gpu |
cases-oxDNA |
bond_style oxdna/fene, pair_style hybrid/overlay, fix nve/asphere, fix balance, compute property/atom, compute erotate/asphere, compute ke, compute pe, fix print, dump custom |
gpu |
cases-RHEO-oxidation |
pair_style hybrid/overlay, bond_style hybrid, compute rheo/property/atom, fix rheo, fix rheo/viscosity, fix rheo/pressure, fix rheo/thermal, fix rheo/oxidation, fix wall/harmonic, fix gravity, fix setforce, fix add/heat, fix enforce2d, compute nbond/atom, dump custom |
gpu |
cases-TLSPH-elastic-strip |
pair_style smd/tlsph, fix smd/setvel, fix smd/adjust_dt, fix smd/integrate_tlsph, compute smd/tlsph/stress, compute smd/tlsph/strain, compute smd/tlsph/num/neighs, dump custom, fix print |
gpu |
cases-RHEO-Poiseuille-powerlaw |
pair_style rheo, fix rheo, fix rheo/viscosity, fix rheo/pressure, fix setforce, fix addforce, fix enforce2d, compute rheo/property/atom, dump custom |
gpu |
cases-oxRNA2 |
bond_style oxrna2/fene, pair_style hybrid/overlay, fix nve/asphere, fix balance, compute property/atom, compute erotate/asphere, compute ke, compute pe, fix print, dump custom |
gpu |
cases-oxDNA2 |
bond_style oxdna2/fene, pair_style hybrid/overlay, fix nve/asphere, fix balance, compute property/atom, compute erotate/asphere, compute ke, compute pe, fix print, dump custom |
gpu |
cases-RHEO-thermal-phase |
pair_style hybrid/overlay, bond_style bpm/spring, fix rheo, fix rheo/viscosity, fix rheo/pressure, fix rheo/thermal, fix wall/region, fix gravity, fix deposit, fix enforce2d, compute rheo/property/atom, compute nbond/atom, dump custom |
gpu |
cases-RHEO-Poiseuille-Newtonian |
pair_style rheo, fix rheo, fix rheo/viscosity, fix rheo/pressure, fix setforce, fix addforce, fix enforce2d, compute rheo/property/atom, dump custom |
gpu |
cases-oxDNA3 |
bond_style hybrid, pair_style hybrid/overlay, fix nve/asphere, fix balance, compute property/atom, compute erotate/asphere, compute ke, compute pe, compute bond, compute pair, fix print, dump custom |
gpu |
cases-RHEO-TaylorGreen |
pair_style rheo, fix rheo, fix rheo/viscosity, fix rheo/pressure, fix enforce2d, compute rheo/property/atom, dump custom |
gpu |
输入与提交#
第一组的输入如下。单位、边界条件和参数以对应 in.lammps 为准。
# 2d polygon nparticle bodies
units lj
dimension 2
atom_style body nparticle 2 6
read_data data.body
velocity all create 1.44 87287 loop geom
pair_style body/nparticle 5.0
pair_coeff * * 1.0 1.0
neighbor 0.5 bin
neigh_modify every 1 delay 0 check yes
fix 1 all nve/body
#fix 1 all nvt/body temp 1.44 1.44 1.0
fix 2 all enforce2d
#compute 1 all body/local type 1 2 3
#dump 1 all local 100 dump.body index c_1[1] c_1[2] c_1[3] c_1[4]
#dump 2 all image 1000 image.*.jpg type type &
# zoom 1.6 adiam 1.5 body type 1.0 0
#dump_modify 2 pad 5
thermo 100
thermo_modify norm no format float %.16e
thermo 100
dump ys_fields all custom 100 trajectory.dump id type x y z vx vy vz fx fy fz tqx tqy tqz
dump_modify ys_fields first yes sort id format float %.16e
run 1000
write_dump all custom final.dump id type x y z vx vy vz fx fy fz tqx tqy tqz modify sort id format float %.16e
在附件根目录提交第一组或所选条件。
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/cases-BODY-nparticle
tail -n 35 native.out
本次第一组的原生日志片段如下。
Step Temp E_pair E_mol TotEng Press
Loop time of 0.147277 on 2 procs for 1000 steps with 100 atoms
Total wall time: 0:00:00
原始输入若包含 dump、数据表或其他导出命令,相应文件会保存在该条件目录。附件提供的参考数据文件为 final.dump, trajectory.dump。按自己的体系修改输入时,保留对应势函数文件、单位和原子样式设置。
再次运行前,将已有的同名 work-new 条件目录改名保存。
本次输出示例#
第一组原生热力学输出的开头如下,列名由该组输入的 thermo_style 设置。
Step Temp E_pair E_mol TotEng Press
0 1.4400000000000006e+00 -6.3799524975267921e+01 0.0000000000000000e+00 7.8760475024732131e+01 -1.5028723961195684e-01
100 1.6423370447527030e+00 -1.0003868538833069e+02 0.0000000000000000e+00 6.2552682042186916e+01 1.6140818166569776e-01
200 1.4704730138454074e+00 -1.2465469365617059e+02 0.0000000000000000e+00 2.0922134714524731e+01 3.5146924765019161e-01
需要根据你的体系选择资源?联系讨论计算需求。实际可用软件与权限,以当前账户和运行环境为准。