Installation#
This guide covers how to install airsspy and its dependencies.
Requirements#
Python 3.8 or later
pip or uv package manager
AIRSS buildcell executable (for structure generation)
Installing airsspy#
Using pip (recommended for users)#
pip install airsspy
Using uv (faster, modern alternative)#
uv pip install airsspy
Development Installation#
For development or to get the latest version from source:
git clone https://github.com/zhubonan/airsspy.git
cd airsspy
pip install -e .[full,test,docs]
Or with uv:
git clone https://github.com/zhubonan/airsspy.git
cd airsspy
uv pip install -e .[full,test,docs]
Optional Dependencies#
airsspy has several optional dependency groups:
analysis: Pandas for data analysisfull: All optional dependencies (pandas, spglib)test: Testing tools (pytest, pytest-cov)docs: Documentation building tools (Sphinx, themes, extensions)
Install with optional dependencies:
pip install airsspy[full]
Installing AIRSS#
To generate random structures, you need the AIRSS buildcell executable.
Download and Build AIRSS#
Download AIRSS from the official website
Extract and build:
tar -xzf airss-*.tgz
cd airss-*
make
make install
Add AIRSS binaries to your PATH:
export PATH=<airss root folder>/bin:$PATH
Add this line to your ~/.bashrc or ~/.zshrc to make it permanent.
Verify Installation#
Check that buildcell is accessible:
which buildcell
Dependencies#
airsspy depends on:
ase - Atomic Simulation Environment
castepinput (≥0.1) - CASTEP input file handling
numpy (≥1.20) - Numerical computing
pymatgen (≥2022.0.0) - Interface for reading SHELX files
These are automatically installed when you install airsspy.
Verifying Installation#
Test your installation:
import airsspy
print(airsspy.__version__)
# Test creating a seed
from airsspy import SeedAtoms
seed = SeedAtoms('C4', cell=[5, 5, 5], pbc=True)
print("airsspy is working!")
Troubleshooting#
buildcell not found#
If you get an error about buildcell not being found:
Check that AIRSS is installed:
which buildcellEnsure AIRSS bin directory is in your PATH
Try specifying the full path to buildcell if needed
Import errors#
If you encounter import errors:
Verify you’re using Python 3.8 or later:
python --versionTry installing in a fresh virtual environment
Ensure all dependencies are installed:
pip install airsspy[full]
Next Steps#
Now that airsspy is installed, continue to the Quickstart Tutorial to perform your first structure search.