Skip to content

Installation

KITE is written in C++ with code optimized for large systems and optimal multithreading performance. Pybinding is KITE's default interface, which is primarily used to build the configuration (HDF5) file for KITEx.

The KITE team endeavours to assist researchers run KITE on UNIX-based systems, such as GNU/Linux and Mac OS X. Thus, feel free to contact any of our team members if you have any queries (contacts can be found at the bottom of the landing page).

In what follows, we provide detailed installation instructions and additional tips for both Linux and MAC users.

1. Download KITE

First download the source code from our official repository on GitHub repository:

git clone https://github.com/quantum-kite/kite.git

Info

Git's installation process for Mac users is outlined in section 2.2.

2. Get dependencies

The compiler must support C++17 (or newer) features and OpenMP parallelization.

To enable KITE's Gaussian wavepacket propagation functionality, compile the source code with a recent gcc version (gcc 8.0.0 or newer). To check the gcc version, you can use the following command in the terminal:

g++ --version

2.1 For Ubuntu users

Install Eigen3 for various linear algebra tools:

sudo apt-get install libeigen3-dev

Make sure you retrieve the latest stable release of Eigen3. Unzip the file and copy the Eigen directory to /usr/include/.

Hierarchical Data Format (HDF5) is used to store the inputs/outputs of the program:

sudo apt-get install h5utils
sudo apt-get install libhdf5-dev

Calculations on KITE are configured using a python script which interfaces with Pybinding. Pybinding requires CMake and pip:

sudo apt-get install cmake
sudo apt-get install pip3

Pybinding also requires the SciPy packages but pip will resolve all the SciPy dependencies automatically:

pip3 install pybinding

Info

Due to outdated dependencies, the installation of pybinding might fail. You can install the development version of Pybinding with:

pip3 install git+https://github.com/BertJorissen/pybinding

To construct the HDF5-files, KITE requires h5py:

pip3 install h5py

2.2 For Mac OS X users

The installation of KITE's dependencies on Apple machines is slightly more evolved. We provide below a recipe that has been tested on some Mac OS X systems, but users are encouraged to contact the KITE team shall they encounter any difficulties.

The Xcode command-line tools from Apple Developer are required. Install these using the terminal:

xcode-select --install

KITE requires an open-source software package management system like Homebrew or MacPorts. We provide here step-by-step instructions for Homebrew (pointers for MacPorts users are given below). To install HomeBrew, run the following command in the terminal and follow the subsequent instructions provided by software:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install an up-to-date C++ compiler via Homebrew:

brew install gcc

Now close the terminal window, and open a new terminal window.

Info

  1. The default directory for Homebrew is /usr/local/bin/. Correct this path if Homebrew was installed in a different directory

  2. In the following sections, replace n with the version of gcc installed by Homebrew as given by brew info gcc.

The hierarchical Data Format (HDF5) is used to store the inputs/outputs of the program. Install HDF5 from source, whilst enforcing the C++17 standard, using:

HOMEBREW_CC=gcc-n HOMEBREW_CXX=g++-n HOMEBREW_CXXFLAGS="-std=c++17" brew install hdf5 --build-from-source

Info

MacPorts users can use the following command:

sudo port -v install hdf5 +gcc-n +cxx +hl configure.ldflags="-stdlib=libstdc++" configure.cxx_stdlib="libstdc++" configure.cxxflags="-std=c++17" 

Install Eigen3 for various linear algebra tools, CMake and Python:

brew install eigen python Cmake git

Calculations on KITE are configured using a python script which interfaces with Pybinding. Pybinding also requires the SciPy packages but pip will resolve all the SciPy dependencies automatically:

Warning

To install the pyhton requirements, you must run the Homebrew-python version. You can find the Homebrew-python binary at /opt/homebrew/bin/python3.

/usr/local/bin/python3 -m pip install numpy h5py pybinding

Info

Due to outdated dependencies, the installation of pybinding might fail. You can install the development version of Pybinding with:

pip3 install git+https://github.com/BertJorissen/pybinding
Alternatively, you might prefer to follow the instructions on the Pybinding webpage.

Next, download the source code by the command given in section 1. Edit CMakeLists.txt in the kite/-directory:

  • locate the following statements

    set(CMAKE C COMPILER "gcc")
    set(CMAKE CXX COMPILER "g++")
    

  • replace by

    set(CMAKE C COMPILER "gcc-n")
    set(CMAKE CXX COMPILER "g++-n")
    

where n is the version number as used previously.

3. KITEx & KITE-tools

From within the kite/ directory (containing CMakeLists.txt and kite.py), run the following commands:

mkdir build
cd build
cmake ..
make

Info

Any warnings appearing during the compilation process can typically be ignored.

If these commands have run successfully, you will now find KITEx and KITE-tools in the kite/build/ directory, which are now ready to use!

4. Test KITE

To generate an input file using KITE's python-interface, try one of our examples in the kite/examples/ directory:

python dos_graphene.py

It creates a file named graphene_lattice-output.h5 that is used as an input for KITEx:

../build/KITEx graphene_lattice-output.h5

This first example calculates the density of states (DOS) of pristine graphene. To obtain the file with the DOS-data, you need to post-process the output with

../build/KITE-tools graphene_lattice-output.h5

which generates the appropriate data file. For more details refer to the tutorial.

5. Common issues

5.1 Finding Eigen3 with CMake

If experiencing difficulties running cmake.. due to CMake not being able to locate Eigen3, you may opt for the following solution. Extract Eigen3 from source and then run the following command from Eigen3's directory

mkdir build
cd build
cmake ..
make
You may now wish to try and re-compile KITEx and KITE-tools following the steps of Sec. 3.

5.2 Apple Silicon (ARM) architecture

On machines from the Apple Silicon lineup (M1, M1Max, etc.) you may have to use the Rosetta translator if experiencing architecture compatibility issues. Rosetta simulates an Intel-x64 system and translates existing software for use with Apple Silicon. To load Rosetta, run arch -x86_64 zsh when starting a new terminal.