Installation of AiiDA-FLEUR

Warning

Some steps of this notebook will change the default AiiDA configuration. If you do not finish this notebook you might end up with a broken config and thus non functional examples in other parts of the tutorial. Please see the comment at the end of the notebook in this case.

Objectives

  • Create a minimal AiiDA and aiida-fleur installation.
  • Learn how to choose the FLEUR/inpgen executable used by aiida-fleur.

Introduction

While the full installation of AiiDA is beyond our scope here and we would like to urge FLEUR users to study the AiiDA documentation for this purpose, we will demonstrate here a simple path towards a minimal AiiDA setup as used in this tutorial as well.

Minimal installation

A minimal AiiDA + aiida-fleur installation can be achieved by installing the python packages aiida-core and aiida-fleur, e.g. using pip. Particularly simple is the install using pipx were a single command like

pipx install --include-deps aiida-fleur

is sufficient to install the required software and make the executables aiida-fleur and verdi available.

Note

Such a minimal installation provides the functionality discussed here in the tutorial, but e.g. it does not include the possibility to run the aiida demon for asynchronous execution.

In addition to installing the required software, you also have to set up AiiDA in order to use it. This usually means that you

  • specify how AiiDA stores its data, e.g. if it should use a postgres database server or an inbuilt sqlite.
  • specify/configure the computer you want to use for calculations.
  • install the codes to use.

Recently, a very simple and basic setup option was introduced, that provides you with a working configuration by just issuing the command:

verdi presto

As you can see, this configures AiiDA and the local computer.

What remains is the installation of codes into AiiDA. For FLEUR usage, you need to install two codes, FLEUR itself and the inpgen executable.

Codes are installed using the verdi code group of commands.

To reinstall the local version of FLEUR we use: verdi code create core.code.installed

And enter the following:

Computer: localhost
Filepath executable: /usr/bin/fleur_MPI
Label: fleur
Description []: local fleur with HDF5
Default `CalcJob` plugin: fleur.fleur
Escape using double quotes [y/N]: N

In addition, we can add additional commands to the job script AiiDA will use. Two editor windows will pop up, but here we do not need any such commands, so we can simply close these again.

Note

Please use a Description which contains the word HDF5 if your FLEUR executable is compiled with HDF5. This is required for the aiida-fleur plugin to identify the correct input/output files

The same verdi code create core.code.installed command must then be repeated for inpgen:

Computer: localhost
Filepath executable: /usr/bin/inpgen
Label: inpgen
Description []: local ingen
Default `CalcJob` plugin: fleur.inpgen
Escape using double quotes [y/N]: N
As these command run interactively, you have to execute them in a proper terminal and not in this notebook

To see the newly installed codes we can now do a

verdi code list

Select codes to be used by aiida-fleur

In addition to installing the codes into AiiDA, we also have to make sure that the aiida-fleur command line interface chooses the correct codes. While there is some logic to select the correct code automatically, we can also use aiida-fleur config which has to be executed in the terminal again.

Learn more

This tutorial can only give a short glimpse on the possible setup of AiiDA. In particular, more complex use cases will require to set up a database and a messaging server. Also, you might have to install remote computers with codes installed on them. To learn this, please visit

  • https://aiida.readthedocs.io/projects/aiida-core/en/stable/
  • https://aiida-fleur.readthedocs.io/en/latest/

Resetting the profile

As we created a new profile which might want to switch back to the old profile.

verdi profile set-default presto