Registry / ai-ml / seekpath

seekpath

JSON →
library2.2.1pypypiunverified

Seekpath is a Python module designed to obtain and visualize k-vector coefficients and automatically generate high-symmetry band paths in the Brillouin zone of crystal structures. It integrates with spglib for symmetry analysis and is widely used in materials science for electronic structure calculations. The current version is 2.2.1, with minor releases typically occurring every few months to address bug fixes and improve compatibility.

pip install seekpath
INSTALL
IMPORT
SIG · SEEKPATH
S
seekpath
ai-mlpythonv2.2.1
Install
3.9s avg
Import
Disk
94MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.2.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
build_error
glibc
py 3.103.920 runs
installs and imports cleanly · install 3.9s · import 0.000s · 93MB
94MB installed
● package 94MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

get_path
from seekpath import get_path
from seekpath import get_path

This example demonstrates how to define a simple crystal structure (Silicon) and use `seekpath.get_path` to obtain the high-symmetry k-point path and coordinates in the Brillouin zone. The output `path_data` dictionary contains essential information for band structure calculations.

import numpy as np from seekpath import get_path # Define a crystal structure (e.g., Silicon) # lattice: Bravais lattice vectors in Angstrom lattice = np.array([ [0.0, 2.715, 2.715], [2.715, 0.0, 2.715], [2.715, 2.715, 0.0], ]) # positions: fractional coordinates of atoms in the unit cell positions = np.array([ [0.0, 0.0, 0.0], [0.25, 0.25, 0.25], ]) # numbers: atomic numbers numbers = [14, 14] # Silicon # Get the recommended path and high-symmetry k-points path_data = get_path(lattice, positions, numbers) print(f"Points in reciprocal space: {path_data['point_coords'].keys()}") print(f"Path segments: {path_data['path']}") # Example: Accessing coordinates of a specific high-symmetry point print(f"Gamma point coordinates: {path_data['point_coords'].get('GAMMA')}")
Debug
Known issues
gotchaOlder versions of `seekpath` (prior to 2.2.0) may emit `DeprecationWarning`s or encounter issues when used with `spglib` versions 2.5.0 or later due to internal API changes in `spglib`.
fix
Upgrade `seekpath` to version 2.2.0 or newer: `pip install --upgrade seekpath`.
affects: < 2.2.0
gotchaVersions of `seekpath` prior to 2.2.1 might emit `UserWarning`s related to the internal `get_BZ()` function when processing certain crystal structures, indicating sub-optimal Brillouin zone sampling.
fix
Upgrade `seekpath` to version 2.2.1 or newer to resolve these warnings: `pip install --upgrade seekpath`.
affects: < 2.2.1
gotcha`seekpath` expects crystal structure data in a specific format: `(lattice, positions, numbers)`. `lattice` must be a 3x3 array of lattice vectors, `positions` an Nx3 array of fractional coordinates, and `numbers` a list/array of atomic numbers. Incorrect shapes, types (e.g., Python lists instead of NumPy arrays), or non-numeric values can lead to cryptic errors.
fix
Ensure `lattice` and `positions` are `numpy.ndarray` with correct 3D shapes and `numbers` is a list or array of integers. Validate your input data before passing it to `get_path`.
affects: All
Upgrade
Version history
2.2.1latest on PyPI · released Jan 31, 2026
Audit
Dependencies
numpyrequiredNumerical operations and array handling for crystal structures and k-points.
spglibrequiredCore dependency for crystal symmetry detection and Brillouin zone calculations.
Agent activity
38 hits · last 30 days
node
34
OpenAI (training)
1
Resources
seekpath — pip install seekpath · libregistry