aim2dat.aiida_workflows.utils

Common functions used by several work chains.

Module Contents

Functions

concatenate_workflow_results(workflow_results1, ...[, ...])

Concatenate two results pandas data frames.

create_aiida_node(value[, node_type])

Create AiiDA data node from standard python variable.

create_surface_slab(surface, nr_layers, parameters)

Create surface slab from surface data.

get_results_cp2k_legacy_wc(aiida_group_labels)

Get results from the depreciated ElectronicProperties work chain.

obtain_value_from_aiida_node(aiida_node)

Obtain value from AiiDA data node.

seekpath_structure_analysis(structure, parameters)

Wrap the seekpath function to be used as a calcfunction.

workflow_queue(maxrun_workflows, running_workflows_list)

Helper-function to control the number of workchains run simultaneously. The function is

aim2dat.aiida_workflows.utils.concatenate_workflow_results(workflow_results1, workflow_results2, map_result1='optimized_structure', map_result2='parent_node')[source]

Concatenate two results pandas data frames.

Parameters:
  • workflow_results1 (pandas.DataFrame) – Pandas data frame of the first workflow.

  • workflow_results2 (pandas.DataFrame) – Pandas data frame of the second workflow.

  • map_result1 (str (optional)) – Result used to connect the two workflows.

  • map_result2 (str (optional)) – Result used to connect the two workflows.

Returns:

pandas.DataFrame – New pandas data frame representing results from both workflows.

aim2dat.aiida_workflows.utils.create_aiida_node(value, node_type=None)[source]

Create AiiDA data node from standard python variable.

Parameters:
  • value (variable) – Input variable.

  • node_type (str (optional)) – AiiDA node type. The default value is None.

Returns:

aiida_node (variable) – AiiDA data node.

aim2dat.aiida_workflows.utils.create_surface_slab(surface, nr_layers, parameters)[source]

Create surface slab from surface data.

aim2dat.aiida_workflows.utils.get_results_cp2k_legacy_wc(aiida_group_labels)[source]

Get results from the depreciated ElectronicProperties work chain.

Parameters:

aiida_group_labels (str or list) – AiiDA group label or list of labels.

Returns:

pandas.DataFrame – Data frame containing the results of the workflow.

aim2dat.aiida_workflows.utils.obtain_value_from_aiida_node(aiida_node)[source]

Obtain value from AiiDA data node.

Parameters:

aiida_node (aiida.node) – AiiDA data node.

Returns:

value (variable) – Content of the node.

aim2dat.aiida_workflows.utils.seekpath_structure_analysis(structure, parameters)[source]

Wrap the seekpath function to be used as a calcfunction.

aim2dat.aiida_workflows.utils.workflow_queue(maxrun_workflows, running_workflows_list, waiting_time=10.0)[source]

Helper-function to control the number of workchains run simultaneously. The function is called in a loop after the workchain has been submitted.

Parameters:
  • maxrun_workflows (int) – Maximum number of workchains run in parallel.

  • running_workflows_list (list) – List of workchain-nodes that have been started.

  • waiting_time (float (optional)) – Time to wait between submissions in minutes. The default value is 10.0.