SMACT 3.2.0__tar.gz → 4.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. {smact-3.2.0 → smact-4.0.1}/LICENSE +4 -1
  2. {smact-3.2.0/SMACT.egg-info → smact-4.0.1}/PKG-INFO +182 -42
  3. {smact-3.2.0 → smact-4.0.1}/README.md +166 -33
  4. {smact-3.2.0 → smact-4.0.1/SMACT.egg-info}/PKG-INFO +182 -42
  5. {smact-3.2.0 → smact-4.0.1}/SMACT.egg-info/SOURCES.txt +25 -1
  6. {smact-3.2.0 → smact-4.0.1}/SMACT.egg-info/requires.txt +14 -4
  7. {smact-3.2.0 → smact-4.0.1}/pyproject.toml +81 -77
  8. {smact-3.2.0 → smact-4.0.1}/smact/__init__.py +249 -221
  9. {smact-3.2.0 → smact-4.0.1}/smact/benchmarking/smact_benchmark.py +1 -1
  10. smact-4.0.1/smact/benchmarking/utilities.py +51 -0
  11. smact-4.0.1/smact/builder.py +108 -0
  12. smact-4.0.1/smact/data/lambda.json +1 -0
  13. smact-4.0.1/smact/data_loader.py +682 -0
  14. {smact-3.2.0 → smact-4.0.1}/smact/distorter.py +43 -40
  15. {smact-3.2.0 → smact-4.0.1}/smact/dopant_prediction/__init__.py +2 -0
  16. smact-4.0.1/smact/dopant_prediction/doper.py +419 -0
  17. smact-4.0.1/smact/io/__init__.py +1 -0
  18. smact-4.0.1/smact/io/elementembeddings.py +139 -0
  19. {smact-3.2.0 → smact-4.0.1}/smact/lattice.py +7 -11
  20. smact-4.0.1/smact/lattice_parameters.py +392 -0
  21. {smact-3.2.0 → smact-4.0.1}/smact/metallicity.py +33 -16
  22. {smact-3.2.0 → smact-4.0.1}/smact/oxidation_states.py +73 -39
  23. smact-4.0.1/smact/properties.py +248 -0
  24. smact-4.0.1/smact/property_prediction/__init__.py +78 -0
  25. smact-4.0.1/smact/property_prediction/base_predictor.py +200 -0
  26. smact-4.0.1/smact/property_prediction/config.py +72 -0
  27. smact-4.0.1/smact/property_prediction/convenience.py +54 -0
  28. smact-4.0.1/smact/property_prediction/io.py +309 -0
  29. smact-4.0.1/smact/property_prediction/registry.py +267 -0
  30. smact-4.0.1/smact/property_prediction/roost/__init__.py +24 -0
  31. smact-4.0.1/smact/property_prediction/roost/predictor.py +298 -0
  32. smact-4.0.1/smact/property_prediction/roost/train.py +503 -0
  33. smact-4.0.1/smact/property_prediction/scripts/__init__.py +1 -0
  34. smact-4.0.1/smact/property_prediction/scripts/convert_checkpoint.py +194 -0
  35. smact-4.0.1/smact/property_prediction/tests/__init__.py +1 -0
  36. smact-4.0.1/smact/property_prediction/tests/test_base_predictor.py +185 -0
  37. smact-4.0.1/smact/property_prediction/tests/test_io.py +180 -0
  38. smact-4.0.1/smact/property_prediction/tests/test_registry.py +121 -0
  39. smact-4.0.1/smact/screening.py +693 -0
  40. {smact-3.2.0 → smact-4.0.1}/smact/structure_prediction/__init__.py +2 -0
  41. {smact-3.2.0 → smact-4.0.1}/smact/structure_prediction/database.py +84 -55
  42. {smact-3.2.0 → smact-4.0.1}/smact/structure_prediction/mutation.py +99 -78
  43. {smact-3.2.0 → smact-4.0.1}/smact/structure_prediction/prediction.py +122 -108
  44. {smact-3.2.0 → smact-4.0.1}/smact/structure_prediction/probability_models.py +16 -20
  45. {smact-3.2.0 → smact-4.0.1}/smact/structure_prediction/structure.py +276 -160
  46. smact-4.0.1/smact/structure_prediction/utilities.py +8 -0
  47. smact-4.0.1/smact/tests/__init__.py +0 -0
  48. smact-4.0.1/smact/tests/conftest.py +45 -0
  49. smact-4.0.1/smact/tests/test_core.py +863 -0
  50. smact-4.0.1/smact/tests/test_doper.py +154 -0
  51. smact-4.0.1/smact/tests/test_elementembeddings.py +152 -0
  52. smact-4.0.1/smact/tests/test_lattice_parameters.py +254 -0
  53. smact-4.0.1/smact/tests/test_metallicity.py +145 -0
  54. smact-4.0.1/smact/tests/test_packaging.py +173 -0
  55. smact-4.0.1/smact/tests/test_probability_models.py +79 -0
  56. smact-4.0.1/smact/tests/test_structure.py +1244 -0
  57. smact-4.0.1/smact/tests/test_utils.py +584 -0
  58. smact-4.0.1/smact/utils/__init__.py +5 -0
  59. {smact-3.2.0 → smact-4.0.1}/smact/utils/band_gap_simple.py +5 -7
  60. smact-4.0.1/smact/utils/composition.py +118 -0
  61. {smact-3.2.0 → smact-4.0.1}/smact/utils/crystal_space/__init__.py +2 -0
  62. {smact-3.2.0 → smact-4.0.1}/smact/utils/crystal_space/download_compounds_with_mp_api.py +21 -11
  63. smact-4.0.1/smact/utils/crystal_space/generate_composition_with_smact.py +254 -0
  64. {smact-3.2.0 → smact-4.0.1}/smact/utils/crystal_space/plot_embedding.py +35 -32
  65. {smact-3.2.0 → smact-4.0.1}/smact/utils/oxidation.py +103 -45
  66. smact-3.2.0/smact/structure_prediction/utilities.py → smact-4.0.1/smact/utils/species.py +26 -26
  67. smact-3.2.0/smact/benchmarking/utilities.py +0 -45
  68. smact-3.2.0/smact/builder.py +0 -85
  69. smact-3.2.0/smact/data_loader.py +0 -959
  70. smact-3.2.0/smact/dopant_prediction/doper.py +0 -376
  71. smact-3.2.0/smact/lattice_parameters.py +0 -349
  72. smact-3.2.0/smact/mainpage.py +0 -9
  73. smact-3.2.0/smact/properties.py +0 -204
  74. smact-3.2.0/smact/screening.py +0 -545
  75. smact-3.2.0/smact/tests/test_core.py +0 -545
  76. smact-3.2.0/smact/tests/test_doper.py +0 -86
  77. smact-3.2.0/smact/tests/test_metallicity.py +0 -172
  78. smact-3.2.0/smact/tests/test_structure.py +0 -600
  79. smact-3.2.0/smact/tests/test_utils.py +0 -330
  80. smact-3.2.0/smact/utils/__init__.py +0 -1
  81. smact-3.2.0/smact/utils/composition.py +0 -93
  82. smact-3.2.0/smact/utils/crystal_space/generate_composition_with_smact.py +0 -257
  83. {smact-3.2.0 → smact-4.0.1}/MANIFEST.in +0 -0
  84. {smact-3.2.0 → smact-4.0.1}/SMACT.egg-info/dependency_links.txt +0 -0
  85. {smact-3.2.0 → smact-4.0.1}/SMACT.egg-info/top_level.txt +0 -0
  86. {smact-3.2.0 → smact-4.0.1}/setup.cfg +0 -0
  87. {smact-3.2.0 → smact-4.0.1}/smact/benchmarking/__init__.py +0 -0
  88. {smact-3.2.0 → smact-4.0.1}/smact/benchmarking/pymatgen_benchmark.py +0 -0
  89. {smact-3.2.0 → smact-4.0.1}/smact/data/Covalent_radii.csv +0 -0
  90. {smact-3.2.0 → smact-4.0.1}/smact/data/SSE.csv +0 -0
  91. {smact-3.2.0 → smact-4.0.1}/smact/data/SSE_2015.csv +0 -0
  92. {smact-3.2.0 → smact-4.0.1}/smact/data/SSE_Pauling.csv +0 -0
  93. {smact-3.2.0 → smact-4.0.1}/smact/data/element_data.txt +0 -0
  94. {smact-3.2.0 → smact-4.0.1}/smact/data/element_valence_modified.csv +0 -0
  95. {smact-3.2.0 → smact-4.0.1}/smact/data/hhi.txt +0 -0
  96. {smact-3.2.0 → smact-4.0.1}/smact/data/ionic_radii.csv +0 -0
  97. {smact-3.2.0 → smact-4.0.1}/smact/data/magpie.csv +0 -0
  98. {smact-3.2.0 → smact-4.0.1}/smact/data/ordered_periodic.txt +0 -0
  99. {smact-3.2.0 → smact-4.0.1}/smact/data/oxidation_state_probability_table.json +0 -0
  100. {smact-3.2.0 → smact-4.0.1}/smact/data/oxidation_states.txt +0 -0
  101. {smact-3.2.0 → smact-4.0.1}/smact/data/oxidation_states_SP.txt +0 -0
  102. {smact-3.2.0 → smact-4.0.1}/smact/data/oxidation_states_icsd.txt +0 -0
  103. {smact-3.2.0 → smact-4.0.1}/smact/data/oxidation_states_icsd24_common.txt +0 -0
  104. {smact-3.2.0 → smact-4.0.1}/smact/data/oxidation_states_icsd24_counts.json +0 -0
  105. {smact-3.2.0 → smact-4.0.1}/smact/data/oxidation_states_icsd24_filtered.txt +0 -0
  106. {smact-3.2.0 → smact-4.0.1}/smact/data/oxidation_states_icsd24_raw.txt +0 -0
  107. {smact-3.2.0 → smact-4.0.1}/smact/data/oxidation_states_pmg.txt +0 -0
  108. {smact-3.2.0 → smact-4.0.1}/smact/data/oxidation_states_wiki.txt +0 -0
  109. {smact-3.2.0 → smact-4.0.1}/smact/data/shannon_radii.csv +0 -0
  110. {smact-3.2.0 → smact-4.0.1}/smact/data/shannon_radii_ML_extended.csv +0 -0
  111. {smact-3.2.0 → smact-4.0.1}/smact/data/solid_properties.txt +0 -0
  112. {smact-3.2.0 → smact-4.0.1}/smact/data/solid_properties.xlsx +0 -0
  113. {smact-3.2.0 → smact-4.0.1}/smact/data/species_rep/ion_embedding_M3GNet-MP-2023.11.1-oxi-Eform_cosine_similarity.json +0 -0
  114. {smact-3.2.0 → smact-4.0.1}/smact/data/species_rep/ion_embedding_M3GNet-MP-2023.11.1-oxi-band_gap_cosine_similarity.json +0 -0
  115. {smact-3.2.0 → smact-4.0.1}/smact/data/species_rep/skipspecies_20221028_319ion_dim200_cosine_similarity.json +0 -0
  116. /smact-3.2.0/smact/tests/__init__.py → /smact-4.0.1/smact/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2019 The SMACT Developers
