Skip to content

Installation

Requirements

  • Python ≥ 3.9
  • NumPy ≥ 1.22
  • SciPy ≥ 1.8
  • Matplotlib ≥ 3.5
  • pandas ≥ 1.4

Install from PyPI

The recommended way to install SpinDefectSim is via pip:

pip install spindefectsim

This installs the library and all required dependencies automatically.


Install from source

To get the latest development version directly from the repository:

git clone https://github.com/TobiasMKaufmann/SpinDefectSim.git
cd SpinDefectSim
pip install -e .

The -e flag installs in editable mode, so any changes you make to the source are immediately reflected without reinstalling.


Optional extras

Install development tools (testing, notebooks):

pip install spindefectsim[dev]

This adds:

Package Purpose
pytest ≥ 7 Run the test suite
jupyter Interactive notebooks
notebook Jupyter notebook server

Verifying the installation

import SpinDefectSim
print(SpinDefectSim.__version__)   # e.g. "1.0.0"

# Quick sanity check
from SpinDefectSim.spin.defects import list_defects
list_defects()

You should see a table of all five built-in defect presets printed to stdout.


Docker / dev container

A Dockerfile and docker-compose.yml are included in the repository root. To spin up a fully configured environment:

docker compose up --build

The container starts with all dependencies pre-installed and a Jupyter notebook server available at http://localhost:8888.