Installation
uv pip install aiida aiida-castep aiida-vaspRabbitMQ (via Docker Compose)
Only RabbitMQ < 3.8.15 works with AiiDA. Use this docker-compose.yml:
services:
rabbitmq:
image: rabbitmq:3.8.14
container_name: rabbitmq
restart: always
ports:
- 5672:5672
- 15672:15672
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
configs:
- source: rabbitmq-plugins
target: /etc/rabbitmq/enabled_plugins
volumes:
- rabbitmq-lib:/var/lib/rabbitmq/
- rabbitmq-log:/var/log/rabbitmq
configs:
rabbitmq-plugins:
content: "[rabbitmq_management]."
volumes:
rabbitmq-lib:
driver: local
rabbitmq-log:
driver: localPostgreSQL
Reference: PostgreSQL downloads
sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo dnf -qy module disable postgresql
sudo dnf install -y postgresql17-server
sudo /usr/pgsql-17/bin/postgresql-17-setup initdb
sudo systemctl enable postgresql-17
sudo systemctl start postgresql-17Note:
verdineeds to runpsqldirectly β make sure itβs in yourPATH.
Create a Profile
Quick setup (recommended for local machines)
verdi presto --use-postgresManual setup
verdi profile setupExample profile configuration:
| Field | Value |
|---|---|
| Profile name | yourname |
| Database engine | postgresql_psycopg |
| Database hostname | localhost |
| Database name | yourname |
| Database username | yourname |
| Database password | yourname |
| Broker protocol | amqp |
| Broker host | 127.0.0.1 |
| Broker port | 5672 |
| Broker username | guest |
| Broker password | guest |
Setup Computer
Configure the HPC machines you want to submit to:
verdi computer setup --config computer.yml
verdi computer configure TRANSPORTTYPE LABEL
verdi computer test LABELTRANSPORTTYPE:core.ssh(remote) orcore.local(local)LABEL: the name from your YAML file (e.g.,fornax-genoa)
To change settings later: verdi computer duplicate LABEL
Fornax
fornax.yml:
---
label: "fornax"
hostname: "fornax.nus.edu.sg"
transport: "core.ssh"
scheduler: "core.pbspro"
work_dir: "/scratch/{username}/aiida/"
mpirun_command: "mpiexec -np {tot_num_mpiprocs}"
mpiprocs_per_machine: "64"β οΈ Fornax fix for βTERM environment variable not setβ See AiiDA troubleshooting. In
/etc/bashrc, change. "$i" >/dev/nullto. "$i" >/dev/null 2>&1.
Vanda
vanda.yml:
---
label: "vanda"
hostname: "vanda.nus.edu.sg"
transport: "core.ssh"
scheduler: "core.pbspro"
work_dir: "/scratch/{username}/aiida/"
mpirun_command: "mpirun -np {tot_num_mpiprocs"
mpiprocs_per_machine: "72"Setup Code
Code is defined as code@computer:
verdi code create core.code.installedAlways test after setup:
verdi code test CODENAMEVASP
Reference: aiida-vasp configuration
Example β vasp.6.5.0_std@fornax:
- Computer:
fornax - Executable:
/home/app/vasp/vasp.6.5.0/vasp_std - Default plugin:
vasp.vasp - Prepend:
module load vasp/vasp.6.5.0
Upload pseudopotentials (e.g., PBE.54):
verdi data vasp.potcar upload-from-pymatgen --functional PBE_54 -n PBE.54 -D PBE.54CASTEP
Reference: aiida-castep docs Β· Quick start notebook
Example β castep-22.11@fornax:
- Computer:
fornax - Executable:
/home/app/CASTEP-22.11/linux_x86_64_ifort--mpi/castep.mpi - Default plugin:
castep.castep - Prepend:
module add castep-22.11
Upload pseudopotentials (in verdi shell):
from aiida_castep.data.otfg import upload_otfg_family
upload_otfg_family(['C19'], 'C19', 'Description: C19 OTFG family', stop_if_existing=False)MLIP (MACE)
Reference: aiida-mlip docs
For local machines with containerized codes, use core.local transport and core.direct scheduler.
π€ AI Agent Tip
When setting up AiiDA with an AI agent, share:
- Your
verdi profile listoutput - Your
verdi computer listoutput - The software versions available on the target machine
The agent can generate the correct YAML files and walk you through setup step by step.