Semiconducting Materials by Analogy and Chemical Theory
Project description
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://github.com/WMD-group/SMACT/tree/master/examples
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 machine learning 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. Extended examples are available in our examples folder.
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 and more examples can be found in the counting examples subfolder.
-
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:
- A use case 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 "next steps" in 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
Element
andSpecies
classes. - data_loader.py Handles the loading of external data used to initialise the core
smact.Element
andsmact.Species
classes. - 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.
- __init__.py Contains the core
Requirements
The main language is Python 3 and has been tested using Python 3.10+. Basic requirements are Numpy and Scipy. The Atomic Simulation Environment (ASE), spglib, and pymatgen are also required for many components.
Installation
The latest stable release can be installed via pip which will automatically set up other Python packages as required:
pip install smact
SMACT is also available via conda through the conda-forge channel on Anaconda Cloud:
conda install -c conda-forge smact
Alternatively, the very latest version can be installed using:
pip install git+https://github.com/WMD-group/SMACT.git
For developer installation SMACT can be installed from a copy of the source repository (https://github.com/wmd-group/smact); this will be preferred if using experimental code branches.
To clone the project from GitHub and make a local installation:
git clone https://github.com/wmd-group/smact.git
cd smact
pip install --user -e .
With -e pip will create links to the source folder so that that changes to the code will be immediately reflected on the PATH.
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 either Aron Walsh on behalf of The SMACT Developers (author) or Anthony Onwuli (maintainer) by e-mail: a.walsh@imperial.ac.uk or anthony.onwuli16@imperial.ac.uk respectively.
Code contributions
We are always looking for ways to make SMACT better and more useful to the wider community; contributions are welcome. Please use the "Fork and Pull" workflow to make contributions and stick as closely as possible to the following:
- Code style should comply with PEP8 where possible. Google's house style is also helpful, including a good model for docstrings.
- Please use comments liberally when adding nontrivial features, and take the chance to clean up other people's code while looking at it.
- Add tests wherever possible, and use the test suite to check if you broke anything.
- Look at the contributing guide for more information.
Tests
Testing modules should be pass/fail and wrapped into tests/test_core.py or another tests/test_something.py file added, if appropriate.
Run the tests using python -m pytest -v
.
(The final -v
is optional and adds more detail to the output.)
We also use integrated testing on GitHub via GitHub Actions.
References
H. Park et al., "Mapping inorganic crystal chemical space" Faraday Discuss. (2024)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file smact-2.8.tar.gz
.
File metadata
- Download URL: smact-2.8.tar.gz
- Upload date:
- Size: 879.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbd772762acf5dbd867ebea56e5dd61812190e78432326ad68360a7da2136466 |
|
MD5 | b11140505bcfc289243d9d96214dfe0c |
|
BLAKE2b-256 | 286da9439c09f884645784ca2f7aec12ff84debb478d6fa74f0e85a7e60db50c |
File details
Details for the file SMACT-2.8-py3-none-any.whl
.
File metadata
- Download URL: SMACT-2.8-py3-none-any.whl
- Upload date:
- Size: 894.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef662b3441ae640533321e56e6990882b4276f08026c3e1a8f4ce42c7fa24fb4 |
|
MD5 | 1d9b871de0ff742ae54be6d18b7c4f8e |
|
BLAKE2b-256 | 52d10bd864d999561504e75433ce92c551c8f5625e9a5722a922b13077cc0643 |