3
+ Copyright (c) 2026 The SMACT Developers
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -19,3 +19,6 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
22
+
23
+ This project bundles third-party material under its own license terms;
24
+ see THIRD_PARTY_NOTICES.md.
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SMACT
3
- Version: 3.2.0
3
+ Version: 4.0.1
4
4
  Summary: Semiconducting Materials by Analogy and Chemical Theory
5
5
  Author-email: The SMACT Developers <a.walsh@imperial.ac.uk>
6
- Maintainer-email: "Anthony O. Onwuli" <anthony.onwuli16@imperial.ac.uk>
6
+ Maintainer-email: "Kinga O. Mastej" <k.mastej24@imperial.ac.uk>
7
7
  License-Expression: MIT
8
8
  Project-URL: Homepage, https://github.com/WMD-group/SMACT
9
9
  Project-URL: Documentation, https://smact.readthedocs.io/en/latest/
@@ -15,23 +15,24 @@ Classifier: Development Status :: 5 - Production/Stable
15
15
  Classifier: Intended Audience :: Science/Research
16
16
  Classifier: Operating System :: OS Independent
17
17
  Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3.10
19
18
  Classifier: Programming Language :: Python :: 3.11
20
19
  Classifier: Programming Language :: Python :: 3.12
21
20
  Classifier: Programming Language :: Python :: 3.13
