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

.. py:module:: aiida_lammps.calculations.base

.. autoapi-nested-parse::

   A basic plugin for performing calculations in ``LAMMPS`` using aiida.

   The plugin will take the input parameters validate them against a schema
   and then use them to generate the ``LAMMPS`` input file. The input file
   is generated depending on the parameters provided, the type of potential,
   the input structure and whether or not a restart file is provided.



Module Contents
---------------

Classes
~~~~~~~

.. autoapisummary::

   aiida_lammps.calculations.base.LammpsBaseCalculation




.. py:class:: LammpsBaseCalculation(*args, **kwargs)


   Bases: :py:obj:`aiida.engine.CalcJob`

   A basic plugin for performing calculations in ``LAMMPS`` using aiida.

   The plugin will take the input parameters validate them against a schema
   and then use them to generate the ``LAMMPS`` input file. The input file
   is generated depending on the parameters provided, the type of potential,
   the input structure and whether or not a restart file is provided.

   .. py:attribute:: _DEFAULT_VARIABLES
      :type: ClassVar[dict[str, str]]

      

   .. py:attribute:: _POTENTIAL_FILENAME
      :value: 'potential.dat'

      

   .. py:attribute:: _default_symlink_usage
      :value: True

      

   .. py:method:: define(spec)
      :classmethod:

      Define the process specification, including its inputs, outputs and known exit codes.

      Ports are added to the `metadata` input namespace (inherited from the base Process),
      and a `code` input Port, a `remote_folder` output Port and retrieved folder output Port
      are added.

      :param spec: the calculation job process spec to define.


   .. py:method:: _validate_inputs(value, ctx) -> Union[str, None]
      :classmethod:

      Validate the top-level inputs namespace.


   .. py:method:: _validate_settings(value, ctx) -> Union[str, None]
      :classmethod:

      Validate the ``settings`` input.


   .. py:method:: _validate_parameters(value, ctx) -> Union[str, None]
      :classmethod:

      Validate the input parameters and compares them against a schema.

      Takes the input parameters dictionaries that will be used to generate the
      LAMMPS input parameter and will be checked against a schema for validation.


   .. py:method:: prepare_for_submission(folder)

      Create the input files from the input nodes passed to this instance of the `CalcJob`.


   .. py:method:: handle_restartfiles(settings: dict, parameters: dict) -> dict

      Get the information needed to handle the restartfiles

      :param settings: Additional settings that control the ``LAMMPS`` calculation
      :type settings: dict
      :param parameters: Parameters that control the input script generated for the ``LAMMPS`` calculation
      :type parameters: dict
      :raises aiida.common.exceptions.InputValidationError: if the name of the given restart file is not in the             remote folder
      :return: dictionary with the information about how to handle the restartfile either for parsing,             storage or input
      :rtype: dict



