Log

class atomman.lammps.Log(log_info: str | IOBase | None = None)

Bases: object

Object for representing a LAMMPS log output

flatten(style: str = 'last', firstindex: int | None = None, lastindex: int | None = None) Simulation

Combines multiple simulations into one.

Parameters:
  • style (str, optional) – Specifies how duplicate time step values are handled, i.e which values to keep: ‘first’ uses the values from the earliest simulation. ‘last’ uses the values from the latest simulation (default). ‘all’ uses all reported lines including ones with duplicate time steps.

  • firstindex (int or None, optional) – The leading list range index to limit which simulations are included in the merge, i.e. simulations[firstindex:lastindex].

  • lastindex (int or None, optional) – The trailing list range index to limit which simulations are included in the merge, i.e. simulations[firstindex:lastindex].

Returns:

A Simulation object containing the condensed thermo data.

Return type:

Simulation

property lammps_date: date

The date associated with the LAMMPS version used.

Type:

datetime.date

property lammps_version: str

The LAMMPS version used.

Type:

str

read(log_info: str | IOBase, append: bool = True)

Parses a LAMMPS screen output/log file.

Parameters:
  • log_info (str or file-like object) – The LAMMPS log content to read in.

  • append (bool, optional) – Flag indicating if the content being read in is appended to the current data (True, default), or if it overwrites any existing saved content (False).

property simulations: List[dict]

parsed data for each separate LAMMPS run/minimize action

Type:

list of dict