LAMMPS QEq 配套模型
用实际完成的 LAMMPS 输入展示参数、提交和结果文件,附各条件的操作记录。
阅读本篇目录
下载输入、Slurm 作业与实际结果。本例使用 LAMMPS 30 Sep 2026 的 P100 构建。附件保存 8 个已完成条件,按输入保留相互作用与操作参数。
选择条件#
解压并进入 lammps-qeq-matched-models-operations。CASES 每行对应一个作业数组索引,inputs 保存条件输入,reference 保存实际输出。gpu 条件使用 GPU 构建,其中普通 CPU 样式按输入直接运行;kokkos 条件启用 Kokkos。
| 条件目录 | 主要样式 | 运行模式 |
|---|---|---|
CPU-qeq-ctip-omp |
pair_style hybrid/overlay, compute property/atom, compute reduce, fix qeq/ctip/omp |
gpu |
CPU-qeq-slater-omp |
pair_style hybrid/overlay, compute property/atom, compute reduce, fix qeq/slater/omp, fix nve |
gpu |
CPU-qeq-slater |
pair_style hybrid/overlay, compute property/atom, compute reduce, fix qeq/slater, fix nve |
gpu |
CPU-qeq-ctip |
pair_style hybrid/overlay, compute property/atom, compute reduce, fix qeq/ctip |
gpu |
CPU-qeq-dynamic |
pair_style buck/coul/long, kspace_style pppm, fix qeq/dynamic, compute property/atom, compute reduce, fix nve |
gpu |
CPU-qeq-fire-omp |
pair_style buck/coul/long, kspace_style pppm, fix qeq/fire/omp, compute property/atom, compute reduce, fix nve |
gpu |
CPU-qeq-dynamic-omp |
pair_style buck/coul/long, kspace_style pppm, fix qeq/dynamic/omp, compute property/atom, compute reduce, fix nve |
gpu |
CPU-qeq-fire |
pair_style buck/coul/long, kspace_style pppm, fix qeq/fire, compute property/atom, compute reduce, fix nve |
gpu |
输入与提交#
第一组的输入如下。单位、边界条件和参数以对应 in.lammps 为准。
#CTIP potential for NiO
#Contributing author: Gabriel Plummer (NASA)
#Initialize
units metal
atom_style charge
dimension 3
boundary p p p
#Create Structure
read_data dependency-e1de69ba1c.ctip
#Define Charges
group type1 type 1
compute charge1 type1 property/atom q
compute q1 type1 reduce ave c_charge1
group type2 type 2
compute charge2 type2 property/atom q
compute q2 type2 reduce ave c_charge2
#Define Potential
pair_style hybrid/overlay eam/fs coul/ctip 0.30 12.0
pair_coeff * * eam/fs dependency-90d976094c.fs Ni O
pair_coeff * * coul/ctip dependency-ef8503f01f.ctip Ni O
fix qeq all qeq/ctip/omp 1 12.0 1.0e-8 100 coul/ctip cdamp 0.30 maxrepeat 10
#Setup
timestep 0.001
thermo 100
thermo_style custom step temp pe lx ly lz pxx pyy pzz c_q1 c_q2
compute atomq all property/atom q
compute totalq all reduce sum c_atomq
compute minq all reduce min c_atomq
compute maxq all reduce max c_atomq
thermo_style custom step atoms pe c_totalq c_minq c_maxq
thermo_modify norm no format float %.16e
run 0
write_dump all custom charge-forces.dump id type q x y z fx fy fz 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/CPU-qeq-ctip-omp
tail -n 35 native.out
本次第一组的原生日志片段如下。
Loop time of 3.315e-06 on 2 procs for 0 steps with 1728 atoms
Total wall time: 0:00:00
原始输入若包含 dump、数据表或其他导出命令,相应文件会保存在该条件目录。附件提供的参考数据文件为 charge-forces.dump。按自己的体系修改输入时,保留对应势函数文件、单位和原子样式设置。
再次运行前,将已有的同名 work-new 条件目录改名保存。
本次输出示例#
第一组原生热力学输出的开头如下,列名由该组输入的 thermo_style 设置。
Step Atoms PotEng c_totalq c_minq c_maxq
0 1728 -9.6331830185070376e+03 -5.7671645237178382e-12 -1.2374665847270887e+00 1.2374665847271671e+00
Loop time of 3.315e-06 on 2 procs for 0 steps with 1728 atoms
需要根据你的体系选择资源?联系讨论计算需求。实际可用软件与权限,以当前账户和运行环境为准。