Skip to content

How does the engine run different node type?

Xing Wang edited this page May 4, 2024 · 4 revisions

Node types

Here are all the node types:

  • node
  • data
  • calcfunction, workfunction
  • calcjob, workchain
  • graph_builder
  • workgraph
  • normal

node

Simple load the node from the database. The executor could be load_node, load_code etc.

data

Create a data node based on the args and kwargs. the executor could be any AiiDA data class, e.g. Int, Float, Str etc.

Becareful when dealing with complex data types, e.g. Dict, KpointsData, StructureData etc. One need to set extras, repository etc.

For the moment, we use the aiida_workgraph.utils.create_data_node to create the data node. This function will automatically handle the complex data types, but not all the data types are supported.

calcfunction, workfunction

run_get_node is used to run.

calcjob, workchain

submit is used to submit.

graph_builder

First, run the executor to build the graph. Then, use submit to submit the graph.

workgraph

Recreate the workgraph from the database, and then use submit to submit the workgraph.

normal

Just run the executor.