Skip to content

Installation

Warning

Currently, KITE has only be tested on UNIX-based systems, such as GNU/Linux and Mac OS X. There is no Windows support.

KITE is written in C++ with code optimisation, including multithreading performance. The Python package Pybinding is used during pre- and post-processing steps.

Tip

To run the pre-processing tools using Python, run the Python-script from the kite/-directory. By default, KITE's python interface is only avaible within the kite/-directory.

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

KITE dependends on:

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

Ubuntu may not provide the required version of Eigen3, 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

Alternatively, you might prefer to follow the instructions on the Pybinding webpage.

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, mainly due to the need to enforce usage of the correct C++ standard when compiling HDF5. We provide below a recipe that should work in all Apple machines, 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

Info

On machines from the Apple Silicon lineup (M1, M1Max, etc.) you may have to use the Rosetta translator while a few remaining incompatibility issues are resolved. 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.

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/. Change this path to the right location 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 for KITEx:

mkdir build
cd build
cmake ..
make

Info

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

For KITE-tools, run the following commands from the kite/tools/ directory

mkdir build
cd build
cmake ..
make

If these commands have run successfully, you will now find KITEx in the kite/build/ directory and [KITE-tools][kitetools in the kite/tools/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 pure graphene. To obtain the file with the DOS-data, you need to post-process the output with a tool

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

that generates the appropriata data file. For more details refer to the tutorial.

Info

The three command above were run from the kite/examples/-directory. If you didn't build KITEx or KITE-tools in the kite/build/ and kite/tools/build/ directories respectively, the commands won't work.