Asap is released under the GNU Lesser Public License version 3. See the file LICENSE which accompanies the downloaded files. For more information, see our License page.

NIFLHEIM USERS: Please see the page Niflheim.

Simple installation

In the vast majority of cases, you can simply install Asap using pip. You will need to have numpy installed (including header files, sometimes that package is called numpy-dev). You need a C++ compiler installed (probably g++). If you want to run Asap in parallel, you should also have openmpi (or another MPI implementation) installed. In most scientific Linux environments, these prerequisites are already fulfilled.

You can install Asap with the command

pip install --upgrade --user ase asap3

Note that we pass the --user option to cause installation into $HOME/.local instead of into the global Python distribution. We explicitly tell pip to upgrade if an older installation is present. And we explicitly tells it to install ASE at the same time, as pip does not resolve dependencies for these packages.

If you use Python 3.X you may have to replace pip with pip3.

Optimized installation

Building with the Intel Compiler for optimal performance

Compiling with the Intel Compiler (icc/icpc) gives more than a factor two in performance compared to using the GNU Compilers (gcc/g++), used per default when installing with pip. If you have the Intel Compiler available, you can use it like this:

pip install --upgrade --user ase
pip install --upgrade --user --install-option="--with-intel" asap3

NB: The Intel compilers are a commercial product, but it is available for free for students for personal use.

Manual installation from source

If you want to tweak the installation, if you need the developer version, or if the simple installation does not work for some reason you can install manually´.

Download Asap

  • The latest stable version of Asap is version 3.12.7 (released 21. April 2021). This version requires ASE 3.21.1 or newer.

    It is available from (click on the small download icon on the right side, and chose a format).

... or get the developer version from GitLab

It is also possible to get the latest developer version of Asap from GitLab:

$ git clone

Then proceed to compile it using the Installation instructions, in particular the section regarding In-place installation for Git users.

If you want to browse the source code (including changes), it is most convenient to use the GitLab source browser

Quick installing guide

  1. If you have not already done so, you should install the the Atomic Simulation Environment.
  2. Unpack the tarball and rename the resulting folder to something sensible:

    tar xvf asap-ASAP_VERSION_3_10_0-a78278070c997b302c8117d8174c8914d5f3d273.tar.gz
    mv asap-ASAP_VERSION_3_10_0-a78278070c997b302c8117d8174c8914d5f3d273 asap-3.10.0
    cd asap-3.10.0
  3. Build with the standard command for building Python packages:

    python build

If you wish to use Python 3, you may have to replace python with python3.

You now have to put $HOME/asap-3.10.0/build/scripts-2.7 on your PATH and $HOME/asap-3.10.0/build/lib.linux-x86_64-2.7 on your PYTHONPATH (the exact folder names will depend both on the Python distribution you use).

OpenKIM support

Starting with version 3.11.7, support for OpenKIM v. 2.X is automatically enabled when compiling Asap.

The OpenKIM libraries are found using the pkg-config program. If pkg-config is not installed, you should either install it or make the environment variable KIM_HOME point to the OpenKIM install prefix.

Setting the KIM_HOME environment variable can also be used to overrule which installation of OpenKIM should be used (this is not expected to be used under normal circumstances).

For Asap version 3.11.6 or older, you need to enable OpenKIM support manually by setting the KIM_HOME environment variable to the OpenKIM install prefix (e.g. /usr/local).

Note: OpenKIM is quickly changing. The OpenKIM database now requires version 2.0.2 (or later) of the kim-api, which is supported by Asap version 3.11.9.

Special installation instructions

Installing on Niflheim

Please see the page Niflheim.

Installation using the Intel compiler and/or installation on clusters

If you want to install Asap with the Intel C++ compiler (for better performance), you can install Asap using GNU make. The Intel compiler is automatically detected and used if available.

To install the serial version:

make depend
make serial
make install

To install both the serial and parallel version:

make depend
make all
make install-parallel

For more information, please read the ASAP detailed installation instructions.

If you have compilation problems or problems selecting the right compiler, please see the ASAP detailed installation instructions.

In-place installation for Git users

If you got Asap by cloning the GitLab repository, and always want to use the newest version, you probably want to compile it in-place.

IMPORTANT: If you use the developer version of Asap from GitLab, you should also use the developer version of ASE from GitLab.

For Niflheim users:

In your .bashrc file, load the required modules (Intel compiler, OpenMPI and a modern NumPY):

module load intel-compilers
module load openmpi
module load NUMPY

Remember to re-read .bashrc or log out and in again after editing that file.

Run the Niflheim compilation script to compile for all three computer types:


To use Asap compiled in this way, you need to put it on your PATH and your PYTHONPATH. Assuming that Asap is placed in $HOME/asap, these variables should be set to:

# Set Asap variables for Niflheim users

(the curly braces are necessary around the FYS_PLATFORM variable name as it is followed by a colon.)

For everybody else:

Compile Asap with:

make depend
make serial

if you only want the serial version, or:

make depend
make all

if you also need the parallel version. After updating from gitlab, you only need to re-run make depend if make serial (or make all) fails with an instruction to do so.

To use Asap compiled in this way, you need to put it on your PATH and your PYTHONPATH. Assuming that Asap is placed in $HOME/asap, these variables should be set to:

export PATH=$HOME/asap/XXX:$PATH

where XXX is the output of the command uname -m.

Asap: Installation (last edited 2021-04-21 14:00:38 by JakobSchiøtz)