Skip to content

Lammps Log Handler Engine Utility

Parse LAMMPS log.lammps thermo output into normalized run payloads.

This module wraps lammps.formats.LogFile loading and normalizes its run tables into NumPy-backed dictionaries for adapter consumption. It is focused on log parsing only and does not parse trajectory dump files.

Usage context

  • Simulation ingestion: Used by the LAMMPS adapter to build SimulationData.
  • Thermo selection: Chooses the most informative run (prefers Density).
  • Diagnostics: Preserves parser-reported error messages from log parsing.

Class: LAMMPSLogHandler

Reader for log.lammps files using lammps.formats.LogFile.

Method: read

Parse log.lammps and return runs/errors plus a selected thermo table.

Returns:

Type Description
dict[str, object]

Dictionary with keys: - runs: list of normalized run tables - errors: parser-reported error messages - thermo: selected representative thermo table

Examples:

payload = LAMMPSLogHandler("log.lammps").read()
thermo = payload["thermo"]