SMACT
Semiconducting Materials from Analogy and Chemical Theory (SMACT) is a collection of rapid screening and informatics tools that uses data about chemical elements.
- Documentation: https://smact.readthedocs.io/en/latest/
- Examples: https://smact.readthedocs.io/en/latest/examples.html
If you torture the data enough, nature will always confess - Roland Coase (from 'How should economists choose?')
Statement of need
There is a strong demand for functional materials across a wide range of technologies. The motivation can include cost reduction, performance enhancement, or to enable a new application. We have developed low-cost procedures for screening hypothetical materials. This framework can be used for simple calculations on your own computer. SMACT follows a top-down approach where a set of element combinations is generated and then screened using rapid chemical filters. It can be used as part of a multi-technique workflow or to feed artificial intelligence models for materials.
Getting started
Features are accessed through Python scripts, importing classes and functions as needed. The best place to start is looking at the docs, which highlight some simple examples of how these classes and functions can be used. Use cases are available in our examples and tutorials folders.
Code features
-
At the core of SMACT are Element and Species (element in a given oxidation state) classes that have various properties associated with them.
-
Oxidation states that are accessible to each element are included in their properties.
-
Element compositions can be screened through based on the heuristic filters of charge neutrality and electronegativity order. This is handled using the screening module and this publication describes the underlying theory. An example procedure is outlined in the docs.
-
Further filters can be applied to generated lists of compositions in order to screen for particular properties. These properties are either intrinsic properties of elements or are calculated for compositions using the properties module. For example:
- An application is shown in this publication, in which 160,000 chemical compositions are screened based on optical band gap calculated using the solid-state energy scale.
- The oxidation_states module can be used to filter out compositions containing metals in unlikely oxidation states according to a data-driven model.
-
Compositions can also be filtered based on sustainability via the abundance of elements in the Earth's crust or via the HHI scale.
-
Compositions can be converted for use in Pymatgen or for representation to machine learning algorithms (see this example) and the related ElementEmbeddings package.
-
The code also has tools for manipulating common crystal lattice types:
- Certain structure types can be built using the builder module
- Lattice parameters can be estimated using ionic radii of the elements for various common crystal structure types using the lattice_parameters module.
- The lattice module and distorter module rely on the Atomic Simulation Environment and can be used to generate unique atomic substitutions on a given crystal structure.
- The structure prediction module can be used to predict the structure of hypothetical compositions using species similarity measures.
- The dopant prediction module can be used to facilitate high-throughput predictions of p-type and n-type dopants of multicomponent solids.
List of modules
- smact library containing:
- __init__.py Contains the core
ElementandSpeciesclasses. - data_loader.py Handles the loading of external data used to initialise the core
smact.Elementandsmact.Speciesclasses. - screening.py Used for generating and applying filters to compositional search spaces.
- properties.py A collection of tools for estimating useful properties based on composition.
- lattice.py Given the sites, multiplicities and possible oxidation states at those sites, this reads from the database and generates all possible stoichiometries.
- builder.py Builds some common lattice structures, given the chemical composition.
- lattice_parameters.py Estimation of lattice parameters for various lattice types using covalent/ionic radii.
- distorter.py A collection of functions for enumerating and then substituting on inequivalent sites of a sub-lattice.
- oxidation_states.py: Used for predicting the likelihood of species coexisting in a compound based on a statistical model.
- structure_prediction: A submodule which contains a collection of tools for facilitating crystal structure predictions via ionic substitutions
- dopant_prediction: A submodule which contains a collections of tools for predicting dopants.
- utils.py A collection of utility functions used throughout the codebase.
- __init__.py Contains the core
Requirements
The main language is Python 3 and has been tested using Python 3.11 - 3.13.
Core dependencies include NumPy, SciPy, pandas, pymatgen, ASE, and spglib. A full list is in pyproject.toml.
Installation
The latest stable release can be installed via pip:
pip install smact
Optional dependencies (needed for full replication of examples and tutorials):
pip install "smact[optional]"
SMACT is also available via conda-forge:
conda install -c conda-forge smact
Developer installation
We use uv for dependency management. To set up a development environment:
git clone https://github.com/wmd-group/smact.git
cd smact
uv sync --extra optional --extra property_prediction --dev
pre-commit install
This installs SMACT in editable mode with all optional and development dependencies, and sets up pre-commit hooks. See CONTRIBUTING.md for the full workflow.
License and attribution
Python code and original data tables are licensed under the MIT License.
Development notes
Bugs, features and questions
Please use the Issue Tracker to report bugs or request features in the first instance. While we hope that most questions can be answered by searching the docs, we welcome new questions on the issue tracker, especially if they help us improve the docs! For other queries about any aspect of the code, please contact Kinga Mastej (maintainer) by e-mail.
Code contributions
We are always looking for ways to make SMACT better and more useful to the wider community; contributions are welcome. As of v4.0.0, we use GitHub Flow: branch from master, open a pull request against master, and releases are tagged from master. Please use the "Fork and Pull" workflow to make contributions and stick as closely as possible to the following:
- Code style is enforced by ruff (linting and formatting) and pyright (type checking). Pre-commit hooks run these automatically on commit.
- Use Google-style docstrings.
- Add tests wherever possible, and use the test suite to check if you broke anything.
- Look at the contributing guide for more information.
Tests
We use GitHub Actions for CI. Tests should be added to smact/tests/test_core.py or another smact/tests/test_something.py file.
Run the tests locally:
make test
Or to run the full CI pipeline (pre-commit hooks and tests):
make ci-local
References
H. Park et al., "Mapping inorganic crystal chemical space" Faraday Discuss. (2024)
Release files for SMACT 4.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| smact-4.0.0.tar.gz | 1.9 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| smact-4.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.9 MB
Release files / smact-4.0.0.tar.gz
| Download URL | smact-4.0.0.tar.gz |
|---|---|
| Size | 1.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f2372e9127565a298e3a49a0b0488bd3cf67b6a591b6ebb752f8b9ce25736a68
|
|
BLAKE2b-256 checksum How to use checksums |
9ac4247ae33f4068e39fb50b6b4307422b335c5924a5b932594e9118a7c9c57b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 3, 2026.
Transparency logRelease files / smact-4.0.0-py3-none-any.whl
| Download URL | smact-4.0.0-py3-none-any.whl |
|---|---|
| Size | 2.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e3eb968da92d47a8ef9a4af42af5589a6de61cccbca9d329937e1f4e402f0551
|
|
BLAKE2b-256 checksum How to use checksums |
a83b212e34008292dc7f1ef01ccd0d1a0ce7c3e08e95c808d94c61365f298ea0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 3, 2026.
Transparency log