Installing pyCOFBuilder

Setting the environment

The pyCOFBuilder package is written in Python and requires a few dependencies to be installed. The easiest way to install these dependencies is to use the conda package manager. If you do not have conda installed, we recommend installing the anaconda distribution. Once conda is installed, you can create a new environment with the required dependencies using the following command:

conda env create --file environment.yml

Requirements

  1. Python >= 3.10

  2. pymatgen >= 2022.0.0

  3. numpy >= 1.2

  4. scipy >= 1.6.3

  5. simplejson

  6. ase

  7. gemmi

Important

Don’t forget to activate the conda environment before installing or running pyCOFBuilder. To do so, run the following command:

conda activate pycofbuilder

Installation

Option 1: Using pip

The easiest way to install pyCOFBuilder is using pip. To do so, run the following command:

pip install pycofbuilder

Option 2: Manually importing the module

It is possible to just download the package and manually import pyCOFBuilder it using the sys module, as exemplified below:

# importing module
import sys

# appending a path
sys.path.append('{PATH_TO_PYCOFBUILDER}/pyCOFBuilder/src')

import pycofbuilder as pcb

Just remember to change the {PATH_TO_PYCOFBUILDER} to the directory where you download the pyCOFBuilder package.