2.7. Output Readers

The Python package contains the lammps.formats module, which provides classes to post-process some of the output files generated by LAMMPS.

class lammps.formats.LogFile(filename)

Reads LAMMPS log files and extracts the thermo information

It supports the line, multi, and yaml thermo output styles.


filename (str) – path to log file

  • runs – List of LAMMPS runs in log file. Each run is a dictionary with thermo fields as keys, storing the values over time

  • errors – List of error lines in log file

class lammps.formats.AvgChunkFile(filename)

Reads files generated by fix ave/chunk


filename (str) – path to ave/chunk file

  • timesteps – List of timesteps stored in file

  • total_count – total count over time

  • chunks – List of chunks. Each chunk is a dictionary containing its ID, the coordinates, and the averaged quantities