:py:mod:`aiida_lammps.parsers.base`
===================================

.. py:module:: aiida_lammps.parsers.base

.. autoapi-nested-parse::

   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
~~~~~~~

.. autoapisummary::

   aiida_lammps.parsers.base.LammpsBaseParser




.. py:class:: LammpsBaseParser(node)


   Bases: :py:obj:`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``.

   .. py:method:: parse(**kwargs)

      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``.


   .. py:method:: parse_restartfile(parameters: dict[str, Any], list_of_files: list[str], temp_folder: Union[os.PathLike, str, None]) -> str

      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``.

      :param parameters: set of variables for the lammps script generation
      :type parameters: dict
      :param list_of_files: list of files retrieved
      :type list_of_files: list
      :param temp_folder: name of the temporary folder where the temporary retrieved are
      :type temp_folder: Union[os.PathLike, str, None]

      :return: Name of the found restartfile
      :rtype: str


   .. py:method:: check_convergence(global_data: dict[str, Any])

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



