Lammps reaxff

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

Lammps reaxff is an AI agent skill from the GitHub repository jinzhezenggroup/computational-chemistry-agent-skills. Run reactive molecular dynamics simulations in LAMMPS with the ReaxFF potential, including preparing input scripts (pair_style reaxff + fix qeq/reaxff), mapping LAMMPS atom types to elements via pair_coeff, choosing ensembles (NVE/NVT/NPT), and adding common ReaxFF diagnostics such as species analys

How to use this skill

Skill file

LAMMPS + ReaxFF

Use this skill when the user wants to run molecular dynamics in LAMMPS with a ReaxFF force field, prepare or explain an input.lammps file, and set up charge equilibration (QEq) correctly.

Agent responsibilities

  1. Confirm the ReaxFF force field file (e.g. ffield.reax.*). Do not guess which file is appropriate.
  1. Confirm the structure/data file (e.g. data.system) and the atom type → element mapping needed by pair_coeff.
  2. Ensure the input includes charge handling:
  1. Write the LAMMPS input script yourself; keep examples readable and annotated.
  2. When possible, validate command availability against LAMMPS docs or local lmp -h output before execution.
  3. Report clearly which command was run, which files were used, and where outputs were written.

Minimum information to collect

Ask only for what is missing:

Execution mode

Online mode (only if internet access + `uv` is available)

Use:

uvx --from 'lammps[mpi]' lmp -in input.lammps

Notes:

Offline mode (common / HPC)

Do not invent the executable. Ask which command should be used, e.g.:

Example: annotated NVT input (ReaxFF + QEq)

See also assets/input.reaxff.nvt.lammps.

# --------- user knobs ---------
variable        NSTEPS      equal 200000
variable        THERMO      equal 200
variable        DUMP        equal 1000

variable        TEMP        equal 300.0
variable        TAU_T       equal 100.0

# Timestep (fs for units real). For high-T / reactive runs, 0.1 fs is often safer.
variable        DT          equal 0.25


# QEq parameters
variable        QEQ_EVERY   equal 1
variable        QEQ_TOL     equal 1.0e-6
variable        QEQ_CUTLO   equal 0.0
variable        QEQ_CUTHI   equal 10.0

units           real
boundary        p p p
atom_style      charge

read_data       data.system

neighbor        2.0 bin
neigh_modify    every 1 delay 0 check yes

# ReaxFF potential
pair_style      reaxff NULL
pair_coeff      * * ffield.reax C H O

# Charge equilibration (required for most ReaxFF parameterizations)
fix             fqeq all qeq/reaxff ${QEQ_EVERY} ${QEQ_CUTLO} ${QEQ_CUTHI} ${QEQ_TOL} reaxff
# (`reaxff` here means QEq parameters are extracted from the ReaxFF force field file.)

# Thermo and trajectory
thermo_style    custom step temp pe ke etotal press vol density
thermo          ${THERMO}

dump            1 all custom ${DUMP} traj.lammpstrj id type q x y z

# Dynamics
velocity        all create ${TEMP} 12345 mom yes rot yes dist gaussian
fix             fnvt all nvt temp ${TEMP} ${TEMP} ${TAU_T}

timestep        ${DT}
run             ${NSTEPS}

Notes on the example

Sanity checks (recommended before long runs)

  1. Short NVE stability check (no thermostat/barostat)

Example (units real):

reset_timestep  0
unfix           fnvt
fix             fnve all nve

# high-T ReaxFF often needs a smaller timestep
# (common choices: 0.1 fs; if needed 0.05 fs)
timestep        0.1
run             2000
  1. QEq convergence

Optional: species analysis

If the user wants reaction product tracking, add fix reaxff/species (see references/reaxff-workflow.md). This writes time series counts of detected molecular species using bond-order cutoffs.

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.