Installation

General users

Installation via pip

Stable versions of icet are provided via PyPi. This implies that icet can be installed via:

pip3 install icet --user

or alternatively:

python3 -m pip install icet --user

As the package is provided as a source distribution the C++ core library is compiled as part of the installation. This requires a C++11 compliant compiler to be installed on your system, e.g., GCC 4.8.1 and above or Clang 3.3 and above.

Installation via setup.py

If installation via pip fails or if you want to use the most recent (development) version you can clone the repository and install using the setup.py script as follows:

git clone git@gitlab.com:materials-modeling/icet.git
cd icet
python3 setup.py install --user

Testing

It is always a good idea to test that your installation works as advertised. To this end, you should run the icet test suite, which can be accomplished as follows:

curl -O https://icet.materialsmodeling.org/tests.zip
unzip tests.zip
python3 tests/main.py

Developers

Compiling the core library

During development you might have to recompile the C++ core library. This can achieved as follows:

mkdir build
cd build
cmake ..
make -j4
cd ..

Note that this approach requires cmake to be installed on your system.

In this case icet must be added manually to the PYTHONPATH environment variable. To this end, when using the Bash shell or similar (bash, ksh) the following command should be added to the .bashrc file (or equivalent):

export PYTHONPATH=${PYTHONPATH}:<ICET_PATH>/
export PYTHONPATH=${PYTHONPATH}:<ICET_PATH>/build/src/

Here, ICET_PATH must be replaced with the path to the icet root directory. If you are using a C shell (csh, tcsh) the equivalent lines read:

setenv PYTHONPATH ${PYTHONPATH}:<ICET_PATH>/
setenv PYTHONPATH ${PYTHONPATH}:<ICET_PATH>/build/src/

Dependencies

icet is based on Python3 and invokes functionality from other Python libraries, including ase, pandas, numpy, scipy, scitkit-learn, and spglib. The icet C++ core library depends on Eigen, boost, and pybind11, which are included in the distribution as third-party libraries.