# lammps-getting-started > This skill should be used when users ask about getting started in lammps; it prioritizes documentation references and then source inspection only for unresolved details. - Author: Tao E. Li - Repository: TEL-Research-Group/lammps - Version: 20260207223556 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-08 - Source: https://github.com/TEL-Research-Group/lammps - Web: https://mule.run/skillshub/@@TEL-Research-Group/lammps~lammps-getting-started:20260207223556 --- --- name: lammps-getting-started description: This skill should be used when users ask about getting started in lammps; it prioritizes documentation references and then source inspection only for unresolved details. --- # lammps: Getting Started ## High-Signal Playbook ### Route the request - Use `lammps-build-and-install` for compiler, package, and binary build issues. - Use `lammps-inputs-and-modeling` for force-field setup, topology, and data files. - Use `lammps-simulation-workflows` for equilibration/production/restart sequencing. - Use `lammps-parallel-hpc` for MPI/OpenMP/GPU launch tuning and scaling. - Use `lammps-troubleshooting` for lost atoms, NaN/Inf thermodynamics, and crashes. ### Triage questions - Which executable are you launching (`lmp`, `lmp_mpi`, `lmp_`)? - Which `units` and `atom_style` are required by the model? - Is the box created via `create_box`, `read_data`, or `read_restart`? - Are long-range electrostatics required (`kspace_style`)? - Which ensemble/integrator is intended (`fix nve`, `fix nvt`, `fix npt`)? - What minimum outputs are required (thermo fields, dumps, restart cadence)? ### Canonical workflow - Verify feature availability with `lmp -help` (`doc/src/Run_options.rst`). - Start scripts with `units`, `atom_style`, and `boundary` before box creation (`doc/src/units.rst`, `doc/src/atom_style.rst`, `doc/src/boundary.rst`). - Define the system with `create_box`/`read_data`/`read_restart` (`doc/src/Run_formats.rst`). - Configure pair/bonded styles and coefficients (`doc/src/pair_style.rst`, `doc/src/pair_coeff.rst`). - Set neighbor policy and timestep (`doc/src/neighbor.rst`, `doc/src/neigh_modify.rst`, `doc/src/timestep.rst`). - Initialize velocities and integrator fix (`doc/src/velocity.rst`, `doc/src/fix_nve.rst`, `doc/src/fix_nh.rst`). - Run a short sanity segment before long production (`doc/src/run.rst`, `doc/src/Run_output.rst`). ### Minimal working examples - Launch pattern (`doc/src/Run_basics.rst`): ```bash mpirun -np 4 lmp -in in.lj ``` - Small starter input (`doc/src/Run_formats.rst`): ```LAMMPS units lj atom_style atomic boundary p p p lattice fcc 0.8442 region box block 0 10 0 10 0 10 create_box 1 box create_atoms 1 box mass 1 1.0 pair_style lj/cut 2.5 pair_coeff 1 1 1.0 1.0 2.5 neighbor 0.3 bin neigh_modify every 1 delay 0 check yes velocity all create 1.0 4928459 mom yes rot yes dist gaussian fix int all nve thermo 100 run 1000 ``` ### Pitfalls - Using shell redirection (`< in.file`) under MPI; prefer `-in` (`doc/src/Run_basics.rst`). - Changing `units` or `atom_style` after box creation (not allowed) (`doc/src/units.rst`, `doc/src/atom_style.rst`). - Mixing potential/data files with incompatible units (`UNITS:` tags) (`doc/src/units.rst`, `doc/src/pair_coeff.rst`). - Missing package-enabled styles causing "invalid ... style" (`doc/src/Run_options.rst`, `doc/src/Build_package.rst`). - Overly aggressive timestep during initialization causing lost atoms (`doc/src/Errors_details.rst`). ### Convergence and validation checklist - Confirm no lost atoms and no NaN/Inf thermo values (`doc/src/Errors_details.rst`). - Check `Dangerous builds` is zero or rare (`doc/src/Run_output.rst`). - Verify short NVE segment has acceptable energy drift for chosen `dt`. - Compare key averages across different MPI counts for statistical consistency (`doc/src/Errors_common.rst`). ## Scope - Handle questions about initial setup, quickstarts, and core concepts. - Keep responses abstract and architectural for large codebases; avoid exhaustive per-function documentation unless requested. ## Primary documentation references - `doc/src/Run_basics.rst` - `doc/src/Run_options.rst` - `doc/src/Run_formats.rst` - `doc/src/Run_output.rst` - `doc/src/Build_basics.rst` - `doc/src/Build_cmake.rst` - `doc/src/units.rst` - `doc/src/atom_style.rst` - `doc/src/boundary.rst` - `doc/src/Errors_common.rst` - `doc/src/Errors_details.rst` - `examples/melt/in.melt` ## Workflow - Start with the primary references above. - If details are missing, inspect `references/doc_map.md` for additional topic documents (generated inventory plus curated anchors). - Use tutorials/examples as executable usage patterns when available. - Use tests as behavior or regression references when available. - If ambiguity remains after docs, inspect `references/source_map.md` and start with the ranked source entry points. - Cite exact documentation file paths in responses. ## Tutorials and examples - `examples` ## Test references - None discovered. ## Optional deeper inspection - `fortran` - `lib` - `python` - `src` ## Source entry points for unresolved issues - `src/main.cpp` - `src/lammps.h` - `src/lammps.cpp` - `src/input.h` - `src/input.cpp` - `src/run.h` - `src/run.cpp` - `src/modify.h` - `src/modify.cpp` - `src/read_restart.h` - `src/read_restart.cpp` - `src/write_restart.h` - `src/write_restart.cpp` - Prefer targeted source search (for example: `rg -n "" fortran lib python src`).