{"id":8630,"library":"seekpath","title":"Seekpath: Brillouin Zone Paths","description":"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.","status":"active","version":"2.2.1","language":"en","source_language":"en","source_url":"https://github.com/materialscloud-org/seekpath","tags":["materials science","crystallography","solid-state physics","brillouin zone","band structure","symmetry"],"install":[{"cmd":"pip install seekpath","lang":"bash","label":"Install stable release"}],"dependencies":[{"reason":"Numerical operations and array handling for crystal structures and k-points.","package":"numpy"},{"reason":"Core dependency for crystal symmetry detection and Brillouin zone calculations.","package":"spglib"}],"imports":[{"symbol":"get_path","correct":"from seekpath import get_path"}],"quickstart":{"code":"import numpy as np\nfrom seekpath import get_path\n\n# Define a crystal structure (e.g., Silicon)\n# lattice: Bravais lattice vectors in Angstrom\nlattice = np.array([\n    [0.0, 2.715, 2.715],\n    [2.715, 0.0, 2.715],\n    [2.715, 2.715, 0.0],\n])\n# positions: fractional coordinates of atoms in the unit cell\npositions = np.array([\n    [0.0, 0.0, 0.0],\n    [0.25, 0.25, 0.25],\n])\n# numbers: atomic numbers\nnumbers = [14, 14] # Silicon\n\n# Get the recommended path and high-symmetry k-points\npath_data = get_path(lattice, positions, numbers)\n\nprint(f\"Points in reciprocal space: {path_data['point_coords'].keys()}\")\nprint(f\"Path segments: {path_data['path']}\")\n\n# Example: Accessing coordinates of a specific high-symmetry point\nprint(f\"Gamma point coordinates: {path_data['point_coords'].get('GAMMA')}\")","lang":"python","description":"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."},"warnings":[{"fix":"Upgrade `seekpath` to version 2.2.0 or newer: `pip install --upgrade seekpath`.","message":"Older 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`.","severity":"gotcha","affected_versions":"< 2.2.0"},{"fix":"Upgrade `seekpath` to version 2.2.1 or newer to resolve these warnings: `pip install --upgrade seekpath`.","message":"Versions 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.","severity":"gotcha","affected_versions":"< 2.2.1"},{"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`.","message":"`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.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Install `spglib` using pip: `pip install spglib`.","cause":"The `spglib` library, a fundamental dependency for `seekpath`'s symmetry operations, is not installed in your environment.","error":"ImportError: No module named 'spglib'"},{"fix":"Convert list inputs to `numpy.ndarray` and verify their shapes. For example: `lattice = np.array([[...]])` and `positions = np.array([[...]])`.","cause":"This typically occurs when `lattice` or `positions` are passed as standard Python lists instead of NumPy arrays, or their dimensions are incorrect for numerical operations.","error":"TypeError: object of type 'list' has no len()"},{"fix":"Upgrade your `spglib` library to a compatible version (e.g., `spglib >= 2.0`). It's recommended to use `seekpath >= 2.2.0` with `spglib >= 2.0`. Command: `pip install --upgrade spglib`.","cause":"This error points to a version incompatibility between `seekpath` and `spglib`. Your `seekpath` version is trying to call an `spglib` function (`get_symmetry_dataset`) that does not exist in the installed `spglib` version (likely `spglib < 2.0`).","error":"AttributeError: module 'spglib' has no attribute 'get_symmetry_dataset'"},{"fix":"Carefully verify the input `lattice`, `positions`, and `numbers` to ensure they represent a valid and sufficiently symmetric crystal structure. For structures with very low symmetry or disorder, automatic path generation may not be feasible, and manual path definition might be required.","cause":"The input crystal structure might be invalid, trivial (e.g., a single atom, a disordered system), or too complex/non-standard for `spglib` to unambiguously determine its space group symmetry and thus a standard high-symmetry path.","error":"seekpath.seekpath.SeekpathError: Could not find any high-symmetry path for the given structure."}]}