Skip to main content

DOI Documentation Status made-with-python License: MIT DOI Code style: black PyPi GitHub issues dependencies CI Status python version

SMACT

Semiconducting Materials from Analogy and Chemical Theory (SMACT) is a collection of rapid screening tools that uses data about chemical elements.

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. Data collections such as the Materials Project, NREL Materials Database and the Open Quantum Materials Database are valuable resources, but they largely cover the properties of known compounds as calculated using high-level quantum mechanical theories.

We have developed low-cost procedures for screening hypothetical materials in SMACT. 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

SMACT's 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.

  • The various 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 further 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:

  • 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 easily be converted for use in Pymatgen or for representation to machine learning algorithms (see "next steps" in this example).

  • The code also has some tools for manipulating common crystal lattice types:

  • Common crystal structure types can be built using the builder module

  • Lattice parameters can be quickly 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.

List of modules

  • smact library containing:
    • __init__.py Contains the core Element and Species classes.
    • data_loader.py Handles the loading of external data used to initialise the core smact.Element and smact.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 stoichiometeries.
    • 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.

Requirements

The main language is Python 3 and has been tested using Python 3.8+. 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 of SMACT can be installed via pip which will automatically setup other Python packages as required:

pip install smact  

Alternatively, the very latest version can be installed using:

pip install git+git://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 helps us improve the docs! For other queries about any aspect of the code, please contact either Dan Davies (author) or Anthony Onwuli (maintainer) by e-mail: d.w.davies@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 very 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.

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.

List of Developers

Contributors to SMACT:

  • Keith Butler
  • Daniel Davies
  • Jarvist Frost
  • Tim Gauntlet
  • Adam Jackson
  • Chloe (Jiwoo) Lee (이지우)
  • Alex Moriarty
  • Kazuki Morita
  • Anthony Onwuli
  • Jonathan Skelton
  • Aron Walsh

Thanks to JOSS reviewers and editors:

  • Adam Symington
  • Alex Ganose
  • Daniel Katz
  • Lorena Barba

References

D. W. Davies et al, "SMACT: Semiconducting Materials by Analogy and Chemical Theory" JOSS 4, 1361 (2019)

D. W. Davies et al, "Data-driven discovery of photoactive quaternary oxides using first-principles machine learning" Chem. Mater. 31, 7221 (2019)

D. W. Davies et al, "Materials discovery by chemical analogy: role of oxidation states in structure prediction" Faraday Discuss. 211, 553 (2018)

D. W. Davies et al, "Computer-aided design of metal chalcohalide semiconductors: from chemical composition to crystal structure" Chem. Sci. 9, 1022 (2018)

D. W. Davies et al, "Computational screening of all stoichiometric inorganic materials" Chem 1, 617 (2016)

B. R. Pamplin, "A systematic method of deriving new semiconducting compounds by structural analogy", J. Phys. Chem. Solids 25, 675 (1964)

Metadata

Release files for SMACT 2.5.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 SMACT 2.5.0
File Size Uploaded Provenance Actions
SMACT-2.5.0.tar.gz 122.3 kB Without provenance Details for SMACT-2.5.0.tar.gz

Built distribution (wheel)

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

Total release size: 252.4 kB

Release files / SMACT-2.5.0.tar.gz

Download URL SMACT-2.5.0.tar.gz
Size 122.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cbdbc74cc411d06191a30e6ea3583400a8fd295105ccc41baa8e08f1fac83119
BLAKE2b-256 checksum
How to use checksums
1b00fbd5d116b46c1e2ebd90e5ce4601c24d7658ec892df476122e06ec6d8152
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Release files / SMACT-2.5.0-py3-none-any.whl

Download URL SMACT-2.5.0-py3-none-any.whl
Size 130.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7683d650f0b1dc0dd77a7c7efafea31e52de7f345c18a4134e79328b2db1228
BLAKE2b-256 checksum
How to use checksums
784e2fd28a94b1ab32208fceddf78f6e2ba357c08b53edfef80c681b725b7b2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Security for SMACT 2.5.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

2.5.0 This release

2 release files No 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