class LammpsDump(timestep, natoms, box, data)[source]

Bases: monty.json.MSONable

Object for representing dump data for a single snapshot.

Base constructor.

  • timestep (int) – Current timestep.
  • natoms (int) – Total number of atoms in the box.
  • box (LammpsBox) – Simulation box.
  • data (pd.DataFrame) – Dumped atomic data.

A JSON serializable dict representation of an object.

classmethod from_dict(d)[source]
classmethod from_string(string)[source]

Constructor from string parsing.

Parameters:string (str) – Input string.

Generator that parses dump file(s).

Parameters:file_pattern (str) – Filename to parse. The timestep wildcard (e.g., dump.atom.’*’) is supported and the files are parsed in the sequence of timestep.
Yields:LammpsDump for each available snapshot.

Parses log file with focus on thermo data. Both one and multi line formats are supported. Any incomplete runs (no “Loop time” marker) will not be parsed.


SHAKE stats printed with thermo data are not supported yet. They are ignored in multi line format, while they may cause issues with dataframe parsing in one line format.

Parameters:filename (str) – Filename to parse.
Returns:[pd.DataFrame] containing thermo data for each completed run.