Lammps deepmd

From jinzhezenggroup/computational-chemistry-agent-skills · View interactive version

Lammps deepmd is an AI agent skill from the GitHub repository jinzhezenggroup/computational-chemistry-agent-skills. A tool and knowledge base for running molecular dynamics (MD) simulations in LAMMPS with the DeePMD-kit plugin. It handles input script preparation, ensemble selection (NVE/NVT/NPT), and execution with a verified DeePMD-enabled runtime. USE WHEN you need to set up, write, explain, or execute a LAMMP

How to use this skill

Skill file

LAMMPS + DeePMD-kit

Use this skill when the user wants to run molecular dynamics in LAMMPS with a DeePMD-kit potential, prepare or explain an input.lammps file, or switch between common ensembles such as NVE, NVT, and NPT.

Agent responsibilities

  1. Confirm the available execution runtime:

runtime versions.

  1. Confirm the minimum simulation inputs:

checkpoint, DPA4/SeZM, or an unclear export path

file does not define them

  1. Write the LAMMPS input script yourself instead of asking the user to hand-write it.
  1. Keep the example readable and fully explained. If you include an example input script, explain what every command does.
  1. When possible, validate command availability against the LAMMPS docs or local lmp -h output before execution.
  1. Report clearly which command was run, which files were used, and where outputs were written.

Verify the execution runtime

Use an existing site-installed binary, container, or build from the current

checkout. Before execution:

the exact installed package/container identity;

required DeePMD pair style and model-artifact route;

capability gates;

unreleased version number.

If no verified runtime is available, ask a concrete question such as:

Do not invent a binary, module, container, or package version.

Minimal information to collect

Ask only for what is missing:

Recommended workflow

  1. Inspect available files in the working directory.
  2. Read references/model-deployment.md when the model needs export, its artifact type is unclear, or explicit element mapping is required.
  3. Draft input.lammps.
  4. Explain the script to the user if they asked for an explanation or if the script is nontrivial.
  5. Follow the staged canary in references/commands-and-workflow.md before production.
  6. Run the full simulation.
  7. Summarize outputs such as log.lammps, dump trajectories, restart files, and thermodynamic data.

Example: annotated NVT input

The following example is adapted from the user-provided tutorial pattern and slightly generalized. See also assets/input.nvt.lammps.

variable        NSTEPS          equal 1000000
variable        THERMO_FREQ     equal 1000
variable        DUMP_FREQ       equal 1000
variable        TEMP            equal 300.0
variable        TAU_T           equal 0.1

units           metal
boundary        p p p
atom_style      atomic

neighbor        1.0 bin

atom_modify     map yes
read_data       data.system
mass            1 28.0855
mass            2 15.999
pair_style      deepmd graph_compressed.pb
pair_coeff      * * Si O

thermo_style    custom step temp pe ke etotal press vol lx ly lz xy xz yz
thermo          ${THERMO_FREQ}
dump            1 all custom ${DUMP_FREQ} traj.lammpstrj id type element x y z
dump_modify     1 element Si O sort id

velocity        all create ${TEMP} 743574
fix             1 all nvt temp ${TEMP} ${TEMP} ${TAU_T}

timestep        0.0005
run             ${NSTEPS}

What every command means

Common ensemble modifications

NVE

Replace the NVT thermostat line with:

fix 1 all nve

Meaning:

NPT

A typical isotropic NPT alternative is:

variable        PRESS           equal 1.0
variable        TAU_P           equal 1.0
fix             1 all npt temp ${TEMP} ${TEMP} ${TAU_T} iso ${PRESS} ${PRESS} ${TAU_P}

Meaning:

When using NPT, it is often useful to keep vol, lx, ly, and lz in the thermo output.

Execution templates

Verified run

Only after the runtime is identified, use the matching command, for example:

lmp -in input.lammps
mpirun -np 8 lmp_mpi -in input.lammps
srun lmp -in input.lammps

Do not choose one of these without evidence that it is the verified runtime.

Output checklist

After a run, report at least:

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.