aiida_lammps.parsers.base#

Base parser for LAMMPS calculations.

It takes care of parsing the lammps.out file, the trajectory file and the yaml file with the final value of the variables printed in the thermo_style.

Module Contents#

Classes#

LammpsBaseParser

Base parser for LAMMPS calculations.

class aiida_lammps.parsers.base.LammpsBaseParser(node)[source]#

Bases: aiida.parsers.parser.Parser

Base parser for LAMMPS calculations.

It takes care of parsing the lammps.out file, the trajectory file and the yaml file with the final value of the variables printed in the thermo_style.

parse(**kwargs)[source]#

Parse the files produced by lammps.

It takes care of parsing the lammps.out file, the trajectory file and the yaml file with the final value of the variables printed in the thermo_style.

parse_restartfile(parameters: dict[str, Any], list_of_files: list[str], temp_folder: os.PathLike | str | None) str[source]#

Parse the restartfile generated by LAMMPS and store it as a node in the database.

LAMMPS can produce several restartfiles, where some are written during the simulation at regular intervals, and another that is stored at the end of the simulation.

This function tries to find which of those files are written by LAMMPS and then store them in the database as orm.SinglefileData.

Parameters:
  • parameters (dict) – set of variables for the lammps script generation

  • list_of_files (list) – list of files retrieved

  • temp_folder (Union[os.PathLike, str, None]) – name of the temporary folder where the temporary retrieved are

Returns:

Name of the found restartfile

Return type:

str

check_convergence(global_data: dict[str, Any])[source]#

Check for the convergence of the calculation in the case of a minimization run