Skip to main content

Collection of commonly used Green's functions and utilities

Project description

master Build status master Coverage master Documentation Status master
develop Build status develop Coverage develop Documentation Status

PyPI release conda-forge release DOI Code quality

Collection of commonly used Green’s functions and utilities. The main purpose of this module is to have a tested and thus reliable basis to do numerics. It happened to me too often, that I just made a mistake copying the Green’s function and was then wondering what was wrong with my algorithm. For example, a selection of lattice Green’s functions or rather the corresponding DOSs:

Selection of DOSs

Also have a look at the tutorial to get an idea.

The main use case of GfTool was DMFT and its real space generalization, in particular using CT-QMC algorithms.


The package is available on PyPI:

$ pip install gftool

For conda users, GfTool is also available on conda-forge

$ conda install -c conda-forge gftool

Alternatively, it can be installed via GitHub. You can install it using

$ pip install

where VERSION can be a release (e.g. 0.5.1) or a branch (e.g. develop). (As always, it is not advised to install it into your system Python, consider using pipenv, venv, conda, pyenv, or similar tools.) Of course you can also clone or fork the project.

If you clone the project, you can locally build the documentation:

$ pip install -r requirements-doc.txt
$ python build_sphinx


The documentation and API is on ReadTheDocs. The documentation of specific branches can also be accessed: master doc, develop doc. There is also a GitHub page: documentation.

Currently, the package’s main content is

  • collection of non-interacting Green’s functions and spectral functions, see also the lattice submodule.
  • utility functions like Matsubara frequencies and Fermi functions.
  • reliable calculation of particle numbers via Matsubara sums
  • Single site approximation to disorder
  • diagonal disorder only (CPA) and diagonal and off-diagonal (BEB)
  • average local Green’s function and component Green’s functions
  • Fourier transforms from Matsubara frequencies to imaginary time and back, including the handling of high-frequencies moments (especially important for transforms from Matsubara to imaginary time)
  • Laplace transform from real times to complex frequencies
  • helper for Green’s functions in matrix form
  • analytic continuation via the Padé algorithm

Project details

Download files

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

Files for gftool, version 0.10.1
Filename, size File type Python version Upload date Hashes
Filename, size gftool-0.10.1.tar.gz (104.1 kB) File type Source Python version None Upload date Hashes View
Filename, size gftool-0.10.1-py3-none-any.whl (119.6 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page