narupatools.lammps.simulation

Wrapper around LAMMPS simulation.

Functions

catch_lammps_warnings_and_exceptions

Capture output and raises logged warnings and errors in a pythonic way.

narupatools.lammps.simulation.catch_lammps_warnings_and_exceptions()Generator[None, None, None]

Capture output and raises logged warnings and errors in a pythonic way.

Any line starting with ‘WARNING: ‘ will be raised as a LAMMPSWarning, except certain warnings which are instead treated as errors.

Any line starting with ‘ERROR:’ will be raised as a LAMMPSError, unless a more specific error message exists.

Raises
  • AtomIDsNotDefinedError – Library error raises in gather/scatter atoms.

  • LAMMPSError – An ERROR: is logged to the console by LAMMPS.

Classes

Compute(*, simulation, group, name, style)

Represents a compute defined in a LAMMPS simulation.

LAMMPSSimulation(lammps, universe)

Wrapper around a LAMMPS simulation.