aiida_lammps.parsers.parse_raw
#
Set of functions to parse the unformatted raw files generated by lammps
Submodules#
Package Contents#
Functions#
|
Read the yaml file with the global final data. |
|
Parse the lammps output file file, this is the redirected screen output. |
|
Generate a structure from the atomic positions at a given step. |
|
Parse a LAMMPS Trajectory file, yielding data for each time step. |
|
Parse a given trajectory step |
- aiida_lammps.parsers.parse_raw.parse_final_data(filename: str | None = None, file_contents: str | None = None) dict [source]#
Read the yaml file with the global final data.
The final iteration for each of computed variables is sotred into a yaml file which is then read and stored as a dictionary.
- aiida_lammps.parsers.parse_raw.parse_outputfile(filename: str | None = None, file_contents: str | None = None) dict | dict [source]#
Parse the lammps output file file, this is the redirected screen output.
This will gather the time dependent data stored in the output file and stores it as a dictionary. It will also gather single quantities and stores them into a different dictionary.
- aiida_lammps.parsers.parse_raw.create_structure(trajectory_block: collections.namedtuple, symbol_field: str = 'element', position_fields: tuple = ('x', 'y', 'z'), original_structure: aiida.orm.StructureData = None) aiida.orm.StructureData [source]#
Generate a structure from the atomic positions at a given step.
- Parameters:
trajectory_block (namedtuple) – block with the trajectory information
symbol_field (str, optional) – field name where the element symbols are found, defaults to ‘element’
position_fields (tuple, optional) – name of the files where the positions are found, defaults to (‘x’, ‘y’, ‘z’)
original_structure (orm.StructureData, optional) – original structure of the calculation, defaults to None
- Raises:
ValueError – if the symbols of the structure and of the trajectory info differ
NotImplementedError – If the boundary conditions are not periodic or free
- Returns:
structure of the current time step
- Return type:
orm.StructureData
- aiida_lammps.parsers.parse_raw.iter_trajectories(file_obj)[source]#
Parse a LAMMPS Trajectory file, yielding data for each time step.