22
21
  Classifier: Topic :: Scientific/Engineering
23
22
  Classifier: Topic :: Scientific/Engineering :: Chemistry
24
- Requires-Python: <3.14,>=3.10
23
+ Requires-Python: <3.14,>=3.11
25
24
  Description-Content-Type: text/markdown
26
25
  License-File: LICENSE
27
26
  Requires-Dist: ase
28
27
  Requires-Dist: numpy<3
29
- Requires-Dist: pandarallel[optional]>=1.6.5
28
+ Requires-Dist: pandarallel>=1.6.5
30
29
  Requires-Dist: pandas
31
30
  Requires-Dist: pathos
32
31
  Requires-Dist: pymatgen>=2024.2.20
33
32
  Requires-Dist: scipy
34
33
  Requires-Dist: spglib>=2.6.0
34
+ Requires-Dist: tabulate
35
+ Requires-Dist: tqdm
35
36
  Requires-Dist: typing-extensions
36
37
  Provides-Extra: dev
37
38
  Requires-Dist: pytest; extra == "dev"
@@ -46,7 +47,8 @@ Requires-Dist: sphinx==8.1.3; extra == "docs"
46
47
  Requires-Dist: sphinx_rtd_theme==3.0.2; extra == "docs"
47
48
  Requires-Dist: readthedocs-sphinx-search==0.3.2; extra == "docs"
