aiida_crystal17.workflows.crystal_main package


aiida_crystal17.workflows.crystal_main.base module

class aiida_crystal17.workflows.crystal_main.base.CryMainBaseWorkChain(*args, **kwargs)[source]

Bases: aiida.engine.processes.workchains.restart.BaseRestartWorkChain

Workchain to run a standard CRYSTAL17 calculation, with automated error handling and restarts.

Construct the instance.

_abc_impl = <_abc_data object>
_calc_namespace = 'cry'
_error_handler_entry_point = 'aiida_crystal17.workflow_error_handlers.main.base'

In the case of UNCONVERGED_SCF, decrease the function mixing and restart from the last recorded configuration.


In the case of UNCONVERGED_GEOMETRY, restart from the last recorded configuration.


In the case of ERROR_OUT_OF_WALLTIME, restart from the last recorded configuration.


Calculations with an exit status below 400 are unrecoverable, so abort the work chain.


alias of aiida_crystal17.calculations.cry_main.CryMainCalculation

defaults = {'delta_factor_fmixing': 0.8, 'fmixing': 30}
classmethod define(spec: aiida.engine.processes.process_spec.CalcJobProcessSpec)[source]

Define the process specification.


Prepare the inputs for the next calculation.

If a restart_calc has been set in the context, its remote_folder will be used as the wf_folder input for the next calculation.

report_error_handled(calculation, action)[source]

Report an action taken for a calculation that has failed.

This should be called in a registered error handler if its condition is met and an action was taken.

  • calculation – the failed calculation node

  • action – a string message with the action taken


Call the setup of the BaseRestartWorkChain, and then create the inputs dictionary in self.ctx.inputs.

This self.ctx.inputs dictionary will be used by the BaseRestartWorkChain to submit the calculations in the internal loop.


Validate the inputs related to basis sets.

Either the basis sets should be defined explicitly in the basissets namespace, or alternatively, a family can be defined in basis_family that will be used together with the input StructureData to generate the required mapping.


Validate inputs that might depend on each other and cannot be validated by the spec.

Also define dictionary inputs in the context, that will contain the inputs for the calculation that will be launched in the run_calculation step.


Validate the inputs related to the resources.

One can omit the normally required options.resources input for the PwCalculation, as long as the input automatic_parallelization is specified. If this is not the case, the metadata.options should at least contain the options resources and max_wallclock_seconds, where resources should define the num_machines.

aiida_crystal17.workflows.crystal_main.base._validate_kpoint_distance(float_data, _)[source]

Module contents