LAMMPS Script Validation & Generation

SkillDev tools

AI-driven workbench for computational materials science — interactive 3D structure viewer, natural-language CatBot assistant, visual DAG workflow engine, HPC job submission. Tauri desktop app with SvelteKit frontend and FastAPI Python backend. Drives VASP, ORCA, CP2K, QE, GPAW, DFTB+, SIESTA, LAMMPS

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the LAMMPS Script Validation & Generation skill

What this skill tells your AI

The instructions your AI receives, as published by hello-qm/catgo-lrg in .claude/skills/lammps-validate/SKILL.md and read by ahel’s review.

When to use: Validate LAMMPS input scripts (.in files) for syntax errors and parameter conflicts before running MD simulations. Generate LAMMPS input scripts from workflow node parameters.

Prerequisites:

  • LAMMPS installed on HPC or local system
  • Input structure (PDB, MOL2, or LAMMPS data file)
  • Understanding of potential types and force fields

Workflow Steps

1. Validate Existing LAMMPS Script

If you have a custom in.lammps script:

  • Check syntax errors (missing semicolons, invalid commands)
  • Verify command ordering (bond_style before read_data, etc.)
  • Confirm parameter compatibility (e.g., PPPM with charged atoms)
  • Detect mismatches between script and data file
# Use the validation skill
Input: in.lammps script content
Output: List of errors or "Script is valid"

2. Generate LAMMPS Script from Parameters

If you have workflow node parameters (potential type, temperature, steps, etc.):

  • Auto-generate correct command sequence
  • Set force field parameters automatically
  • Include ensemble fixes (NVT/NPT/NVE)
  • Add thermodynamic output and trajectory dumps
# Use the generation skill
Input: Node parameters (potential_type, temperature, steps, etc.)
Output: Complete in.lammps script ready to run

3. Workflow Integration

In CatGo MD nodes:

  1. MD Node — Classical MD simulations with NVT/NPT/NVE ensembles
  2. MD Minimize Node — Energy minimization with conjugate gradient or FIRE
  3. Packmol Option — Build initial box from molecules (MD Minimize only)

Key Parameters

Potential Type

  • Force Field (GAFF2, OPLS-AA, COMPASS) — Auto-generates bonds, angles, charges
  • Lennard-Jones — Simple pair-wise LJ potential
  • CHARMM — With long-range Coulomb (PPPM kspace)
  • Buckingham — For ionic materials
  • EAM — For metals (copper, aluminum, etc.)
  • Tersoff — For covalent materials (Si, Ge)
  • Custom — Manual pair_style and coefficients

Ensemble

  • NVE — Microcanonical (constant energy)
  • NVT — Canonical (constant temperature, Berendsen thermostat)
  • NPT — Isothermal-isobaric (constant T and P)
  • Minimize — Energy minimization (CG, SD, FIRE)

Force Field Settings

Auto-configured based on potential type:

PotentialPair StyleKspaceBond/Angle
Force Fieldlj/charmm/coul/longPPPMAuto
CHARMMlj/charmm/coul/longPPPMharmonic
OPLS-AAlj/charmm/coul/longPPPMharmonic
EAMeam/alloyNoneN/A
TersofftersoffNoneN/A

Common Issues & Fixes

Issue: "Pair style mismatch with data file"

Cause: Data file has bonds but script uses atom_style=atomic Fix: Change atom_style to "full" or "molecular"

Issue: "PPPM setup error"

Cause: Using PPPM without charged atoms or with non-periodic boundary Fix: Remove kspace_style or set boundary to periodic (ppp)

Issue: "Minimize never converges"

Cause: Energy tolerance (etol) too small or maxiter too low Fix: Increase etol to 1e-4 or maxiter to 50000

Issue: "Temperature oscillates wildly in NVT"

Cause: Thermostat damping too large or timestep too large Fix: Reduce timestep or adjust thermostat Tdamp parameter

Example Workflows

Minimize LJ fluid

Structure (PDB) → MD Minimize Node
  - Potential: Lennard-Jones
  - Min Style: CG
  - Max Iter: 10000
  - Etol: 1e-6
→ Output: trajectory.dump, system_minimized.data

Pack and relax water

Water molecule (PDB) → MD Minimize Node
  - Packmol: enabled (100 molecules, 1.0 g/cm³)
  - Force Field: GAFF2
  - Charge: Gasteiger
  - Min Style: FIRE
  - Etol: 1e-4
→ Output: packed structure, minimized trajectory

NVT MD for protein

Protein structure (PDB) → MD Node
  - Force Field: OPLS-AA
  - Ensemble: NVT
  - Temperature: 300 K
  - Steps: 100000
  - Timestep: 1.0 fs
→ Output: trajectory.dump, thermodynamic data

Validation Checklist

Before running MD:

  • Data file has atoms matching atom_style
  • Pair style compatible with potential type
  • Bonds/angles only if molecule or full atom_style
  • Kspace only if periodic (ppp) with charged atoms
  • Timestep < 5 fs (1 fs typical for all-atom)
  • Thermo freq < total steps
  • Dump freq for trajectory output
  • Temperature/pressure values reasonable
  • Min_style and tolerances set for minimization

References

Signals

GitHub stars
196
Forks
23
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
lammps-validate
Source
github.com/hello-qm/catgo-lrg