How to use Abinit container image?

Prerequisites

For more information on Apptainer containers, please look at this page or refer to this tutorial to have a quick look at Apptainer’s main commands.

Apptainer or Docker?

Every command on this page is given for both Apptainer and Docker: pick your tool in any of the tabs below and the whole page follows your choice. Docker is fine for trying the image on your own computer, but on clusters you should use Apptainer ( why?).

Container image

Retrieve the Abinit image:

Input files

To illustrate the various commands, a set of Abinit input files is available in the form of an archive via this link.

Those files correspond to a tutorial example from the Abinit official documentation. The archive contains the following files:

  • H.psp8: pseudopotentials for the hydrogen atom,
  • input.abi: Abinit input file.

In this tutorial, we will assume that the input files contained in this archive are in the current directory. To extract them:

tar -xzf abinit-tutorial-inputs.tar.gz

Quickstart

For impatient folks, here is how to launch a parallel Abinit computation on N cores, in the case where the current directory contains all necessary Abinit input files:

Detailed usage for the Abinit container

This section presents different ways to use the Abinit image. For more details about Apptainer commands, please look at this tutorial.

Introduction

Abinit is an MPI-parallelized open-source software suite for computing material properties via density functional theory (DFT).

The main executable in the image is the abinit executable. The code license can be found under the following path: /share/doc/abinit-10.4.7/COPYING, and can be accessed from outside the container as follows:

Running a sequential computation

The input file input.abi allows us to get the pseudo total energy, the bond length, the charge density and the atomisation energy of the $H_2$ molecule following the official documentation tutorial. Once the input files have been extracted, Abinit can be run on a single core as follows:

Using the Abinit container for parallel runs

The same computation can be run in parallel on N cores as follows: