Get started#

Requirements#

To work with aiida-aimall, you should have:

  • installed aiida-core

  • configured an AiiDA profile.

Please refer to the documentation of aiida-core for detailed instructions.

Installation#

The Python package can be installed from the Python Package index PyPI or directly from the source:

The recommended method of installation is to use the Python package manager pip:

$ pip install aiida-aimall

This will install the latest stable version that was released to PyPI.

To install the package from source, first clone the repository and then install using pip:

$ git clone https://github.com/aiidateam/aiida-quantumespresso
$ pip install -e aiida-aimall

The -e flag will install the package in editable mode, meaning that changes to the source code will be automatically picked up.

If you are using WorkChains that run GaussianCalculations on some computers like Apple M1s, the current release of the dependency cclib (v1.8.1) may result in an error due to a space in the computer name. The master branch of cclib has been updated to fix this bug. The direct dependency is not allowed on PyPi. If you are in the situation, you can fix it by installing the current version of cclib from the master branch after installing aiida-aimall.

(env) pip install git+https://github.com/cclib/cclib

Setup#

Computer#

To run AIMAll calculations on a compute resource, the computer should first be set up in AiiDA. This can be done from the command line interface (CLI) or the Python application programming interface (API). In this example, we will set up the localhost, the computer where AiiDA itself is running:

To set up a computer, use the verdi CLI of aiida-core.

$ verdi computer setup -n -L localhost -H localhost -T core.local -S core.direct -w ~/aiida_work_dir

After creating the localhost computer, configure the core.local transport using:

$ verdi computer configure core.local localhost -n --safe-interval 0

Verify that the computer was properly setup by running:

$ verdi computer test localhost

To setup a computer using the Python API, run the following code in a Python script with verdi run or in the verdi shell:

from aiida.orm import Computer
from pathlib import Path

computer = Computer(
    label='localhost',
    hostname='localhost',
    transport_type='core.local',
    scheduler_type='core.direct',
    workdir=Path('~/aiida_work_dir').resolve()
).store()
computer.configure()

For more detailed information, please refer to the documentation on setting up compute resources.

Code#

To run an AIMAll code, it should first be setup in AiiDA. This can be done from the command line interface (CLI) or the Python application programming interface (API). In this example, we will setup the aimqb code that is installed on the computer where AiiDA is running:

To setup a particular AIMAll code, use the verdi CLI of aiida-core.

$ verdi code create core.code.installed -n --computer localhost --label aimall --default-calc-job-plugin aimall.aimqb --filepath-executable aimqb

To setup particular AIMAll code using the Python API, run the following code in a Python script with verdi run or in the verdi shell:

from aiida.orm import InstalledCode

computer = load_computer('localhost')
code = InstalledCode(
label='aimall',
computer=computer,
filepath_executable='aimqb',
default_calc_job_plugin='aimall.aimqb',
).store()

Important

Using the commands above, you will set up a code that uses the first aimqb binary your PATH. You can find out the absolute path to this binary using the which command:

which aimqb

If this is not the AIMQB version you want to run, pass the correct absolute path as the filepath executable.

aiida-aimall also provides workflows to automatically interface with electronic structure programs. Many workflows, by default, interface with Gaussian Software. To use Gaussian software in these workflows, an AiiDA code instance must also be setup for Gaussian Software, following similar steps to the above setup of AIMAll software.

To setup a particular Gaussian code, use the verdi CLI of aiida-core.

$ verdi code create core.code.installed -n --computer localhost --label gaussian --default-calc-job-plugin aimall.gaussianwfx --filepath-executable g16

To setup particular AIMAll code using the Python API, run the following code in a Python script with verdi run or in the verdi shell:

from aiida.orm import InstalledCode

computer = load_computer('localhost')
code = InstalledCode(
label='gaussian',
computer=computer,
filepath_executable='g16',
default_calc_job_plugin='aimall.gaussianwfx',
).store()

Any electronic structure software that can be run through the command line can be used through workflows that utilise the aiida-shell package. For these calculations, either a string label of the command or a ShellCode object can be provided. To setup a ShellCode, you can also either create that via the command line, or a Python API. An example is given here for ORCA.

To setup a particular ShellCode, (ORCA as an example here) use the verdi CLI of aiida-core.

$ verdi code create core.code.installed.shell -n --computer localhost --label orca --default-calc-job-plugin core.shell --filepath-executable orca

To setup particular AIMAll code using the Python API, run the following code in a Python script with verdi run or in the verdi shell:

from aiida_shell import ShellCode

computer = load_computer('localhost')
code = ShellCode(
label='orca',
computer=computer,
filepath_executable='orca',
default_calc_job_plugin='core.shell',
).store()

For more detailed information, please refer to the documentation on setting up codes.