🧠 AiiDA setup instructions

Author

Aykut Öztürk

Published

August 19, 2025

⚙️ Basic Installation

  1. python3 is already installed in the vps (Ubuntu) system, so you need to use python as alias python3:

    sudo apt update
    sudo apt install python-is-python3
  2. creating virtual environment using already existing from aiida-core, which you can clone from the github (https://github.com/aiidateam/aiida-core.git):

    python3 -m venv aiida-venv
    source ~/aiida-core/aiida-venv/bin/activate
  3. install&upgrade pip

    sudo apt install python3-pip
    pip install --upgrade pip
  4. install aiida-core

    pip install .
  5. install some external packages if necessary; atomic_tools are useful tools for atomistic simulations that AiiDA uses for converting, generating, or visualizing structures:

    pip install aiida-core[atomic_tools,docs]
  6. install ‘RabbitMQ’

    sudo apt install rabbitmq-server
  7. create a profile, I used core.sqlite_dos storage plugins type, due to simplicity and adequate to my purpose which is not performance related calculations:

    verdi profile setup core.sqlite_dos
  8. check the status:

     verdi status
     verdi daemon start
  • you will see some warning when you check the status of your connection with the command “verdi status”, the warnings:

    Warning: RabbitMQ v3.12.1 is not supported and will cause unexpected problems! Warning: It can cause long-running workflows to crash and jobs to be submitted multiple times. Warning: See https://github.com/aiidateam/aiida-core/wiki/RabbitMQ-version-to-use for details.

  1. you can get rid of this warning by applying these steps:
  • Become the root user (sudo su root)

  • Create /etc/rabbitmq/advanced.config with content

    sudo su root
    nano /etc/rabbitmq/advanced.config
  • Add:

       %% advanced.config
       [
       {rabbit, [
       {consumer_timeout, undefined}
       ]}
       ].
  • Restart RabbitMQ:

    service rabbitmq-server restart
  • Check that the configuration was properly picked up

    sudo rabbitmqctl environment | grep consumer_timeout
    sudo rabbitmq-diagnostics status
  • Finally, run rabbitmq-diagnostics status (you may need to open a new terminal first) and check that your new configuration file is listed under the “Config files” section.

  • Once RabbitMQ is properly configured, the warning of the version that is not supported can be suppressed through (you need to change the user from root to your user and activate the virtual env) and give the last comment which is below:

    verdi config set warnings.rabbitmq_version false

🌐 SSH Connection

  1. create a passwordless SSH key

    ssh-keygen -t rsa -b 4096 -f ~/.ssh/aiida
  2. Copy the public key to the remote machine, normally this will add the public key to the remote machine’s “~/.ssh/authorized_keys”

    ssh-copy-id -i ~/.ssh/aiida user@remote.host
  3. Add the following lines to your ~/.ssh/config file (or create it, if it does not exist) –> just write the command “nano ~/.ssh/config” and add lines as:

      Host tub
      HostName cluster.math.tu-berlin.de
      User oeztuerk
      IdentityFile ~/.ssh/aiida
  4. Finally, if you are planning to use a batch scheduler on the remote computer, try also:

    ssh tub squeue

🖥️ Computer Setup

  1. computer yaml file:
  • Computer means not a PC in AiiDA setup, but an abstraction that defines a remote or local computational resource where jobs will be executed.

      ---
      label: "Computer-70"
      hostname: "cluster.math.tu-berlin.de"
      transport: "core.ssh"
      scheduler: "core.slurm"
      work_dir: "/work/oeztuerk/static_epsilon/AiiDA/"
      mpirun_command: "mpirun -np {tot_num_mpiprocs}"
      mpiprocs_per_machine: "2"
      prepend_text: |
      ---
  1. instead of writing same setup details every time, you can use yaml file:

    verdi computer setup --config computer.yml
  2. connect the compuer to ssh connection:

    verdi -p group_name computer configure core.ssh "computer_name"
  3. check if you see the setup computer on the computer list:

    verdi computer list
  4. if you want to see details:

    verdi computer show Computer-70
  5. if you want to relabel:

    verdi computer rename old_label new_label
  6. for more commands about computer:

    verdi computer delete computer_label

🧩 Code Setup

  1. for each calculation you need separate codes

  2. again you can use the yaml file to setup the code which is easy:

    verdi code create core.code.installed --with-mpi --config code-pw.yml
  3. yaml file:

      ---
      label: 'qe-7.3.1-pw'
      description: 'quantum_espresso v7.3.1-pw.x'
      default_calc_job_plugin: 'quantumespresso.pw'
      filepath_executable: '/work/oeztuerk/Build/qe-7.3.1/bin/pw.x'
      computer: 'Computer-70'
      prepend_text: |
        module unload ompi intel pgi
        module load intel/2019.3 ompi/intel/4.0.4 fftw/3.3.9.intel-ompi404 hdf5/1.8.21.intel
        export LD_LIBRARY_PATH=/work/oeztuerk/Applications/libxc-6.2.2/lib:$LD_LIBRARY_PATH
      append_text: |
      ---
  4. after you create the code, check “verdi code list”, you should see the code is created as:

Figure 1: A screen snipped is showing the registered code as example in the computer.
  1. please check for further commands:

    verdi code --help

📦 Installing Other Modules

Install the following AiiDA plugins:

git clone <module-url>
cd module-directory
pip install -e .
Suggested modules:
  • aiida-quantumespresso
  • aiida-wannier90-workflows
  • aiida-pseudo
    • After cloning, install SSSP:

      aiida-pseudo install sssp
  • aiida-workgraph

✅ You’re Ready!

With these steps, AiiDA should be fully configured on your VPS/local computer and ready to launch workflows 🚀.