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.

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:

  1. Download the source code from PyPI
  2. Unpack it, and go to the source folder:

    tar xfz asap3-3.11.9.tar.gz
    cd asap3-3.11.9
  3. Compile and install with the Intel compiler:

    python install --user --with-intel

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

Building with the Intel Math Kernel Library for good performance

If you have access to the Intel Math Kernel Library (MKL), but not the Intel compilers, you can build with GCC and MKL. This does not give quite as good performance as the Intel compilers, and only for potentials explicitly supporting MKL (right now that is only EMT).

Please make sure that MKL is installed, and that the required environment variables are set (in particular $MKLROOT). That is usually done by sourcing intel/bin/

Download and install as above, then install with:

python install --user --with-mkl

NOTE: Do not use both the Intel compiler and the MKL, that will actually give worse performance than just using the Intel compiler. This is because the Intel compiler automatically uses the Short Vector Math Library (SVML), whereas compiling with --with-mkl inserts explicit calls to MKL's Vector Math Library (VML). The VML API forces extra memory access that can be avoided with SVML.

NB: The Intel MKL is a closed-source product, but licenses are available free of charge.

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.11.9 (released 1. February 2019). This version requires ASE 3.16 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

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 2019-04-05 09:22:46 by JakobSchiøtz)