WMD-group / SMACT

Python package to aid materials design and informatics
https://smact.readthedocs.io
MIT License
100 stars 22 forks source link
computational-chemistry machine-learning materials-design materials-informatics materials-science materials-screening python

DOI DOI Documentation Status License: MIT python version Code style: black PyPi Conda GitHub issues dependencies CI Status codecov PyPI - Downloads

SMACT

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

A blue interface with the text "SMACT v3" at the top. Below that, there is a label "Materials Search" followed by two radio buttons: "Hi-fi" and "Lo-fi". The "Lo-fi" button is currently selected

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.

A gif depicting using the SMACT code. The first lines of code show how SMACT can be used to access properties of Iron (Fe) by create an Fe Element object and then accessing the oxidation states, pauling electronegativity. The next line after these shows the use of the smact_filter function for the Fe-Cu-O chemical system followed by the lists of possible compositions.

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 usede Use cases are available in our examples and tutorials folders.

Code features

List of modules

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 helps us improve the docs! For other queries about any aspect of the code, please contact Anthony Onwuli (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. Please use the "Fork and Pull" workflow to make contributions and stick as closely as possible to the following:

Tests

We use integrated testing on GitHub via GitHub Actions. 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.)

References

H. Park et al., "Mapping inorganic crystal chemical space" Faraday Discuss. (2024)

D. W. Davies et al., "SMACT: Semiconducting Materials by Analogy and Chemical Theory" JOSS 4, 1361 (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., "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)