Skip to main content

Python libraries for irbasis

Project description

Build Status

irbasis

Open-source database and software for intermediate-representation basis functions of imaginary-time Green's function and Python and C++ libraries

Detailed instructions are available online. Please also check our citation policy.

Below we will briefly describe this software.

Table of Contents

License

This software is released under the MIT License, see LICENSE.txt.

Structure

We briefly describe files constituting this software below.

  • c++/irbasis.hpp
    C++ library
  • python/irbasis.py
    Python library
  • database/irbasis.h5
    Database file
  • sample/
    Directory including samples in C++ and Python
  • test/
    Unit tests in C++ and Python

Installation

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

Alternatively, we can put irbasis.py and irbasis.h5 into your working directory. You can load irbasis and use the full functionality.

If you want run sample Python scripts, please also install additional Python packages (scipy, matplotlib) using the following command.

pip install scipy matplotlib

C++

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.

Usage

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.

Python

You can download api.py and save it to your working directory. Then, please run the following command

python api.py

C++

You can download api.cpp and save it to your working directory. After copying irbasis.hpp into the same directory, you can build the sample program as follows (see compile.sh).

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

irbasis-1.0.2-py2.py3-none-any.whl (7.8 MB view details)

Uploaded Python 2 Python 3

File details

Details for the file irbasis-1.0.2-py2.py3-none-any.whl.

File metadata

  • Download URL: irbasis-1.0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.8 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.22.0 CPython/3.6.5

File hashes

Hashes for irbasis-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 64e4b54a78149dda5b42a8aad9b78dee15409984b02498cd632387956deb6a86
MD5 55be72ab5397e10c8bc7c5a941aba6f7
BLAKE2b-256 5ee26a2b4b85793f498966c60ca7ffdccbe6528b7dee6b34929d934d130302a1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page