Installation

CELL runs on python 3. If you do not have python 3 installed, you may install, for instance, the Anaconda distribution.

Once python 3 is installed in your computer, you can proceed to install CELL as indicated below.

After successfully installing CELL, you must run the tests to make sure that everything works correctly.

Notice: Due to spglib dependency, installation works with Python up to version 3.11.

Using pip

Open a terminal and execute:

$>pip install clusterx

This will install CELL along with all its dependencies (e.g. numpy, scipy, ase, …) if not already installed in your system.

An alternative way is by installing the development version, as explained next (at the time being, for using the next option you must contact the developers).

Using git and pip (public)

First, open a terminal and clone CELL from our git repository with the following command:

$> git clone git@github.com:srigamonti/clusterx.git

This will create a folder named clusterx. Move inside this folder and install CELL using pip:

$> cd clusterx
$> pip install -e .

Here, the symbol $> denotes the command prompt. This will create a local install of CELL (aka clusterx) and will install all CELL dependencies as well (e.g. numpy, scipy, ase, …) if not already installed in your system.

Using git and pip (HU developers)

(NOTE: this option is currently only for users of the Humboldt-Universitaet zu Berlin. We will put CELL in the short term in a public git repository (either github or gitlab).)

First, open a terminal and clone CELL from our git repository with the following command:

$> git clone git@git.physik.hu-berlin.de:srigamonti/clusterx.git

This will create a folder named clusterx. Move inside this folder and install CELL using pip:

$> cd clusterx
$> pip install -e .

Here, the symbol $> denotes the command prompt. This will create a local install of CELL (aka clusterx) and will install all CELL dependencies as well (e.g. numpy, scipy, ase, …) if not already installed in your system.

Frequent installation issues

spglib

If you get the error message:

ERROR: Could not build wheels for spglib which use PEP 517 and cannot be installed directly

it means that the installation of the package spglib (which is a dependency of CELL used to determine the symmetry group of structures) failed. To solve this issue, try first to install spglib using conda:

conda install -c conda-forge spglib

additional installation options for spglib can be found in the spglib documentation. After successful installation of spglib try installing CELL again.

Fix Missing Headers on macOS: limits.h, etc.

In MacOS, you may possibly run into the issue that c headers are not found due to absent /usr/include folder. In this case, add the following line to your ~/.bash_profile file:

export CPATH="/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include"

(of course, first verify that the above folder exists in your system). Afterwards run:

source ~/.bash_profile

and try again.

Running the tests

After a successful installation, create a folder somewhere in your computer that will be used to run the tests. For this purpose you may execute the following commands:

$> cd ~
$> mkdir test-cell
$> cd test-cell
$> cell test

The last command, cell test, will run all the unit tests of CELL. A number of .json files and some folders, generated by the tests, will be now present inside the test-cell folder. If the tests run successfully, you are ready to use CELL. Otherwise, please contact us.

Frequent running issues

Failing MPI execution in MacOS

When running parallel execution with MPI, you may encounter the following error:

Fatal error in MPI_Init_thread: Other MPI error, error stack:
MPIR_Init_thread(159)..............:
MPID_Init(164).....................: channel initialization failed
MPIDI_CH3_Init(95).................:
MPID_nem_init(314).................:
MPID_nem_tcp_init(173).............:
MPID_nem_tcp_get_business_card(395):
GetSockInterfaceAddr(369)..........: gethostbyname failed, macsr (errno 0)

This is due to a problem of your system to resolve the localhost. The solution is explained here.