structuretoolkit
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-awarestk.analyse.get_neighborhood()- find the nearest neighbors of an arbitrary point in space, e.g. an interstitial sitestk.analyse.get_equivalent_atoms()- label atoms that map onto each other under the structure's symmetry operationsstk.analyse.get_steinhardt_parameters()- compute rotationally invariant Steinhardt bond-orientational order parametersstk.analyse.get_centro_symmetry_descriptors()- compute the centrosymmetry parameter, large for atoms near a defectstk.analyse.get_diamond_structure_descriptors()- identify cubic/hexagonal diamond local environmentsstk.analyse.get_adaptive_cna_descriptors()- classify local crystal structure (fcc/hcp/bcc/icosahedral/other) via common neighbor analysisstk.analyse.get_voronoi_volumes()- compute the Voronoi cell volume of every atomstk.analyse.find_solids()- count how many atoms are "solid" vs. "liquid"-like, e.g. for melting-point calculationsstk.analyse.get_mean_positions()- average atomic positions across periodic boundary conditionsstk.analyse.get_average_of_unique_labels()- average values that share the same (possibly repeated) integer labelstk.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 planesstk.analyse.get_voronoi_vertices()- compute the Voronoi vertices of the (periodic) structurestk.analyse.get_voronoi_neighbors()- find pairs of atoms sharing a Voronoi facetstk.analyse.get_delaunay_neighbors()- find pairs of atoms sharing a Delaunay tetrahedronstk.analyse.get_cluster_positions()- cluster nearby positions together via DBSCANstk.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 axisstk.build.grainboundary()- build a bicrystal grain-boundary structure for a chosen sigma value and planestk.build.high_index_surface()- build a stepped/kinked high-index surface slabstk.build.get_high_index_surface_info()- derive the Miller index for a given terrace/step/kink orientationstk.build.sqs_structures()- generate special quasirandom structures (SQS) for disordered alloysstk.build.B2()- build a cubic AB B2 (CsCl-type) intermetallic structurestk.build.C14()- build a hexagonal AB2 C14 Laves phase structurestk.build.C15()- build a cubic AB2 C15 Laves phase structurestk.build.C36()- build a hexagonal AB2 C36 Laves phase structurestk.build.D03()- build a cubic AB3 D03 structure
Visualize
stk.visualize.plot3d()- render anAtomsobject in 3d, via NGLView or plotly
Common
stk.common.ase_to_pymatgen()- convert anase.atoms.Atomsobject to apymatgen.core.Structurestk.common.pymatgen_to_ase()- convert apymatgen.core.Structureback to anase.atoms.Atomsobjectstk.common.pymatgen_read_from_file()- read a structure file directly into anase.atoms.Atomsobject via pymatgenstk.common.ase_to_pyscal()- convert anase.atoms.Atomsobject to apyscal3.core.Systemstk.common.apply_strain()- apply a homogeneous strain to a structure's cell, and its atomsstk.common.center_coordinates_in_unit_cell()- wrap atomic coordinates back into the unit cellstk.common.get_extended_positions()- repeat atoms across the periodic boundary to include neighbor imagesstk.common.get_vertical_length()- get the height of the cell perpendicular to each facestk.common.get_wrapped_coordinates()- wrap arbitrary Cartesian coordinates into the periodic cellstk.common.select_index()- get the indices of atoms of a given chemical element
Documentation
Metadata
Release files for structuretoolkit 0.0.46
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| structuretoolkit-0.0.46.tar.gz | 68.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| structuretoolkit-0.0.46-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 148.6 kB
Release files / structuretoolkit-0.0.46.tar.gz
| Download URL | structuretoolkit-0.0.46.tar.gz |
|---|---|
| Size | 68.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1355a145cce1e61826764c29b097aa584ab775798ae4fca9ec358e250d913ae
|
|
BLAKE2b-256 checksum How to use checksums |
45664f01ca2f70b32b72896172bb91ac836775e2f8858037f590b4a4270027d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 10, 2026.
Transparency logRelease files / structuretoolkit-0.0.46-py3-none-any.whl
| Download URL | structuretoolkit-0.0.46-py3-none-any.whl |
|---|---|
| Size | 79.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
43006dbfdb08a1d07df4531b2a20f3c203a6f1d461f0b21c3683a6f3aaf190ce
|
|
BLAKE2b-256 checksum How to use checksums |
2d0b4ba0e5c19c48af6d80f4160e436315c9df70f3e21208a80e6677f856cbef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 10, 2026.
Transparency log