All plugins

aiida-optimize

AiiDA Plugin for running optimization algorithms.

status stable AiiDA >=2.0.0,<3.0.0

General information

Install pip install aiida-optimize
Author(s) Dominik Gresch
Contact greschd@gmx.ch
Python import import aiida_optimize
Latest version 1.0.2
Released 2023-03-30

Registry checks

W008: Unable to reach documentation URL: https://aiida-optimize.readthedocs.io
Click any code (W001, E001…) to jump to troubleshooting instructions .

Plugins provided

Workflows 4

Entry points

WorkChains and work functions aiida.workflows
  • optimize.optimize

    class: aiida_optimize._optimization_workchain:OptimizationWorkChain

    Runs an optimization procedure, given an optimization engine that defines the optimization algorithm, and a process which evaluates the function to be optimized.

    InputRequiredValid typesDescription
    engine true Str Engine that runs the optimization.
    engine_kwargs true Dict Keyword arguments passed to the optimization engine.
    evaluate_process true Str Process which produces the result to be optimized.
    evaluate false Inputs that are passed to all evaluation processes.
    metadata false
    OutputRequiredValid typesDescription
    optimal_process_output true Output value of the optimal evaluation process.
    optimal_process_uuid true UUID of the optimal evaluation process.
    engine_outputs false
    optimal_process_input false Input value of the optimal evaluation process.
    Exit statusMessage
    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:AddInputsWorkChain

    Wrapper 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.

    InputRequiredValid typesDescription
    added_input_keys true List, Str Specifies the location of each added input.
    added_input_values true List, BaseType Values of the added inputs to be passed into the sub-process.
    sub_process true Str The class of the process that should be wrapped.
    inputs false Inputs to be passed on to the sub-process.
    metadata false
    Exit statusMessage
    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:ConcatenateWorkChain

    Allows 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.

    InputRequiredValid typesDescription
    output_input_mappings true List Defines 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_inputs true Inputs which are passed on to the sub-processes. The inputs should be grouped into a namespace identified by the process label.
    process_labels true List A 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.
    metadata false
    OutputRequiredValid typesDescription
    process_outputs true
    Exit statusMessage
    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:CreateEvaluateWorkChain

    Wrapper 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.

    InputRequiredValid typesDescription
    create true Inputs which are passed on to the create sub-process.
    create_process true Str The sub-process which performs the create step.
    evaluate_process true Str The sub-process which performs the evaluate step.
    output_input_mapping true Dict A 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.
    evaluate false Inputs which are passed on to the evaluate sub-process.
    metadata false
    OutputRequiredValid typesDescription
    create true
    evaluate true
    Exit statusMessage
    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.