Skip to main content

structuretoolkit

Pipeline codecov Binder

structuretoolkit extends the ase.atoms.Atoms class from the Atomic Simulation Environment (ASE) with a large collection of additional functions for building, analysing and visualising atomistic structures in materials science. It does not introduce a structure class of its own – every function takes an ase.atoms.Atoms object as input and, where applicable, returns one again, so structuretoolkit combines freely with the rest of the ASE ecosystem (ase.build, ASE calculators, ASE I/O, ...). structuretoolkit also powers the structure-analysis backend of pyiron_atomistics, where the same functions are available as methods directly on the structure object.

Example

import structuretoolkit as stk
from ase.build import bulk

structure = bulk("Al", cubic=True)
stk.analyse.get_adaptive_cna_descriptors(structure)
stk.plot3d(structure)

Features

Analysis

  • stk.analyse.get_neighbors() - find the nearest neighbors of every atom, by count or cutoff radius, periodic-boundary-aware
  • stk.analyse.get_neighborhood() - find the nearest neighbors of an arbitrary point in space, e.g. an interstitial site
  • stk.analyse.get_equivalent_atoms() - label atoms that map onto each other under the structure's symmetry operations
  • stk.analyse.get_steinhardt_parameters() - compute rotationally invariant Steinhardt bond-orientational order parameters
  • stk.analyse.get_centro_symmetry_descriptors() - compute the centrosymmetry parameter, large for atoms near a defect
  • stk.analyse.get_diamond_structure_descriptors() - identify cubic/hexagonal diamond local environments
  • stk.analyse.get_adaptive_cna_descriptors() - classify local crystal structure (fcc/hcp/bcc/icosahedral/other) via common neighbor analysis
  • stk.analyse.get_voronoi_volumes() - compute the Voronoi cell volume of every atom
  • stk.analyse.find_solids() - count how many atoms are "solid" vs. "liquid"-like, e.g. for melting-point calculations
  • stk.analyse.get_mean_positions() - average atomic positions across periodic boundary conditions
  • stk.analyse.get_average_of_unique_labels() - average values that share the same (possibly repeated) integer label
  • stk.analyse.get_interstitials() - locate interstitial sites of a given coordination number (e.g. tetrahedral, octahedral)
  • stk.analyse.get_layers() - group atoms into layers along the cell directions or arbitrary planes
  • stk.analyse.get_voronoi_vertices() - compute the Voronoi vertices of the (periodic) structure
  • stk.analyse.get_voronoi_neighbors() - find pairs of atoms sharing a Voronoi facet
  • stk.analyse.get_delaunay_neighbors() - find pairs of atoms sharing a Delaunay tetrahedron
  • stk.analyse.get_cluster_positions() - cluster nearby positions together via DBSCAN
  • stk.analyse.get_strain() - compute the per-atom Lagrangian strain tensor relative to a reference structure

Build

  • stk.build.get_grainboundary_info() - list the geometrically possible grain boundaries (by CSL sigma value) for a rotation axis
  • stk.build.grainboundary() - build a bicrystal grain-boundary structure for a chosen sigma value and plane
  • stk.build.high_index_surface() - build a stepped/kinked high-index surface slab
  • stk.build.get_high_index_surface_info() - derive the Miller index for a given terrace/step/kink orientation
  • stk.build.sqs_structures() - generate special quasirandom structures (SQS) for disordered alloys
  • stk.build.B2() - build a cubic AB B2 (CsCl-type) intermetallic structure
  • stk.build.C14() - build a hexagonal AB2 C14 Laves phase structure
  • stk.build.C15() - build a cubic AB2 C15 Laves phase structure
  • stk.build.C36() - build a hexagonal AB2 C36 Laves phase structure
  • stk.build.D03() - build a cubic AB3 D03 structure

Visualize

  • stk.visualize.plot3d() - render an Atoms object in 3d, via NGLView or plotly

Common

  • stk.common.ase_to_pymatgen() - convert an ase.atoms.Atoms object to a pymatgen.core.Structure
  • stk.common.pymatgen_to_ase() - convert a pymatgen.core.Structure back to an ase.atoms.Atoms object
  • stk.common.pymatgen_read_from_file() - read a structure file directly into an ase.atoms.Atoms object via pymatgen
  • stk.common.ase_to_pyscal() - convert an ase.atoms.Atoms object to a pyscal3.core.System
  • stk.common.apply_strain() - apply a homogeneous strain to a structure's cell, and its atoms
  • stk.common.center_coordinates_in_unit_cell() - wrap atomic coordinates back into the unit cell
  • stk.common.get_extended_positions() - repeat atoms across the periodic boundary to include neighbor images
  • stk.common.get_vertical_length() - get the height of the cell perpendicular to each face
  • stk.common.get_wrapped_coordinates() - wrap arbitrary Cartesian coordinates into the periodic cell
  • stk.common.select_index() - get the indices of atoms of a given chemical element

Documentation

Metadata

Release files for structuretoolkit 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for structuretoolkit 0.1.0
File Size Uploaded Provenance
structuretoolkit-0.1.0.tar.gz 69.1 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for structuretoolkit 0.1.0
File Interpreter ABI Platform
structuretoolkit-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 149.0 kB

Release files / structuretoolkit-0.1.0.tar.gz

Download URL structuretoolkit-0.1.0.tar.gz
Size 69.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3e0e9b1d35ad78af6238b7402820b075c52cb620dcc3bb790f2ff2b0a95afd89
BLAKE2b-256 checksum
How to use checksums
717c6b3c4211d6cc0dc51b165b5067b88611b673c400f88aa5ec1d1fde45fee0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Release files / structuretoolkit-0.1.0-py3-none-any.whl

Download URL structuretoolkit-0.1.0-py3-none-any.whl
Size 80.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
52aa032c1194e669b1032a5a67aea4d9b54ede573abcecf2959259be615c0089
BLAKE2b-256 checksum
How to use checksums
0231de7a2d9480edcc34494aa8602384e8c68cd2a5be24c08b02e5640bb41405
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Security for structuretoolkit 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for structuretoolkit-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page