Log

class atomman.lammps.Log(log_info: Optional[Union[str, IOBase]] = None)

Bases: object

Object for representing a LAMMPS log output

flatten(style: str = 'last') Simulation

Combines all simulations into one. The style options allow for duplicate timesteps to be overwritten.

Parameters:

style (str, optional) – Specifies which values to use for duplicate time steps: ‘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.

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: Union[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