Python libraries for irbasis
Open-source database and software for intermediate-representation basis functions of imaginary-time Green's function and Python and C++ libraries
Below we will briefly describe this software.
Table of Contents
This software is released under the MIT License, see LICENSE.txt.
We briefly describe files constituting this software below.
Directory including samples in C++ and Python
Unit tests in C++ and Python
You need to install only a few standard scientific libraries (such as numpy, h5py) shown in our PyPI project page. If you install irbasis through pip, pip will take care of these dependencies properly.
We strongly recommend to install the irbasis library using the standard Python package system. This package contains the data file (irbasis.h5) as well.
python -mpip install -U pip python -mpip install -U irbasis
If you want run sample Python scripts, please also install additional Python packages (scipy, matplotlib) using the following command.
pip install scipy matplotlib
You need a C++03-compatible compiler. The use of the C++ irbasis library requires only the HDF5 C library (not C++).
The C++ library consists of a single header file. All what you need to do is to include irbasis.hpp in your C++ project. The data file irbasis.h5 will be read at runtime. Please do not forget to link your executable to the HDF5 C library.
In the following, we demonstrate how to use irbasis database. The irbasis database is available in Python and C++. irbasis can calculate the IR basis functions, its Fourier transform, the derivatives and corresponding singular values.
In the following, we assume that you have installed the irbasis Python library via pip. If not, please modify the sample script files appropriately to specify the location of a database file (see a comment in api.py).
Some of sample Python scripts depend on scipy and matplotlib.
For other examples, please refer to our online document.
You can download api.py and save it to your working directory. Then, please run the following command
g++ api.cpp -I /usr/local/include -L /usr/local/lib -lhdf5 -DNDEBUG -O3
Here, we assume that the header file and the library file of the HDF5 C library are installed into "/usr/local/include" and "/usr/local/lib", respectively. When running the executable, irbasis.h5 must exist in your working directory.