Installation
Dependencies
Core
The following packages are required for the core functionality of the software:
Package |
Purpose |
|---|---|
numpy |
Array computing |
scipy |
Sparse matrices, linear algebra, optimization |
numba |
JIT compilation for ED basis construction |
h5py |
HDF5 file I/O |
Optionally, GEM provide MPI parallelization support for k-points summations and for the internal solver SimpleED. To enable MPI support, the following packages are required:
Package |
Purpose |
|---|---|
mpi4py |
MPI support for parallelization |
Solvers
GEM comes with a simple internal exact diagonlization solver and with interfaces to external solvers
If you want to use an external solver then install the packages corresponding to the solvers you intend to use.
When using a solver different from SimpleED please make sure to cite the appropriate references along the GEM one.
Solver |
Extra packages required |
|---|---|
SimpleED |
(none) |
Testing
Tests run with make test (or ctest) and need no extra packages.
The serial tests can also be run with pytest test/python.
Documentation
The following python packages are required to build the HTML documentation.
To enable building the documentation locally pass the appropriate flag to cmake (cmake -DBuild_Documentation=ON):
Package |
Purpose |
|---|---|
sphinx-rtd-theme |
Read the Docs HTML theme |
nbsphinx |
Jupyter notebook support |
myst-parser |
Markdown source file support |
sphinx-autorun |
Executable code blocks in docs |
numpydoc |
NumPy-style docstring parser |
linkify-it-py |
Auto-linking of bare URLs |
matplotlib |
Plots in documentation via plot directive |
sphinxcontrib-bibtex |
BibTeX citations and reference list |
Installation Steps
Clone the repository:
git clone https://github.com/triqs/gem.git
Create a build directory and run CMake:
mkdir gem.build && cd gem.build cmake ../gem
Build and install:
make make test # or 'ctest -j ${NPROC}' to run tests in parallel when MPI is enabled make install
Custom CMake Options
The build can be configured with the following CMake options:
cmake ../gem -DOPTION1=value1 -DOPTION2=value2 ...
Option |
Syntax |
|---|---|
Specify a custom installation prefix |
|
Disable tests (not recommended) |
|
Build the documentation |
|
Path to sphinx |
|
Python interpreter to use |
|
Environment setup
GEM provides a small script (gemvars.sh) to load its installation into your environment variables. Please source it with the proper replacement of (INSTALL_PREFIX):
source $INSTALL_PREFIX/share/gem/gemvars.sh
To automate this process, please add this line to your ~/.bash_profile (or ~/.zprofile).