aiida-optimize
AiiDA Plugin for running optimization algorithms.
General information
Registry checks
Plugins provided
Entry points
-
optimize.optimize
class:aiida_optimize._optimization_workchain:OptimizationWorkChainRuns an optimization procedure, given an optimization engine that defines the optimization algorithm, and a process which evaluates the function to be optimized.
Input Required Valid types Description enginetrue StrEngine that runs the optimization. engine_kwargstrue DictKeyword arguments passed to the optimization engine. evaluate_processtrue StrProcess which produces the result to be optimized. evaluatefalse Inputs that are passed to all evaluation processes. metadatafalse Output Required Valid types Description optimal_process_outputtrue Output value of the optimal evaluation process. optimal_process_uuidtrue UUID of the optimal evaluation process. engine_outputsfalse optimal_process_inputfalse Input value of the optimal evaluation process. Exit status Message 1 The process has failed with an unspecified error. 2 The process failed with legacy failure mode. 10 The process returned an invalid output. 11 The process did not register a required output. 201 Optimization failed because one of the evaluate processes did not finish ok. 202 Optimization failed because the engine did not finish ok. -
optimize.wrappers.add_inputs
class:aiida_optimize.wrappers._add_inputs:AddInputsWorkChainWrapper workchain that takes inputs as keys and values and passes it on to a sub-process. This enables taking a process which was not designed to be used in optimization, and optimize with respect to some arbitrary input. Inputs which always remain the same can be specified in the ``inputs`` namespace, whereas the inputs to be optimized are given through the ``added_input_keys`` and ``added_input_values`` inputs. The outputs of the wrapper workchain are the same as those of the wrapped process. The "added" inputs can only be BaseType sub-classes, or attributes of a Dict. For each input, its port location is given in the "added_input_keys" input. For example, ``x.y`` would set the ``y`` input in the ``x`` namespace. For cases where the input is a Dict attribute, the (possibly nested) attribute name is given after a colon. That means ``x:a.b`` would set the ``['a']['b']`` attribute of the ``Dict`` given in the ``x`` input. In cases where only a single input needs to be added, they can be specified directly instead of wrapped in a List.
Input Required Valid types Description added_input_keystrue List, StrSpecifies the location of each added input. added_input_valuestrue List, BaseTypeValues of the added inputs to be passed into the sub-process. sub_processtrue StrThe class of the process that should be wrapped. inputsfalse Inputs to be passed on to the sub-process. metadatafalse Exit status Message 1 The process has failed with an unspecified error. 2 The process failed with legacy failure mode. 10 The process returned an invalid output. 11 The process did not register a required output. 201 Workchain failed because the sub-process did not finish ok. -
optimize.wrappers.concatenate
class:aiida_optimize.wrappers._concatenate:ConcatenateWorkChainAllows concatenating an arbitrary number of sub-processes. A wrapper workchain that allows concatenating an arbitrary number of sub-processes. Outputs of one processes can be configured to be passed to the next one.
Input Required Valid types Description output_input_mappingstrue ListDefines how inputs are passed between sub-processes. Each list entry entry has the form `((process_label_a, process_label_b), mapping)`, and defines outputs of process A to be passed to process B. The `mapping` values are dictionaries `{'output_name': 'input_name'}` giving the output name (in process A) and input name (in process B) for each value to pass. process_inputstrue Inputs which are passed on to the sub-processes. The inputs should be grouped into a namespace identified by the process label. process_labelstrue ListA list of pairs (label, process_name). The labels can be any string, the process_name needs to be loadable by `aiida_optimize.process_inputs.load_object`, and defines which process is being run. metadatafalse Output Required Valid types Description process_outputstrue Exit status Message 1 The process has failed with an unspecified error. 2 The process failed with legacy failure mode. 10 The process returned an invalid output. 11 The process did not register a required output. 200 Workchain failed because a sub-process failed. -
optimize.wrappers.create_evaluate
class:aiida_optimize.wrappers._create_evaluate:CreateEvaluateWorkChainWrapper workchain to combine two processes: The first process _creates_ a result, and the second _evaluates_ that result. The purpose of this workchain is to facilitate optimization of processes which don't natively produce an output that can be optimized, by only having to add the 'evaluation' part.
Input Required Valid types Description createtrue Inputs which are passed on to the create sub-process. create_processtrue StrThe sub-process which performs the create step. evaluate_processtrue StrThe sub-process which performs the evaluate step. output_input_mappingtrue DictA mapping from output names of the create process to input names of the evaluate process. These outputs (if present) are forwarded to the evaluate process. evaluatefalse Inputs which are passed on to the evaluate sub-process. metadatafalse Output Required Valid types Description createtrue evaluatetrue Exit status Message 1 The process has failed with an unspecified error. 2 The process failed with legacy failure mode. 10 The process returned an invalid output. 11 The process did not register a required output. 201 Workchain failed because the 'create' sub-process failed. 202 Workchain failed because the 'evaluate' sub-process failed.