Workchains

AiiDA utilizes the concept of a Workchain as a building block to creating more complex workflows. AiiDA-VASP honours this. The idea is that the workchains should be modular such that one can pick what is needed and build a workflow that suits the problem at hand. Similar to Calculation, the Workchain is a special class in AiiDA that is derived from a Process class.

A Workchain can be loaded by utilizing the WorkflowFactory:

$ some_workchain = WorkflowFactory('<plugin_namespace>.<workchain_name>')

from the verdi shell. If you want to load it from a python script, please have a look at verdi_shell. The <plugin_namespace> is always vasp for the AiiDA-VASP plugin. The <workchain_name> is the name of the file containing the module. For instance, for the VASP workchain we would issue:

$ vasp_workchain = WorkflowFactory('vasp.vasp')

Workchains should be placed in the aiida_vasp/workchains folder.

AiiDA-VASP is delivered with several preconstructed workchains to perform dedicated tasks and we believe these, instead the the Calculations should be the main entry point for users. They are currently:

  • vasp.vasp

  • vasp.relax

  • vasp.converge

  • vasp.bands

  • vasp.master

where are explained as follows.

VASP workchain

This performs the low level interactions with the VASP calculation and is accessible by utilizing the WorkflowFactory with the key vasp.vasp. For additional details on how to interact with this workchain, see VASP workchain.

Relaxation workchain

This handles the process of relaxing the structure and calls VASP workchain. For additional details on how to interact with this workchain, see Relax workchain.

Convergence workchain

This checks the k-point grid and plane wave cutoff for convergence on selected parameters and calls Relaxation workchain. For additional details on how to interact with this workchain, see Converge workchain. We consider this the main entrypoint for a regular calculation with VASP.

Bands workchain

This enables the calculation of electronic band structures by standardizing the selected paths in reciprocal space using SeeKpath. This internally calls the VASP workchain. For additional details on how to interact with this workchain, see Bands workchain. If a user wants to calculate the electronic band structure, they should use the MasterWorkChain as the main entry point.

Master workchain

The idea of this workchain is to ultimately be the main entry point, such that a user can select what properties to be calculated. Then the master workchain composes a workflow to enable such extraction. Currently only the calculation of the electronic band structure is enabled. But this serves as a nice introductory example that can be easily expanded and calls any relevant workchain, depending on the chosen input parameters.