Writing workflows

A workflow in AiiDA is a process that can call other workflows and calculations to encode the logic of a typical scientific workflow. Currently, there are two ways of implementing a workflow process: work functions and work chains. In this section you will learn how to write both, as well as deal with more advanced topics such as debugging, input validation and error handling.

A short module on how to write the basic type of workflows in AiiDA: work functions. The module also revises the usage of calculation functions to add simple Python functions to the provenance.

A step-by-step introduction to the basics of writing work chains in AiiDA. After completing this module, you will be ready to start writing your own scientific workflows!

When writing your own work chain, things are bound to go wrong! Here we list some common issues with AiiDA work chains, what to expect, and how to debug them.

A fully explained real-world work chain implemented in AiiDA, that can be used an example to start writing your own work chain.

Work chains are designed to be modular and reusable. This how-to from the AiiDA documentation explains how to efficiently extend our work chains.

This module explains how to deal with errors in AiiDA workflows, and how to automatically recover from issues that occur for your calculations.

Under construction 🔨

Here we explain how to write a validator that can check inputs before running a calculation or workflow.