48
49
  Requires-Dist: sphinx-book-theme==1.1.3; extra == "docs"
49
- Requires-Dist: myst-nb==1.1.2; extra == "docs"
50
+ Requires-Dist: tornado>=6.5.3; extra == "docs"
51
+ Requires-Dist: myst-nb==1.3.0; extra == "docs"
50
52
  Provides-Extra: mp
51
53
  Requires-Dist: mp-api>=0.45.3; extra == "mp"
52
54
  Provides-Extra: crystal-space
@@ -65,6 +67,10 @@ Provides-Extra: ml
65
67
  Requires-Dist: xgboost; extra == "ml"
66
68
  Requires-Dist: shap; extra == "ml"
67
69
  Requires-Dist: smact[featurisers]; extra == "ml"
70
+ Provides-Extra: property-prediction
71
+ Requires-Dist: aviary-models>=1.2.1; extra == "property-prediction"
72
+ Requires-Dist: requests; extra == "property-prediction"
73
+ Requires-Dist: torch<2.11,>=2.0.0; extra == "property-prediction"
68
74
  Provides-Extra: optional
69
75
  Requires-Dist: pydantic>=2.9.2; extra == "optional"
70
76
  Requires-Dist: smact[mp]; extra == "optional"
@@ -82,8 +88,7 @@ Requires-Dist: matplotlib-venn[shapely]>=1.1.2; extra == "optional"
82
88
  Provides-Extra: strict
83
89
  Requires-Dist: pydantic==2.9.2; extra == "strict"
84
90
  Requires-Dist: mp-api==0.45.5; extra == "strict"
85
- Requires-Dist: pymatviz==0.15.1; extra == "strict"
86
- Requires-Dist: mp-api==0.45.5; extra == "strict"
91
+ Requires-Dist: pymatviz==0.16.0; extra == "strict"
87
92
  Requires-Dist: seaborn==0.13.2; extra == "strict"
88
93
  Requires-Dist: pymatgen==2025.4.24; extra == "strict"
89
94
  Requires-Dist: matminer==0.9.3; extra == "strict"
@@ -92,15 +97,17 @@ Requires-Dist: kaleido==0.2.1; extra == "strict"
92
97
  Requires-Dist: ase==3.24.0; extra == "strict"
93
98
  Requires-Dist: numpy; extra == "strict"
94
99
  Requires-Dist: ElementEmbeddings==0.6.1; extra == "strict"
95
- Requires-Dist: dash==3.0.2; extra == "strict"
100
+ Requires-Dist: dash==3.3.0; extra == "strict"
101
+ Requires-Dist: tabulate==0.9.0; extra == "strict"
102
+ Requires-Dist: tqdm==4.67.1; extra == "strict"
96
103
  Dynamic: license-file
97
104
 
