:py:mod:`aiida_lammps.workflows.relax`
======================================

.. py:module:: aiida_lammps.workflows.relax

.. autoapi-nested-parse::

   Workflow for the relaxation of a structure using the minimization procedure in LAMMPS.



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

Classes
~~~~~~~

.. autoapisummary::

   aiida_lammps.workflows.relax.LammpsRelaxWorkChain




.. py:class:: LammpsRelaxWorkChain(inputs: dict | None = None, logger: logging.Logger | None = None, runner: aiida.engine.runners.Runner | None = None, enable_persistence: bool = True)


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

   Workchain to relax a structure using the LAMMPS minimization procedure.

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

      Define the process specification


   .. 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:: _validate_relaxation_algorithms(value, ctx) -> Union[str, None]
      :classmethod:

      Validate the algorithm used for the relaxation of the structure


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

      Validate that the pressure dictionary does not have entries that are not permitted


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

      Validate the global inputs of the calculation


   .. py:method:: setup()

      Setting up the context for the calculation


   .. py:method:: _generate_minimize_block() -> aiida.common.AttributeDict

      Generate the minimization block for the parameters


   .. py:method:: _generate_fix_box_relax() -> list

      Generate the parameters needed for the fix box/relax depending on the inputs given.

      :return: list with the information about fix the box/relax
      :rtype: list


   .. py:method:: _update_fix_parameters(key: str, value: list)

      Update the fix dictionary to take into account the cases in which it might not exits

      :param key: type of fix to be added
      :type key: str
      :param value: list containing the fix parameters
      :type value: list


   .. py:method:: should_run_relax()

      Return whether a relaxation workchain should be run


   .. py:method:: run_relax()

      Run the `LammpsBaseWorkChain` to run a relax `LammpsBaseCalculation`


   .. py:method:: inspect_relax()

      Check the current state of the relaxation


   .. py:method:: results()

      Attach the output parameters and structure of the last workchain to the outputs.



