Skip to content

Commit 5156c40

Browse files
light-cyannjzjz-bot
authored andcommitted
sync(skills): Add a description about mass (#73)
Imported from jinzhezenggroup/computational-chemistry-agent-skills. Upstream-Commit: jinzhezenggroup/computational-chemistry-agent-skills@37ed5a2 Upstream-Paths: - machine-learning-potentials/deepmd-finetune-dpa3 - machine-learning-potentials/deepmd-python-inference - machine-learning-potentials/deepmd-train-dpa3 - machine-learning-potentials/deepmd-train-se-e2-a - molecular-dynamics/lammps-deepmd
1 parent b30b50d commit 5156c40

3 files changed

Lines changed: 12 additions & 11 deletions

File tree

skills/lammps-deepmd/SKILL.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Use this skill when the user wants to run molecular dynamics in LAMMPS with a De
2525
1. Confirm the minimum simulation inputs:
2626
- structure/data file (for example `data.system`)
2727
- DeePMD model file (for example `graph.pb` or compressed model)
28+
- atom type to element mapping, including required per-type masses if the data file does not define them
2829
- target ensemble (NVE, NVT, NPT, or another explicitly requested setup)
2930
- temperature, pressure if applicable, timestep, and total number of steps
3031
1. Write the LAMMPS input script yourself instead of asking the user to hand-write it.
@@ -104,6 +105,8 @@ atom_style atomic
104105
neighbor 1.0 bin
105106
106107
read_data data.system
108+
mass 1 28.0855
109+
mass 2 15.999
107110
pair_style deepmd graph_compressed.pb
108111
pair_coeff * *
109112
@@ -171,6 +174,11 @@ run ${NSTEPS}
171174
- Reads the initial atomic structure, atom types, simulation box, and related information from the LAMMPS data file `data.system`.
172175
- Replace this filename with the actual user file.
173176

177+
- `mass 1 28.0855`, `mass 2 15.999`
178+
179+
- Defines per-type atomic masses when the data file does not contain a `Masses` section.
180+
- These example values correspond to a two-type Si/O mapping; adjust them to the actual atom type to element mapping. LAMMPS velocity creation and thermostats require masses; without them, runs can fail with `Not all per-type masses are set`.
181+
174182
- `pair_style deepmd graph_compressed.pb`
175183

176184
- Selects the DeePMD pair style.

skills/lammps-deepmd/assets/input.nvt.lammps

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ atom_style atomic
1111
neighbor 1.0 bin
1212

1313
read_data data.system
14+
mass 1 28.0855
15+
mass 2 15.999
1416
pair_style deepmd graph_compressed.pb
1517
pair_coeff * *
1618

skills/lammps-deepmd/references/commands-and-workflow.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,6 @@
22

33
This reference expands the main skill with practical operating guidance.
44

5-
## When to use this skill
6-
7-
Use this skill when a user needs to:
8-
9-
- run LAMMPS with a DeePMD-kit model
10-
- write or modify `input.lammps`
11-
- explain what a LAMMPS command does
12-
- switch between NVE, NVT, and NPT
13-
- run through `uvx` in an internet-connected environment
14-
- run through a site-installed `lmp` command in an offline or HPC environment
15-
165
## Practical rules for agents
176

187
1. Prefer small, explicit input scripts over clever but opaque templates.
@@ -34,6 +23,7 @@ This helps catch obvious issues such as:
3423
- missing model file
3524
- unsupported pair style in the local LAMMPS build
3625
- malformed data file
26+
- missing per-type masses in the data file or input script
3727
- immediate numerical instability
3828

3929
Then replace the short run with the intended production length.
@@ -49,6 +39,7 @@ Then replace the short run with the intended production length.
4939
## Caution points
5040

5141
- The correct timestep depends on the physical system and the DeePMD model quality.
42+
- Ensure every atom type has a mass, either in the LAMMPS data file `Masses` section or via explicit `mass` commands after `read_data`.
5243
- `velocity ... create ...` should usually not be repeated when continuing from a restart.
5344
- NPT settings need physically sensible damping constants; avoid copying values blindly.
5445
- Some local LAMMPS builds may support DeePMD under slightly different package configurations. Check `lmp -h` if unsure.

0 commit comments

Comments
 (0)