98
105
  [![DOI](https://joss.theoj.org/papers/10.21105/joss.01361/status.svg)](https://doi.org/10.21105/joss.01361)
99
- [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5553202.svg)](https://doi.org/10.5281/zenodo.5553202)
100
- [![Documentation Status](https://readthedocs.org/projects/smact/badge/?version=latest)](http://smact.readthedocs.org/en/latest/?badge=latest)
106
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.595853.svg)](https://doi.org/10.5281/zenodo.595853)
107
+ [![Documentation Status](https://readthedocs.org/projects/smact/badge/?version=latest)](https://smact.readthedocs.org/en/latest/?badge=latest)
101
108
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
102
109
  ![python version](https://img.shields.io/pypi/pyversions/smact)
103
- [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
110
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
104
111
  [![PyPi](https://img.shields.io/pypi/v/smact)](https://pypi.org/project/SMACT/)
105
112
  [![Conda](https://anaconda.org/conda-forge/smact/badges/version.svg)](https://anaconda.org/conda-forge/smact)
106
113
  [![GitHub issues](https://img.shields.io/github/issues-raw/WMD-Group/SMACT)](https://github.com/WMD-group/SMACT/issues)
@@ -111,12 +118,12 @@ Dynamic: license-file
111
118
 
112
119
  # SMACT
113
120
 
114
- **Semiconducting Materials from Analogy and Chemical Theory** (SMACT) is a collection of rapid screening and informatics tools that uses data about chemical elements.
121
+ **Semiconducting Materials by Analogy and Chemical Theory** (SMACT) is a collection of rapid screening and informatics tools that uses data about chemical elements.
115
122
 
116
123
  - **Documentation:** <https://smact.readthedocs.io/en/latest/>
117
124
  - **Examples:** <https://smact.readthedocs.io/en/latest/examples.html>
118
125
 
119
- ![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](SMACT.png)
126
+ ![A blue interface with the text "SMACT v4" 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](SMACT.png)
120
127
 
121
128
  _If you torture the data enough, nature will always confess_ - Roland Coase (from 'How should economists choose?')
122
129
 
@@ -129,7 +136,7 @@ There is a strong demand for functional materials across a wide range of technol
129
136
  ## Getting started
130
137
 
131
138
  Features are accessed through Python scripts, importing classes and functions as needed.
132
- The best place to start is looking at [the docs](https://smact.readthedocs.io/en/latest/), which highlight some simple examples of how these classes and functions can be usede
139
+ The best place to start is looking at [the docs](https://smact.readthedocs.io/en/latest/), which highlight some simple examples of how these classes and functions can be used.
133
140
  Use cases are available in our [examples](https://smact.readthedocs.io/en/latest/examples.html) and [tutorials](https://smact.readthedocs.io/en/latest/tutorials.html) folders.
134
141
 
135
142
  ## Code features
@@ -148,6 +155,12 @@ Use cases are available in our [examples](https://smact.readthedocs.io/en/latest
148
155
 
149
156
  - Compositions can be converted for use in Pymatgen or for representation to machine learning algorithms ([see this example](https://smact.readthedocs.io/en/latest/tutorials/smact_generation_of_solar_oxides.html)) and the related [ElementEmbeddings](https://github.com/WMD-group/ElementEmbeddings) package.
150
157
 
158
+ - Charge neutrality screening supports **mixed-valence compounds** via the `mixed_valence=True` flag in `smact_validity`, enabling correct handling of materials like Fe₃O₄ and Mn₃O₄.
159
+
160
+ - Oxidation state data is sourced from **ICSD 2024**, providing an updated and stricter set of experimentally observed oxidation states per element.
161
+
162
+ - The [property prediction module](https://smact.readthedocs.io/en/latest/smact.property_prediction.html) enables composition-to-property prediction using pretrained deep learning models, including a ROOST-based band gap predictor trained on the Materials Project database.
163
+
151
164
  - The code also has tools for manipulating common crystal lattice types:
152
165
  - Certain structure types can be built using the [builder module](https://smact.readthedocs.io/en/latest/smact.builder.html)
153
166
  - Lattice parameters can be estimated using ionic radii of the elements for various common crystal structure types using the [lattice_parameters module](https://smact.readthedocs.io/en/latest/smact.lattice_parameters.html).
@@ -155,6 +168,88 @@ Use cases are available in our [examples](https://smact.readthedocs.io/en/latest
155
168
  - The [structure prediction](https://smact.readthedocs.io/en/latest/smact.structure_prediction.html) module can be used to predict the structure of hypothetical compositions using species similarity measures.
156
169
  - The [dopant prediction](https://smact.readthedocs.io/en/latest/smact.dopant_prediction.html) module can be used to facilitate high-throughput predictions of p-type and n-type dopants of multicomponent solids.
157
170
 
171
+ ## Package structure
172
+
173
+ **Legend:** 🟢 new in v4 — 🟡 improved in v4
174
+
175
+ ```mermaid
176
+ graph TD
177
+ classDef new fill:#c8e6c9,stroke:#388e3c,color:#000
178
+ classDef improved fill:#fff9c4,stroke:#f9a825,color:#000
179
+
180
+ SMACT(["smact"])
181
+
182
+ SMACT --> core["Core modules"]
183
+ SMACT --> SP["structure_prediction"]
184
+ SMACT --> DP["dopant_prediction"]
185
+ SMACT --> PP["🟢 property_prediction"]
186
+ SMACT --> IO["🟢 io"]
187
+ SMACT --> UT["utils"]
188
+
189
+ core --> init["init.py — Element, Species, neutral_ratios"]
190
+ core --> dl["data_loader.py — elemental and oxidation state data loading"]
191
+ core --> sc["🟡 screening.py — compositional screening"]
192
+ core --> pr["properties.py — band gap, electronegativity, valence electron count"]
193
+ core --> ox["oxidation_states.py — oxidation state combination likelihood"]
194
+ core --> mt["metallicity.py — metallic character scoring"]
195
+ core --> la["lattice.py — Site and Lattice representations"]
196
+ core --> bld["🟡 builder.py — perovskite and wurtzite structure builders"]
197
+ core --> lp["🟡 lattice_parameters.py — lattice parameter estimation from ionic radii"]
198
+ core --> di["distorter.py — inequivalent site enumeration and substitution"]
199
+
200
+ sc --> sc1["smact_validity — charge neutrality and Pauling electronegativity test"]
201
+ sc --> sc2["smact_filter — compositional search space generation"]
202
+ sc --> sc3["🟢 mixed_valence flag — correct handling of Fe3O4, Mn3O4"]
203
+ sc --> sc4["🟢 ICSD 2024 oxidation states — stricter, updated elemental data"]
204
+
205
+ bld --> bld1["cubic_perovskite — parameterized oxidation state tiling"]
206
+ bld --> bld2["wurtzite — corrected default cell parameters"]
207
+
208
+ lp --> lp1["corrected geometric formulae for all structure types"]
209
+
210
+ SP --> spst["structure.py — SmactStructure"]
211
+ SP --> spdb["database.py — StructureDB SQLite interface"]
212
+ SP --> spmu["mutation.py — CationMutator from lambda tables"]
213
+ SP --> sppd["🟡 prediction.py — StructurePredictor"]
214
+
215
+ spst --> spst1["from_file, from_mp, from_pymatgen constructors"]
216
+ sppd --> sppd1["ionic substitution-based crystal structure prediction"]
217
+ sppd --> sppd2["🟢 updated to mp_api.client.MPRester interface"]
218
+
219
+ DP --> doper["🟡 doper.py — Doper"]
220
+ doper --> doper1["get_dopants — p-type and n-type candidates"]
221
+ doper --> doper2["to_table — ranked candidates as a formatted table"]
222
+ doper --> doper3["plot_dopants — periodic table heatmap visualisation"]
223
+
224
+ PP --> base["base_predictor.py — BasePropertyPredictor, PredictionResult"]
225
+ PP --> roost["roost/ — RoostPropertyPredictor"]
226
+ PP --> conv["convenience.py — predict_band_gap"]
227
+ PP --> reg["registry.py — model discovery and resolution"]
228
+
229
+ roost --> roost1["pretrained ROOST model for band gap prediction"]
230
+ roost --> roost2["uncertainty estimates alongside predictions"]
231
+ roost --> roost3["trained on Materials Project 2024 database"]
232
+ base --> base1["PredictionResult — value, uncertainty, metadata"]
233
+
234
+ IO --> ee["🟢 elementembeddings.py — ElementEmbeddings interface"]
235
+ ee --> ee1["composition_featuriser — composition-level feature vectors"]
236
+ ee --> ee2["species_featuriser — species-level feature vectors"]
237
+
238
+ UT --> comp["composition.py — parse_formula, comp_maker, formula_maker"]
239
+ UT --> uox["🟢 oxidation.py — ICSD24OxStatesFilter"]
240
+ UT --> sp2["species.py — parse_spec, unparse_spec"]
241
+ UT --> cs["crystal_space/"]
242
+
243
+ uox --> uox1["consensus and commonality-based filtering of oxidation states"]
244
+ cs --> cs1["generate_composition_with_smact.py — SMACT-based composition generation"]
245
+ cs --> cs2["download_compounds_with_mp_api.py — Materials Project bulk download"]
246
+ cs --> cs3["plot_embedding.py — crystal space visualisation"]
247
+
248
+ class PP,IO new
249
+ class sc,bld,lp,sppd,doper,uox improved
250
+ class sc3,sc4,sppd2,ee,uox new
251
+ ```
252
+
158
253
  ## List of modules
159
254
 
160
255
  - **smact** library containing:
@@ -172,44 +267,75 @@ Use cases are available in our [examples](https://smact.readthedocs.io/en/latest
172
267
  substituting on inequivalent sites of a sub-lattice.
173
268
  - **oxidation_states.py**: Used for predicting the likelihood of species coexisting in a compound based on a statistical model.
174
269
  - **structure_prediction**: A submodule which contains a collection of tools for facilitating crystal structure predictions via ionic substitutions
175
- - **dopant_prediction**: A submodule which contains a collections of tools for predicting dopants.
176
- - **utils.py** A collection of utility functions used throughout the codebase.
270
+ - **dopant_prediction**: A submodule which contains a collection of tools for predicting dopants.
271
+ - **property_prediction**: A submodule for composition-to-property prediction using pretrained deep learning models (e.g. ROOST band gap predictor).
272
+ - **utils**: A submodule containing utility functions for composition parsing, species handling, oxidation state filtering, and crystal space generation and download.
177
273
 
178
274
  ## Requirements
179
275
 
180
- The main language is Python 3 and has been tested using Python 3.10 - 3.13 (Windows is not officially supported for Python 3.13 as of yet).
181
- Basic requirements are Numpy and Scipy.
182
- The [Atomic Simulation Environment](https://wiki.fysik.dtu.dk/ase) (ASE), [spglib](http://atztogo.github.io/spglib), and [pymatgen](https://pymatgen.org) are also required for many components.
276
+ The main language is Python 3 and has been tested using Python 3.11 - 3.13.
277
+ Core dependencies include NumPy, SciPy, pandas, [pymatgen](https://pymatgen.org), [ASE](https://wiki.fysik.dtu.dk/ase), and [spglib](https://spglib.readthedocs.io). A full list is in [`pyproject.toml`](pyproject.toml).
183
278
 
184
279
  ## Installation
185
280
 
186
- The latest stable release can be installed via pip which will automatically set up other Python packages as required:
281
+ The latest stable release can be installed via pip:
282
+
283
+ ```bash
284
+ pip install smact
285
+ ```
286
+
287
+ Optional dependencies, needed by most of the examples and tutorials:
288
+
289
+ ```bash
290
+ pip install "smact[optional]"
291
+ ```
187
292
 
188
- pip install smact
293
+ The band-gap prediction example additionally needs the pre-trained ROOST models, which
294
+ bring in PyTorch. To run every example and tutorial:
189
295
 
190
- Optional dependencies can also be installed. These enable full replication of the examples and tutorials
296
+ ```bash
297
+ pip install "smact[optional,property_prediction]"
298
+ ```
191
299
 
192
- pip install "smact[optional]"
300
+ SMACT is also available via conda-forge:
193
301
 
194
- SMACT is also available via conda through the conda-forge channel on Anaconda Cloud:
302
+ ```bash
303
+ conda install -c conda-forge smact
304
+ ```
195
305
 
196
- conda install -c conda-forge smact
306
+ The optional functionality is available as conda-forge feature packages. Install
307
+ only the feature you need; for example, the pre-trained property-prediction
308
+ models can be installed with:
197
309
 
198
- Alternatively, the very latest version can be installed using:
310
+ ```bash
311
+ conda install -c conda-forge smact-property-prediction
312
+ ```
199
313
 
200
- pip install git+https://github.com/WMD-group/SMACT.git
314
+ The other feature packages are `smact-mp`, `smact-crystal-space`,
315
+ `smact-featurisers`, `smact-visualisation`, `smact-ml`, and `smact-optional`.
316
+ `smact-optional` matches the `smact[optional]` pip extra. To install all
317
+ documented examples and tutorials, including property prediction:
201
318
 
202
- For developer installation SMACT can be installed from a copy of the source
203
- repository (<https://github.com/wmd-group/smact>); this will be preferred if using experimental code branches.
319
+ ```bash
320
+ conda install -c conda-forge smact-optional smact-property-prediction
321
+ ```
204
322
 
205
- To clone the project from GitHub and make a local installation:
323
+ Conda feature packages use conda-forge builds of compiled dependencies such as
324
+ `pytorch` (the package is named `torch` on PyPI). Select any GPU-specific
325
+ `pytorch` configuration separately for your platform.
206
326
 
207
- git clone https://github.com/wmd-group/smact.git
208
- cd smact
209
- pip install --user -e .
327
+ ### Developer installation
210
328
 
211
- With -e pip will create links to the source folder so that that changes
212
- to the code will be immediately reflected on the PATH.
329
+ We use [uv](https://docs.astral.sh/uv/) for dependency management. To set up a development environment:
330
+
331
+ ```bash
332
+ git clone https://github.com/wmd-group/smact.git
333
+ cd smact
334
+ uv sync --extra optional --extra property_prediction --dev
335
+ pre-commit install
336
+ ```
337
+
338
+ This installs SMACT in editable mode with all optional and development dependencies, and sets up pre-commit hooks. See [CONTRIBUTING.md](CONTRIBUTING.md) for the full workflow.
213
339
 
214
340
  ## License and attribution
215
341
 
@@ -219,24 +345,38 @@ Python code and original data tables are licensed under the MIT License.
219
345
 
220
346
  ### Bugs, features and questions
221
347
 
222
- Please use the [Issue Tracker](https://github.com/WMD-group/smact/issues) to report bugs or request features in the first instance. While we hope that most questions can be answered by searching [the docs](https://smact.readthedocs.io/en/latest/), 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](mailto:anthony.onwuli16@imperial.ac.uk).
348
+ Please use the [Issue Tracker](https://github.com/WMD-group/smact/issues) to report bugs or request features in the first instance. While we hope that most questions can be answered by searching [the docs](https://smact.readthedocs.io/en/latest/), 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](mailto:k.mastej24@imperial.ac.uk).
223
349
 
224
350
  ### Code contributions
225
351
 
226
- 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"](https://guides.github.com/activities/forking/) workflow to make contributions and stick as closely as possible to the following:
352
+ 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](https://docs.github.com/en/get-started/using-github/github-flow): branch from `master`, open a pull request against `master`, and releases are tagged from `master`. Please use the ["Fork and Pull"](https://guides.github.com/activities/forking/) workflow to make contributions and stick as closely as possible to the following:
227
353
 
228
- - Code style should comply with [PEP8](http://www.python.org/dev/peps/pep-0008) where possible. [Google's house style](https://google.github.io/styleguide/pyguide.html) is also helpful, including a good model for docstrings.
229
- - Please use comments liberally when adding nontrivial features, and take the chance to clean up other people's code while looking at it.
354
+ - Code style is enforced by [ruff](https://docs.astral.sh/ruff/) (linting and formatting) and [pyright](https://github.com/microsoft/pyright) (type checking). Pre-commit hooks run these automatically on commit.
355
+ - Use [Google-style docstrings](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings).
230
356
  - Add tests wherever possible, and use the test suite to check if you broke anything.
231
357
  - Look at the [contributing guide](CONTRIBUTING.md) for more information.
232
358
 
233
359
  ### Tests
234
360
 
235
- We use integrated testing on GitHub via [GitHub Actions](https://github.com/features/actions). Testing modules should be pass/fail and wrapped into **tests/test_core.py** or another **tests/test_something.py** file added, if appropriate.
236
- Run the tests using `python -m pytest -v`.(The final `-v` is optional and adds more detail to the output.)
361
+ We use [GitHub Actions](https://github.com/features/actions) for CI. Tests should be added to **smact/tests/test_core.py** or another **smact/tests/test_something.py** file.
362
+
363
+ Run the tests locally:
364
+
365
+ ```bash
366
+ make test
367
+ ```
368
+
369
+ Or to run the full CI pipeline (pre-commit hooks and tests):
370
+
371
+ ```bash
372
+ make ci-local
373
+ ```
237
374
 
238
375
  ## References
239
376
 
377
+ [K. O. Mastej et al.,
378
+ "Chemical filters for ultra-high-throughput materials screening and generation" _arXiv_ (2026)](https://doi.org/10.48550/arXiv.2607.17910)
379
+
240
380
  [H. Park et al.,
241
381
  "Mapping inorganic crystal chemical space" _Faraday Discuss._ (2024)](https://pubs.rsc.org/en/content/articlelanding/2024/fd/d4fd00063c)
242
382