aiida_quantumespresso.workflows.pw.relax
#
Workchain to relax a structure using Quantum ESPRESSO pw.x.
Module Contents#
Classes#
Workchain to relax a structure using Quantum ESPRESSO pw.x. |
Functions#
|
Validate the top level namespace. |
Attributes#
- aiida_quantumespresso.workflows.pw.relax.validate_inputs(inputs, _)[source]#
Validate the top level namespace.
- class aiida_quantumespresso.workflows.pw.relax.PwRelaxWorkChain(inputs: dict | None = None, logger: logging.Logger | None = None, runner: aiida.engine.runners.Runner | None = None, enable_persistence: bool = True)[source]#
Bases:
aiida_quantumespresso.workflows.protocols.utils.ProtocolMixin
,aiida.engine.WorkChain
Workchain to relax a structure using Quantum ESPRESSO pw.x.
- classmethod get_protocol_filepath()[source]#
Return
pathlib.Path
to the.yaml
file that defines the protocols.
- classmethod get_builder_from_protocol(code, structure, protocol=None, overrides=None, relax_type=RelaxType.POSITIONS_CELL, options=None, **kwargs)[source]#
Return a builder prepopulated with inputs selected according to the chosen protocol.
- Parameters:
code – the
Code
instance configured for thequantumespresso.pw
plugin.structure – the
StructureData
instance to use.protocol – protocol to use, if not specified, the default will be used.
overrides – optional dictionary of inputs to override the defaults of the protocol.
relax_type – the relax type to use: should be a value of the enum
common.types.RelaxType
.options – A dictionary of options that will be recursively set for the
metadata.options
input of all theCalcJobs
that are nested in this work chain.kwargs – additional keyword arguments that will be passed to the
get_builder_from_protocol
of all the sub processes that are called by this workchain.
- Returns:
a process builder instance with all inputs defined ready for launch.
- should_run_relax()[source]#
Return whether a relaxation workchain should be run.
This is the case as long as the volume change between two consecutive relaxation runs is larger than the volume convergence threshold value and the maximum number of meta convergence iterations is not exceeded.
- should_run_final_scf()[source]#
Return whether after successful relaxation a final scf calculation should be run.
If the maximum number of meta convergence iterations has been exceeded and convergence has not been reached, the structure cannot be considered to be relaxed and the final scf should not be run.
- inspect_relax()[source]#
Inspect the results of the last PwBaseWorkChain.
Compare the cell volume of the relaxed structure of the last completed workchain with the previous. If the difference ratio is less than the volume convergence threshold we consider the cell relaxation converged.
- run_final_scf()[source]#
Run the PwBaseWorkChain to run a final scf PwCalculation for the relaxed structure.