Workflow’s Guide For AiiDA¶
Creating new workflows¶
New user specific workflows should be put in
aiida/workflows/user. If the
workflow is general enough to be of interest for the community, the best is to
create a git repository (e.g. on GitHub) and clone
the content of the repository in a subfolder of
aiida/workflows/user/epfl_theos for workflows from the group THEOS at EPFL.
__init__.py files in all subdirectories of
to be able to import any workflows. Also, it may be a good
idea to create a specific workflow factory to load easily workflows of the subdirectory.
To do so place in your
__init__.py file in the main workflow directory
aiida/workflows/user/epfl_theos/__init__.py in the example above):
from aiida.orm.workflow import Workflow def TheosWorkflowFactory(module): """ Return a suitable Workflow subclass for the workflows defined here. """ from aiida.common.pluginloader import BaseFactory return BaseFactory(module, Workflow, "aiida.workflows.user.epfl_theos")
In this example, a workflow located in e.g.
can be loaded simply by typing:
The class name of the workflow should be compliant with the
syntax. In the above example, it should be called
the workflow factory won’t work.
You can also customize your verdi shell by adding this function to the modules to be loaded automatically – see here for more information.