amep.reader.LammpsReader#

class amep.reader.LammpsReader(directory: str, savedir: str, start: float = 0.0, stop: float = 1.0, nth: int = 1, dumps: str = 'dump*.txt', trajfile: str = 'traj.h5amep', deleteold: bool = False, verbose: bool = False)#

Bases: BaseReader

Reads LAMMPS simulation data and writes it to an hdf5 file.

__init__(directory: str, savedir: str, start: float = 0.0, stop: float = 1.0, nth: int = 1, dumps: str = 'dump*.txt', trajfile: str = 'traj.h5amep', deleteold: bool = False, verbose: bool = False) None#

Reader for LAMMPS simulation data in dump-file format. Requires the log.lammps file to read certain information about the simulation parameters.

Parameters:
  • directory (str) – Simulation directory.

  • savedir (str) – Directory in which the trajectory file will be stored.

  • start (float, optional) – Start reading data from this fraction of the whole trajectory. The default is None.

  • stop (float, optional) – Stop reading data from this fraction of the whole trajectory. The default is None.

  • nth (int, optional) – Read each nth dump file. The default is None.

  • dumps (str, optional) – File name of the dump files. The default is ‘dump*.txt’.

  • trajfile (str, optional) – Name of the hdf5 trajectory file that is created when an object of this class is initialized. The default is TRAJFILENAME.

  • deleteold (bool, optional) – If True, an existing old h5amep trajectory file #<trajfile> will be removed. The default is False.

  • verbose (bool, optional) – If True, runtime information is printed. The default is False.

Return type:

None.

Methods

__init__(directory, savedir[, start, stop, ...])

Reader for LAMMPS simulation data in dump-file format.

Attributes

d

dt

filename

The path to the HDF5-file that contains the writers data.

nth

savedir

start

steps

The array of simulation steps for each saved frame.

stop

times

The array of physical times for each saved frame.

property filename: Path#

The path to the HDF5-file that contains the writers data.

property steps: ndarray#

The array of simulation steps for each saved frame.

The simulation steps are also used to index the frame data in the HDF5-File.

property times#

The array of physical times for each saved frame.