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.

Parameters

filename (str) – path to log file

Variables
  • 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

Parameters

filename (str) – path to ave/chunk file

Variables
  • 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