SMACT 2.6__tar.gz → 2.7__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.
- {smact-2.6/SMACT.egg-info → smact-2.7}/PKG-INFO +6 -5
- {smact-2.6 → smact-2.7}/README.md +2 -1
- {smact-2.6 → smact-2.7/SMACT.egg-info}/PKG-INFO +6 -5
- {smact-2.6 → smact-2.7}/SMACT.egg-info/SOURCES.txt +6 -1
- {smact-2.6 → smact-2.7}/SMACT.egg-info/requires.txt +1 -1
- {smact-2.6 → smact-2.7}/setup.py +9 -7
- {smact-2.6 → smact-2.7}/smact/__init__.py +42 -2
- smact-2.7/smact/data/element_valence_modified.csv +98 -0
- smact-2.7/smact/data/magpie.csv +98 -0
- {smact-2.6 → smact-2.7}/smact/data_loader.py +133 -0
- {smact-2.6 → smact-2.7}/smact/properties.py +46 -0
- {smact-2.6 → smact-2.7}/smact/screening.py +18 -10
- {smact-2.6 → smact-2.7}/smact/tests/test_core.py +23 -1
- smact-2.7/smact/tests/test_utils.py +76 -0
- smact-2.7/smact/utils/__init__.py +1 -0
- smact-2.7/smact/utils/composition.py +97 -0
- {smact-2.6 → smact-2.7}/LICENSE +0 -0
- {smact-2.6 → smact-2.7}/MANIFEST.in +0 -0
- {smact-2.6 → smact-2.7}/SMACT.egg-info/dependency_links.txt +0 -0
- {smact-2.6 → smact-2.7}/SMACT.egg-info/not-zip-safe +0 -0
- {smact-2.6 → smact-2.7}/SMACT.egg-info/top_level.txt +0 -0
- {smact-2.6 → smact-2.7}/pyproject.toml +0 -0
- {smact-2.6 → smact-2.7}/setup.cfg +0 -0
- {smact-2.6 → smact-2.7}/smact/builder.py +0 -0
- {smact-2.6 → smact-2.7}/smact/data/Covalent_radii.csv +0 -0
- {smact-2.6 → smact-2.7}/smact/data/HHIs.txt +0 -0
- {smact-2.6 → smact-2.7}/smact/data/SSE.csv +0 -0
- {smact-2.6 → smact-2.7}/smact/data/SSE_2015.csv +0 -0
- {smact-2.6 → smact-2.7}/smact/data/SSE_Pauling.csv +0 -0
- {smact-2.6 → smact-2.7}/smact/data/element_data.txt +0 -0
- {smact-2.6 → smact-2.7}/smact/data/ionic_radii.csv +0 -0
- {smact-2.6 → smact-2.7}/smact/data/ordered_periodic.txt +0 -0
- {smact-2.6 → smact-2.7}/smact/data/oxidation_state_probability_table.json +0 -0
- {smact-2.6 → smact-2.7}/smact/data/oxidation_states.txt +0 -0
- {smact-2.6 → smact-2.7}/smact/data/oxidation_states_SP.txt +0 -0
- {smact-2.6 → smact-2.7}/smact/data/oxidation_states_icsd.txt +0 -0
- {smact-2.6 → smact-2.7}/smact/data/oxidation_states_pmg.txt +0 -0
- {smact-2.6 → smact-2.7}/smact/data/oxidation_states_wiki.txt +0 -0
- {smact-2.6 → smact-2.7}/smact/data/oxidationstates.data +0 -0
- {smact-2.6 → smact-2.7}/smact/data/shannon_radii.csv +0 -0
- {smact-2.6 → smact-2.7}/smact/data/shannon_radii_ML_extended.csv +0 -0
- {smact-2.6 → smact-2.7}/smact/data/solid_properties.txt +0 -0
- {smact-2.6 → smact-2.7}/smact/data/solid_properties.xlsx +0 -0
- {smact-2.6 → smact-2.7}/smact/data/species_rep/skipspecies_20221028_319ion_dim200_cosine_similarity.json +0 -0
- {smact-2.6 → smact-2.7}/smact/distorter.py +0 -0
- {smact-2.6 → smact-2.7}/smact/dopant_prediction/__init__.py +0 -0
- {smact-2.6 → smact-2.7}/smact/dopant_prediction/doper.py +0 -0
- {smact-2.6 → smact-2.7}/smact/lattice.py +0 -0
- {smact-2.6 → smact-2.7}/smact/lattice_parameters.py +0 -0
- {smact-2.6 → smact-2.7}/smact/mainpage.py +0 -0
- {smact-2.6 → smact-2.7}/smact/oxidation_states.py +0 -0
- {smact-2.6 → smact-2.7}/smact/structure_prediction/__init__.py +0 -0
- {smact-2.6 → smact-2.7}/smact/structure_prediction/database.py +0 -0
- {smact-2.6 → smact-2.7}/smact/structure_prediction/mutation.py +0 -0
- {smact-2.6 → smact-2.7}/smact/structure_prediction/prediction.py +0 -0
- {smact-2.6 → smact-2.7}/smact/structure_prediction/probability_models.py +0 -0
- {smact-2.6 → smact-2.7}/smact/structure_prediction/structure.py +0 -0
- {smact-2.6 → smact-2.7}/smact/structure_prediction/utilities.py +0 -0
- {smact-2.6 → smact-2.7}/smact/tests/__init__.py +0 -0
- {smact-2.6 → smact-2.7}/smact/tests/test_doper.py +0 -0
- {smact-2.6 → smact-2.7}/smact/tests/test_structure.py +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: SMACT
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.7
|
|
4
4
|
Summary: Semiconducting Materials by Analogy and Chemical Theory
|
|
5
5
|
Home-page: https://github.com/WMD-group/SMACT
|
|
6
|
-
Author:
|
|
7
|
-
Author-email:
|
|
6
|
+
Author: The SMACT Developers
|
|
7
|
+
Author-email: a.walsh@imperial.ac.uk
|
|
8
8
|
Maintainer: Anthony O. Onwuli
|
|
9
9
|
Maintainer-email: anthony.onwuli16@imperial.ac.uk
|
|
10
10
|
License: MIT
|
|
@@ -25,7 +25,7 @@ License-File: LICENSE
|
|
|
25
25
|
Requires-Dist: scipy
|
|
26
26
|
Requires-Dist: numpy<2
|
|
27
27
|
Requires-Dist: spglib
|
|
28
|
-
Requires-Dist: pymatgen
|
|
28
|
+
Requires-Dist: pymatgen<2024.8.8,>=2024.2.20
|
|
29
29
|
Requires-Dist: ase
|
|
30
30
|
Requires-Dist: pandas
|
|
31
31
|
Requires-Dist: pathos
|
|
@@ -155,7 +155,7 @@ Development notes
|
|
|
155
155
|
-----------------
|
|
156
156
|
|
|
157
157
|
### Bugs, features and questions
|
|
158
|
-
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
|
|
158
|
+
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 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.
|
|
159
159
|
|
|
160
160
|
### Code contributions
|
|
161
161
|
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:
|
|
@@ -163,6 +163,7 @@ We are always looking for ways to make SMACT better and more useful to the wider
|
|
|
163
163
|
- 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.
|
|
164
164
|
- Please use comments liberally when adding nontrivial features, and take the chance to clean up other people's code while looking at it.
|
|
165
165
|
- Add tests wherever possible, and use the test suite to check if you broke anything.
|
|
166
|
+
- Look at the [contributing guide](CONTRIBUTING.md) for more information.
|
|
166
167
|
|
|
167
168
|
### Tests
|
|
168
169
|
Testing modules should be pass/fail and wrapped into **tests/test_core.py** or another **tests/test_something.py** file added, if appropriate.
|
|
@@ -122,7 +122,7 @@ Development notes
|
|
|
122
122
|
-----------------
|
|
123
123
|
|
|
124
124
|
### Bugs, features and questions
|
|
125
|
-
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
|
|
125
|
+
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 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.
|
|
126
126
|
|
|
127
127
|
### Code contributions
|
|
128
128
|
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:
|
|
@@ -130,6 +130,7 @@ We are always looking for ways to make SMACT better and more useful to the wider
|
|
|
130
130
|
- 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.
|
|
131
131
|
- Please use comments liberally when adding nontrivial features, and take the chance to clean up other people's code while looking at it.
|
|
132
132
|
- Add tests wherever possible, and use the test suite to check if you broke anything.
|
|
133
|
+
- Look at the [contributing guide](CONTRIBUTING.md) for more information.
|
|
133
134
|
|
|
134
135
|
### Tests
|
|
135
136
|
Testing modules should be pass/fail and wrapped into **tests/test_core.py** or another **tests/test_something.py** file added, if appropriate.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: SMACT
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.7
|
|
4
4
|
Summary: Semiconducting Materials by Analogy and Chemical Theory
|
|
5
5
|
Home-page: https://github.com/WMD-group/SMACT
|
|
6
|
-
Author:
|
|
7
|
-
Author-email:
|
|
6
|
+
Author: The SMACT Developers
|
|
7
|
+
Author-email: a.walsh@imperial.ac.uk
|
|
8
8
|
Maintainer: Anthony O. Onwuli
|
|
9
9
|
Maintainer-email: anthony.onwuli16@imperial.ac.uk
|
|
10
10
|
License: MIT
|
|
@@ -25,7 +25,7 @@ License-File: LICENSE
|
|
|
25
25
|
Requires-Dist: scipy
|
|
26
26
|
Requires-Dist: numpy<2
|
|
27
27
|
Requires-Dist: spglib
|
|
28
|
-
Requires-Dist: pymatgen
|
|
28
|
+
Requires-Dist: pymatgen<2024.8.8,>=2024.2.20
|
|
29
29
|
Requires-Dist: ase
|
|
30
30
|
Requires-Dist: pandas
|
|
31
31
|
Requires-Dist: pathos
|
|
@@ -155,7 +155,7 @@ Development notes
|
|
|
155
155
|
-----------------
|
|
156
156
|
|
|
157
157
|
### Bugs, features and questions
|
|
158
|
-
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
|
|
158
|
+
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 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.
|
|
159
159
|
|
|
160
160
|
### Code contributions
|
|
161
161
|
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:
|
|
@@ -163,6 +163,7 @@ We are always looking for ways to make SMACT better and more useful to the wider
|
|
|
163
163
|
- 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.
|
|
164
164
|
- Please use comments liberally when adding nontrivial features, and take the chance to clean up other people's code while looking at it.
|
|
165
165
|
- Add tests wherever possible, and use the test suite to check if you broke anything.
|
|
166
|
+
- Look at the [contributing guide](CONTRIBUTING.md) for more information.
|
|
166
167
|
|
|
167
168
|
### Tests
|
|
168
169
|
Testing modules should be pass/fail and wrapped into **tests/test_core.py** or another **tests/test_something.py** file added, if appropriate.
|
|
@@ -25,7 +25,9 @@ smact/data/SSE.csv
|
|
|
25
25
|
smact/data/SSE_2015.csv
|
|
26
26
|
smact/data/SSE_Pauling.csv
|
|
27
27
|
smact/data/element_data.txt
|
|
28
|
+
smact/data/element_valence_modified.csv
|
|
28
29
|
smact/data/ionic_radii.csv
|
|
30
|
+
smact/data/magpie.csv
|
|
29
31
|
smact/data/ordered_periodic.txt
|
|
30
32
|
smact/data/oxidation_state_probability_table.json
|
|
31
33
|
smact/data/oxidation_states.txt
|
|
@@ -51,4 +53,7 @@ smact/structure_prediction/utilities.py
|
|
|
51
53
|
smact/tests/__init__.py
|
|
52
54
|
smact/tests/test_core.py
|
|
53
55
|
smact/tests/test_doper.py
|
|
54
|
-
smact/tests/test_structure.py
|
|
56
|
+
smact/tests/test_structure.py
|
|
57
|
+
smact/tests/test_utils.py
|
|
58
|
+
smact/utils/__init__.py
|
|
59
|
+
smact/utils/composition.py
|
{smact-2.6 → smact-2.7}/setup.py
RENAMED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
|
|
3
|
-
__author__ = "
|
|
4
|
-
__author_email__ = "
|
|
3
|
+
__author__ = "The SMACT Developers"
|
|
4
|
+
__author_email__ = "a.walsh@imperial.ac.uk"
|
|
5
5
|
__copyright__ = (
|
|
6
6
|
"Copyright Daniel W. Davies, Adam J. Jackson, Keith T. Butler (2019)"
|
|
7
7
|
)
|
|
8
|
-
__version__ = "2.
|
|
8
|
+
__version__ = "2.7"
|
|
9
9
|
__maintainer__ = "Anthony O. Onwuli"
|
|
10
|
-
|
|
11
|
-
__date__ = "
|
|
10
|
+
__maintainer_email__ = "anthony.onwuli16@imperial.ac.uk"
|
|
11
|
+
__date__ = "August 30 2024"
|
|
12
|
+
|
|
12
13
|
|
|
13
14
|
import os
|
|
14
15
|
import unittest
|
|
@@ -28,10 +29,11 @@ if __name__ == "__main__":
|
|
|
28
29
|
author=__author__,
|
|
29
30
|
author_email=__author_email__,
|
|
30
31
|
maintainer=__maintainer__,
|
|
31
|
-
maintainer_email=
|
|
32
|
+
maintainer_email=__maintainer_email__,
|
|
32
33
|
license="MIT",
|
|
33
34
|
packages=[
|
|
34
35
|
"smact",
|
|
36
|
+
"smact.utils",
|
|
35
37
|
"smact.tests",
|
|
36
38
|
"smact.structure_prediction",
|
|
37
39
|
"smact.dopant_prediction",
|
|
@@ -52,7 +54,7 @@ if __name__ == "__main__":
|
|
|
52
54
|
"scipy",
|
|
53
55
|
"numpy<2",
|
|
54
56
|
"spglib",
|
|
55
|
-
"pymatgen>=2024.2.20",
|
|
57
|
+
"pymatgen>=2024.2.20,<2024.8.8",
|
|
56
58
|
"ase",
|
|
57
59
|
"pandas",
|
|
58
60
|
"pathos",
|
|
@@ -53,9 +53,11 @@ class Element:
|
|
|
53
53
|
|
|
54
54
|
Element.oxidation_states (list) : Default list of allowed oxidation states for use in SMACT
|
|
55
55
|
|
|
56
|
-
Element.
|
|
56
|
+
Element.oxidation_states_smact14 (list): Original list of oxidation states that were manually compiled for SMACT in 2014 (default in SMACT < 3.0)
|
|
57
57
|
|
|
58
|
-
Element.
|
|
58
|
+
Element.oxidation_states_sp (list) : List of oxidation states recognised by the Pymatgen Structure Predictor
|
|
59
|
+
|
|
60
|
+
Element.oxidation_states_icsd (list) : List of oxidation states that appear in the 2016 version of ICSD
|
|
59
61
|
|
|
60
62
|
Element.oxidation_states_wiki (list): List of oxidation states that appear wikipedia (https://en.wikipedia.org/wiki/Template:List_of_oxidation_states_of_the_elements) Data retrieved: 2022-09-22
|
|
61
63
|
|
|
@@ -73,6 +75,18 @@ class Element:
|
|
|
73
75
|
|
|
74
76
|
Element.HHI_r (float) : Hirfindahl-Hirschman Index for elemental reserves
|
|
75
77
|
|
|
78
|
+
Element.mendeleev (int): Mendeleev number
|
|
79
|
+
|
|
80
|
+
Element.AtomicWeight (float): Atomic weight
|
|
81
|
+
|
|
82
|
+
Element.MeltingT (float): Melting temperature in K
|
|
83
|
+
|
|
84
|
+
Element.num_valence (int): Number of valence electrons
|
|
85
|
+
|
|
86
|
+
Element.num_valence_modified (int): Number of valence electrons based on a modified definition
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
76
90
|
Raises:
|
|
77
91
|
NameError: Element not found in element.txt
|
|
78
92
|
Warning: Element not found in Eigenvalues.csv
|
|
@@ -140,6 +154,23 @@ class Element:
|
|
|
140
154
|
else:
|
|
141
155
|
sse_Pauling = None
|
|
142
156
|
|
|
157
|
+
magpie_data = data_loader.lookup_element_magpie_data(symbol)
|
|
158
|
+
if magpie_data:
|
|
159
|
+
mendeleev = magpie_data["MendeleevNumber"]
|
|
160
|
+
AtomicWeight = magpie_data["AtomicWeight"]
|
|
161
|
+
MeltingT = magpie_data["MeltingT"]
|
|
162
|
+
num_valence = magpie_data["NValence"]
|
|
163
|
+
else:
|
|
164
|
+
mendeleev = None
|
|
165
|
+
AtomicWeight = None
|
|
166
|
+
MeltingT = None
|
|
167
|
+
num_valence = None
|
|
168
|
+
|
|
169
|
+
valence_data = data_loader.lookup_element_valence_data(symbol)
|
|
170
|
+
num_valence_modified = (
|
|
171
|
+
valence_data["NValence"] if valence_data else None
|
|
172
|
+
)
|
|
173
|
+
|
|
143
174
|
for attribute, value in (
|
|
144
175
|
("coord_envs", coord_envs),
|
|
145
176
|
("covalent_radius", dataset["r_cov"]),
|
|
@@ -157,6 +188,10 @@ class Element:
|
|
|
157
188
|
"oxidation_states",
|
|
158
189
|
data_loader.lookup_element_oxidation_states(symbol),
|
|
159
190
|
),
|
|
191
|
+
(
|
|
192
|
+
"oxidation_states_smact14",
|
|
193
|
+
data_loader.lookup_element_oxidation_states(symbol),
|
|
194
|
+
),
|
|
160
195
|
(
|
|
161
196
|
"oxidation_states_icsd",
|
|
162
197
|
data_loader.lookup_element_oxidation_states_icsd(symbol),
|
|
@@ -174,6 +209,11 @@ class Element:
|
|
|
174
209
|
("SSE", sse),
|
|
175
210
|
("SSEPauling", sse_Pauling),
|
|
176
211
|
("symbol", symbol),
|
|
212
|
+
("mendeleev", mendeleev),
|
|
213
|
+
("AtomicWeight", AtomicWeight),
|
|
214
|
+
("MeltingT", MeltingT),
|
|
215
|
+
("num_valence", num_valence),
|
|
216
|
+
("num_valence_modified", num_valence_modified),
|
|
177
217
|
# ('vdw_radius', dataset['RVdW']),
|
|
178
218
|
):
|
|
179
219
|
setattr(self, attribute, value)
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
element,NValence
|
|
2
|
+
H,1
|
|
3
|
+
He,2
|
|
4
|
+
Li,1
|
|
5
|
+
Be,2
|
|
6
|
+
B,3
|
|
7
|
+
C,4
|
|
8
|
+
N,5
|
|
9
|
+
O,6
|
|
10
|
+
F,7
|
|
11
|
+
Ne,8
|
|
12
|
+
Na,1
|
|
13
|
+
Mg,2
|
|
14
|
+
Al,3
|
|
15
|
+
Si,4
|
|
16
|
+
P,5
|
|
17
|
+
S,6
|
|
18
|
+
Cl,7
|
|
19
|
+
Ar,8
|
|
20
|
+
K,1
|
|
21
|
+
Ca,2
|
|
22
|
+
Sc,3
|
|
23
|
+
Ti,4
|
|
24
|
+
V,5
|
|
25
|
+
Cr,6
|
|
26
|
+
Mn,7
|
|
27
|
+
Fe,8
|
|
28
|
+
Co,9
|
|
29
|
+
Ni,10
|
|
30
|
+
Cu,11
|
|
31
|
+
Zn,12
|
|
32
|
+
Ga,3
|
|
33
|
+
Ge,4
|
|
34
|
+
As,5
|
|
35
|
+
Se,6
|
|
36
|
+
Br,7
|
|
37
|
+
Kr,8
|
|
38
|
+
Rb,1
|
|
39
|
+
Sr,2
|
|
40
|
+
Y,3
|
|
41
|
+
Zr,4
|
|
42
|
+
Nb,5
|
|
43
|
+
Mo,6
|
|
44
|
+
Tc,7
|
|
45
|
+
Ru,8
|
|
46
|
+
Rh,9
|
|
47
|
+
Pd,10
|
|
48
|
+
Ag,11
|
|
49
|
+
Cd,12
|
|
50
|
+
In,3
|
|
51
|
+
Sn,4
|
|
52
|
+
Sb,5
|
|
53
|
+
Te,6
|
|
54
|
+
I,7
|
|
55
|
+
Xe,8
|
|
56
|
+
Cs,1
|
|
57
|
+
Ba,2
|
|
58
|
+
La,3
|
|
59
|
+
Ce,4
|
|
60
|
+
Pr,5
|
|
61
|
+
Nd,6
|
|
62
|
+
Pm,7
|
|
63
|
+
Sm,8
|
|
64
|
+
Eu,9
|
|
65
|
+
Gd,10
|
|
66
|
+
Tb,11
|
|
67
|
+
Dy,12
|
|
68
|
+
Ho,13
|
|
69
|
+
Er,14
|
|
70
|
+
Tm,15
|
|
71
|
+
Yb,16
|
|
72
|
+
Lu,3
|
|
73
|
+
Hf,4
|
|
74
|
+
Ta,5
|
|
75
|
+
W,6
|
|
76
|
+
Re,7
|
|
77
|
+
Os,8
|
|
78
|
+
Ir,9
|
|
79
|
+
Pt,10
|
|
80
|
+
Au,11
|
|
81
|
+
Hg,12
|
|
82
|
+
Tl,3
|
|
83
|
+
Pb,4
|
|
84
|
+
Bi,5
|
|
85
|
+
Po,6
|
|
86
|
+
At,7
|
|
87
|
+
Rn,8
|
|
88
|
+
Fr,1
|
|
89
|
+
Ra,2
|
|
90
|
+
Ac,3
|
|
91
|
+
Th,4
|
|
92
|
+
Pa,5
|
|
93
|
+
U,6
|
|
94
|
+
Np,7
|
|
95
|
+
Pu,8
|
|
96
|
+
Am,9
|
|
97
|
+
Cm,10
|
|
98
|
+
Bk,11
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
element,Number,MendeleevNumber,AtomicWeight,MeltingT,Column,Row,CovalentRadius,Electronegativity,NsValence,NpValence,NdValence,NfValence,NValence,NsUnfilled,NpUnfilled,NdUnfilled,NfUnfilled,NUnfilled,GSvolume_pa,GSbandgap,GSmagmom,SpaceGroupNumber
|
|
2
|
+
H,1.0,92.0,1.00794,14.01,1.0,1.0,31.0,2.2,1.0,0.0,0.0,0.0,1.0,1.0,0.0,0.0,0.0,1.0,6.615,7.853,0.0,194.0
|
|
3
|
+
He,2.0,98.0,4.002602,1211.4,18.0,1.0,28.0,1.63,2.0,0.0,0.0,0.0,2.0,0.0,0.0,0.0,0.0,0.0,12.305,18.098,0.0,225.0
|
|
4
|
+
Li,3.0,1.0,6.941,453.69,1.0,2.0,128.0,0.98,1.0,0.0,0.0,0.0,1.0,1.0,0.0,0.0,0.0,1.0,16.5933333333,0.0,0.0,229.0
|
|
5
|
+
Be,4.0,67.0,9.012182,1560.0,2.0,2.0,96.0,1.57,2.0,0.0,0.0,0.0,2.0,0.0,0.0,0.0,0.0,0.0,7.89,0.0,0.0,194.0
|
|
6
|
+
B,5.0,72.0,10.811,2348.0,13.0,2.0,84.0,2.04,2.0,1.0,0.0,0.0,3.0,0.0,5.0,0.0,0.0,5.0,7.1725,1.524,0.0,166.0
|
|
7
|
+
C,6.0,77.0,12.0107,3823.0,14.0,2.0,76.0,2.55,2.0,2.0,0.0,0.0,4.0,0.0,4.0,0.0,0.0,4.0,5.64,4.496,0.0,194.0
|
|
8
|
+
N,7.0,82.0,14.0067,63.05,15.0,2.0,71.0,3.04,2.0,3.0,0.0,0.0,5.0,0.0,3.0,0.0,0.0,3.0,14.76875,6.437,0.0,194.0
|
|
9
|
+
O,8.0,87.0,15.9994,54.8,16.0,2.0,66.0,3.44,2.0,4.0,0.0,0.0,6.0,0.0,2.0,0.0,0.0,2.0,9.105,0.0,0.0,12.0
|
|
10
|
+
F,9.0,93.0,18.9984032,53.5,17.0,2.0,57.0,3.98,2.0,5.0,0.0,0.0,7.0,0.0,1.0,0.0,0.0,1.0,9.7075,1.97,0.0,15.0
|
|
11
|
+
Ne,10.0,99.0,20.1791,24.56,18.0,2.0,58.0,1.63,2.0,6.0,0.0,0.0,8.0,0.0,0.0,0.0,0.0,0.0,12.64,13.088,0.0,225.0
|
|
12
|
+
Na,11.0,2.0,22.98976928,370.87,1.0,3.0,166.0,0.93,1.0,0.0,0.0,0.0,1.0,1.0,0.0,0.0,0.0,1.0,29.2433333333,0.0,0.0,229.0
|
|
13
|
+
Mg,12.0,68.0,24.305,923.0,2.0,3.0,141.0,1.31,2.0,0.0,0.0,0.0,2.0,0.0,0.0,0.0,0.0,0.0,22.89,0.0,0.0,194.0
|
|
14
|
+
Al,13.0,73.0,26.9815386,933.47,13.0,3.0,121.0,1.61,2.0,1.0,0.0,0.0,3.0,0.0,5.0,0.0,0.0,5.0,16.48,0.0,0.0,225.0
|
|
15
|
+
Si,14.0,78.0,28.0855,1687.0,14.0,3.0,111.0,1.9,2.0,2.0,0.0,0.0,4.0,0.0,4.0,0.0,0.0,4.0,20.44,0.773,0.0,227.0
|
|
16
|
+
P,15.0,83.0,30.973762,317.3,15.0,3.0,107.0,2.19,2.0,3.0,0.0,0.0,5.0,0.0,3.0,0.0,0.0,3.0,22.5702380952,1.625,0.0,2.0
|
|
17
|
+
S,16.0,88.0,32.065,388.36,16.0,3.0,105.0,2.58,2.0,4.0,0.0,0.0,6.0,0.0,2.0,0.0,0.0,2.0,25.786875,2.202,0.0,70.0
|
|
18
|
+
Cl,17.0,94.0,35.453,171.6,17.0,3.0,102.0,3.16,2.0,5.0,0.0,0.0,7.0,0.0,1.0,0.0,0.0,1.0,24.4975,2.493,0.0,64.0
|
|
19
|
+
Ar,18.0,100.0,39.948,83.8,18.0,3.0,106.0,1.63,2.0,6.0,0.0,0.0,8.0,0.0,0.0,0.0,0.0,0.0,28.54,9.26,0.0,225.0
|
|
20
|
+
K,19.0,3.0,39.0983,336.53,1.0,4.0,203.0,0.82,1.0,0.0,0.0,0.0,1.0,1.0,0.0,0.0,0.0,1.0,73.1066666667,0.0,0.0,229.0
|
|
21
|
+
Ca,20.0,7.0,40.078,1115.0,2.0,4.0,176.0,1.0,2.0,0.0,0.0,0.0,2.0,0.0,0.0,0.0,0.0,0.0,37.77,0.0,0.0,225.0
|
|
22
|
+
Sc,21.0,11.0,44.955912,1814.0,3.0,4.0,170.0,1.36,2.0,0.0,1.0,0.0,3.0,0.0,0.0,9.0,0.0,9.0,22.235,0.0,6.35e-06,194.0
|
|
23
|
+
Ti,22.0,43.0,47.867,1941.0,4.0,4.0,160.0,1.54,2.0,0.0,2.0,0.0,4.0,0.0,0.0,8.0,0.0,8.0,16.69,0.0,2.25333333333e-05,194.0
|
|
24
|
+
V,23.0,46.0,50.9415,2183.0,5.0,4.0,153.0,1.63,2.0,0.0,3.0,0.0,5.0,0.0,0.0,7.0,0.0,7.0,13.01,0.0,0.0,229.0
|
|
25
|
+
Cr,24.0,49.0,51.9961,2180.0,6.0,4.0,139.0,1.66,1.0,0.0,5.0,0.0,6.0,1.0,0.0,5.0,0.0,6.0,11.19,0.0,0.0,229.0
|
|
26
|
+
Mn,25.0,52.0,54.938045,1519.0,7.0,4.0,139.0,1.55,2.0,0.0,5.0,0.0,7.0,0.0,0.0,5.0,0.0,5.0,10.4875862069,0.0,0.000310120689655,217.0
|
|
27
|
+
Fe,26.0,55.0,55.845,1811.0,8.0,4.0,132.0,1.83,2.0,0.0,6.0,0.0,8.0,0.0,0.0,4.0,0.0,4.0,10.73,0.0,2.1106628,229.0
|
|
28
|
+
Co,27.0,58.0,58.933195,1768.0,9.0,4.0,126.0,1.88,2.0,0.0,7.0,0.0,9.0,0.0,0.0,3.0,0.0,3.0,10.245,0.0,1.5484712,194.0
|
|
29
|
+
Ni,28.0,61.0,58.6934,1728.0,10.0,4.0,124.0,1.91,2.0,0.0,8.0,0.0,10.0,0.0,0.0,2.0,0.0,2.0,10.32,0.0,0.5953947,225.0
|
|
30
|
+
Cu,29.0,64.0,63.546,1357.77,11.0,4.0,132.0,1.9,1.0,0.0,10.0,0.0,11.0,1.0,0.0,0.0,0.0,1.0,11.07,0.0,0.0,225.0
|
|
31
|
+
Zn,30.0,69.0,65.38,692.68,12.0,4.0,122.0,1.65,2.0,0.0,10.0,0.0,12.0,0.0,0.0,0.0,0.0,0.0,13.96,0.0,0.0,194.0
|
|
32
|
+
Ga,31.0,74.0,69.723,302.91,13.0,4.0,122.0,1.81,2.0,1.0,10.0,0.0,13.0,0.0,5.0,0.0,0.0,5.0,18.8575,0.0,0.0,64.0
|
|
33
|
+
Ge,32.0,79.0,72.64,1211.4,14.0,4.0,120.0,2.01,2.0,2.0,10.0,0.0,14.0,0.0,4.0,0.0,0.0,4.0,23.005,0.383,0.0,225.0
|
|
34
|
+
As,33.0,84.0,74.9216,1090.0,15.0,4.0,119.0,2.18,2.0,3.0,10.0,0.0,15.0,0.0,3.0,0.0,0.0,3.0,22.175,0.0,0.0,166.0
|
|
35
|
+
Se,34.0,89.0,78.96,494.0,16.0,4.0,120.0,2.55,2.0,4.0,10.0,0.0,16.0,0.0,2.0,0.0,0.0,2.0,25.92,0.799,0.0,14.0
|
|
36
|
+
Br,35.0,95.0,79.904,265.8,17.0,4.0,120.0,2.96,2.0,5.0,10.0,0.0,17.0,0.0,1.0,0.0,0.0,1.0,29.48,1.457,0.0,64.0
|
|
37
|
+
Kr,36.0,101.0,83.798,115.79,18.0,4.0,116.0,3.0,2.0,6.0,10.0,0.0,18.0,0.0,0.0,0.0,0.0,0.0,36.06,7.535,0.0,225.0
|
|
38
|
+
Rb,37.0,4.0,85.4678,312.46,1.0,5.0,220.0,0.82,1.0,0.0,0.0,0.0,1.0,1.0,0.0,0.0,0.0,1.0,90.7225,0.0,0.0,229.0
|
|
39
|
+
Sr,38.0,8.0,87.62,1050.0,2.0,5.0,195.0,0.95,2.0,0.0,0.0,0.0,2.0,0.0,0.0,0.0,0.0,0.0,54.23,0.0,0.0,225.0
|
|
40
|
+
Y,39.0,12.0,88.90585,1799.0,3.0,5.0,190.0,1.22,2.0,0.0,1.0,0.0,3.0,0.0,0.0,9.0,0.0,9.0,32.365,0.0,0.0,194.0
|
|
41
|
+
Zr,40.0,44.0,91.224,2128.0,4.0,5.0,175.0,1.33,2.0,0.0,2.0,0.0,4.0,0.0,0.0,8.0,0.0,8.0,23.195,0.0,0.0,194.0
|
|
42
|
+
Nb,41.0,47.0,92.90638,2750.0,5.0,5.0,164.0,1.6,1.0,0.0,4.0,0.0,5.0,1.0,0.0,6.0,0.0,7.0,18.18,0.0,0.0,229.0
|
|
43
|
+
Mo,42.0,50.0,95.96,2896.0,6.0,5.0,154.0,2.16,1.0,0.0,5.0,0.0,6.0,1.0,0.0,5.0,0.0,6.0,15.69,0.0,0.0,229.0
|
|
44
|
+
Tc,43.0,53.0,98.0,2430.0,7.0,5.0,147.0,1.9,2.0,0.0,5.0,0.0,7.0,0.0,0.0,5.0,0.0,5.0,14.285,0.0,0.0,194.0
|
|
45
|
+
Ru,44.0,56.0,101.07,2607.0,8.0,5.0,146.0,2.2,1.0,0.0,7.0,0.0,8.0,1.0,0.0,3.0,0.0,4.0,13.51,0.0,0.0,194.0
|
|
46
|
+
Rh,45.0,59.0,102.9055,2237.0,9.0,5.0,142.0,2.28,1.0,0.0,8.0,0.0,9.0,1.0,0.0,2.0,0.0,3.0,13.64,0.0,0.0,225.0
|
|
47
|
+
Pd,46.0,62.0,106.42,1828.05,10.0,5.0,139.0,2.2,0.0,0.0,10.0,0.0,10.0,0.0,0.0,0.0,0.0,0.0,14.41,0.0,0.0,225.0
|
|
48
|
+
Ag,47.0,65.0,107.8682,1234.93,11.0,5.0,145.0,1.93,1.0,0.0,10.0,0.0,11.0,1.0,0.0,0.0,0.0,1.0,16.33,0.0,0.0,225.0
|
|
49
|
+
Cd,48.0,70.0,112.411,594.22,12.0,5.0,144.0,1.69,2.0,0.0,10.0,0.0,12.0,0.0,0.0,0.0,0.0,0.0,19.495,0.0,0.0,194.0
|
|
50
|
+
In,49.0,75.0,114.818,429.75,13.0,5.0,142.0,1.78,2.0,1.0,10.0,0.0,13.0,0.0,5.0,0.0,0.0,5.0,24.26,0.0,0.0,139.0
|
|
51
|
+
Sn,50.0,80.0,118.71,505.08,14.0,5.0,139.0,1.96,2.0,2.0,10.0,0.0,14.0,0.0,4.0,0.0,0.0,4.0,33.285,0.0,0.0,141.0
|
|
52
|
+
Sb,51.0,85.0,121.76,903.78,15.0,5.0,139.0,2.05,2.0,3.0,10.0,0.0,15.0,0.0,3.0,0.0,0.0,3.0,31.56,0.0,0.0,166.0
|
|
53
|
+
Te,52.0,90.0,127.6,722.66,16.0,5.0,138.0,2.1,2.0,4.0,10.0,0.0,16.0,0.0,2.0,0.0,0.0,2.0,34.7633333333,0.464,0.0,152.0
|
|
54
|
+
I,53.0,96.0,126.90447,386.85,17.0,5.0,139.0,2.66,2.0,5.0,10.0,0.0,17.0,0.0,1.0,0.0,0.0,1.0,43.015,1.062,0.0,64.0
|
|
55
|
+
Xe,54.0,102.0,131.293,161.3,18.0,5.0,140.0,2.6,2.0,6.0,10.0,0.0,18.0,0.0,0.0,0.0,0.0,0.0,53.65,6.456,0.0,225.0
|
|
56
|
+
Cs,55.0,5.0,132.9054519,301.59,1.0,6.0,244.0,0.79,1.0,0.0,0.0,0.0,1.0,1.0,0.0,0.0,0.0,1.0,115.765,0.0,0.0,229.0
|
|
57
|
+
Ba,56.0,9.0,137.327,1000.0,2.0,6.0,215.0,0.89,2.0,0.0,0.0,0.0,2.0,0.0,0.0,0.0,0.0,0.0,63.59,0.0,0.0,229.0
|
|
58
|
+
La,57.0,13.0,138.90547,1193.0,3.0,6.0,207.0,1.1,2.0,0.0,1.0,0.0,3.0,0.0,0.0,9.0,0.0,9.0,36.8975,0.0,0.0,194.0
|
|
59
|
+
Ce,58.0,15.0,140.116,1071.0,3.0,6.0,204.0,1.12,2.0,0.0,1.0,1.0,4.0,0.0,0.0,9.0,13.0,22.0,37.24,0.0,0.0,194.0
|
|
60
|
+
Pr,59.0,17.0,140.90765,1204.0,3.0,6.0,203.0,1.13,2.0,0.0,0.0,3.0,5.0,0.0,0.0,0.0,11.0,11.0,35.675,0.0,0.0,194.0
|
|
61
|
+
Nd,60.0,19.0,144.242,1294.0,3.0,6.0,201.0,1.14,2.0,0.0,0.0,4.0,6.0,0.0,0.0,0.0,10.0,10.0,34.81,0.0,0.0,194.0
|
|
62
|
+
Pm,61.0,21.0,145.0,1373.0,3.0,6.0,199.0,1.155,2.0,0.0,0.0,5.0,7.0,0.0,0.0,0.0,9.0,9.0,33.8425,0.0,0.0,194.0
|
|
63
|
+
Sm,62.0,23.0,150.36,1345.0,3.0,6.0,198.0,1.17,2.0,0.0,0.0,6.0,8.0,0.0,0.0,0.0,8.0,8.0,33.23,0.0,0.0,166.0
|
|
64
|
+
Eu,63.0,25.0,151.964,1095.0,3.0,6.0,198.0,1.185,2.0,0.0,0.0,7.0,9.0,0.0,0.0,0.0,7.0,7.0,36.46,0.0,0.0,229.0
|
|
65
|
+
Gd,64.0,27.0,157.25,1586.0,3.0,6.0,196.0,1.2,2.0,0.0,1.0,7.0,10.0,0.0,0.0,9.0,7.0,16.0,32.05,0.0,0.0,194.0
|
|
66
|
+
Tb,65.0,29.0,158.92535,1629.0,3.0,6.0,194.0,1.21,2.0,0.0,0.0,9.0,11.0,0.0,0.0,0.0,5.0,5.0,31.7366666667,0.0,0.0,194.0
|
|
67
|
+
Dy,66.0,31.0,162.5,1685.0,3.0,6.0,192.0,1.22,2.0,0.0,0.0,10.0,12.0,0.0,0.0,0.0,4.0,4.0,31.24,0.0,0.0,194.0
|
|
68
|
+
Ho,67.0,33.0,164.93032,1747.0,3.0,6.0,192.0,1.23,2.0,0.0,0.0,11.0,13.0,0.0,0.0,0.0,3.0,3.0,30.7333333333,0.0,0.0,194.0
|
|
69
|
+
Er,68.0,35.0,167.259,1770.0,3.0,6.0,189.0,1.24,2.0,0.0,0.0,12.0,14.0,0.0,0.0,0.0,2.0,2.0,30.585,0.0,0.0,194.0
|
|
70
|
+
Tm,69.0,37.0,168.93421,1818.0,3.0,6.0,190.0,1.25,2.0,0.0,0.0,13.0,15.0,0.0,0.0,0.0,1.0,1.0,29.78,0.0,0.0,194.0
|
|
71
|
+
Yb,70.0,39.0,173.054,1092.0,3.0,6.0,187.0,1.26,2.0,0.0,0.0,14.0,16.0,0.0,0.0,0.0,0.0,0.0,34.12,0.0,0.0,225.0
|
|
72
|
+
Lu,71.0,41.0,174.9668,1936.0,3.0,6.0,187.0,1.27,2.0,0.0,1.0,14.0,17.0,0.0,0.0,9.0,0.0,9.0,28.865,0.0,0.0022471,194.0
|
|
73
|
+
Hf,72.0,45.0,178.49,2506.0,4.0,6.0,175.0,1.3,2.0,0.0,2.0,14.0,18.0,0.0,0.0,8.0,0.0,8.0,22.2,0.0,0.0,194.0
|
|
74
|
+
Ta,73.0,48.0,180.94788,3290.0,5.0,6.0,170.0,1.5,2.0,0.0,3.0,14.0,19.0,0.0,0.0,7.0,0.0,7.0,18.12,0.0,0.0,229.0
|
|
75
|
+
W,74.0,51.0,183.84,3695.0,6.0,6.0,162.0,2.36,2.0,0.0,4.0,14.0,20.0,0.0,0.0,6.0,0.0,6.0,16.05,0.0,0.0,229.0
|
|
76
|
+
Re,75.0,54.0,186.207,3459.0,7.0,6.0,151.0,1.9,2.0,0.0,5.0,14.0,21.0,0.0,0.0,5.0,0.0,5.0,14.655,0.0,0.0,194.0
|
|
77
|
+
Os,76.0,57.0,190.23,3306.0,8.0,6.0,144.0,2.2,2.0,0.0,6.0,14.0,22.0,0.0,0.0,4.0,0.0,4.0,14.09,0.0,0.0,194.0
|
|
78
|
+
Ir,77.0,60.0,192.217,2739.0,9.0,6.0,141.0,2.2,2.0,0.0,7.0,14.0,23.0,0.0,0.0,3.0,0.0,3.0,14.21,0.0,0.0,225.0
|
|
79
|
+
Pt,78.0,63.0,195.084,2041.4,10.0,6.0,136.0,2.28,1.0,0.0,9.0,14.0,24.0,1.0,0.0,1.0,0.0,2.0,15.02,0.0,0.0,225.0
|
|
80
|
+
Au,79.0,66.0,196.966569,1337.33,11.0,6.0,136.0,2.54,1.0,0.0,10.0,14.0,25.0,1.0,0.0,0.0,0.0,1.0,16.7,0.0,0.0,225.0
|
|
81
|
+
Hg,80.0,71.0,200.59,234.32,12.0,6.0,132.0,2.0,2.0,0.0,10.0,14.0,26.0,0.0,0.0,0.0,0.0,0.0,25.2375862069,0.0,0.0,166.0
|
|
82
|
+
Tl,81.0,76.0,204.3833,577.0,13.0,6.0,145.0,1.62,2.0,1.0,10.0,14.0,27.0,0.0,5.0,0.0,0.0,5.0,26.91,0.0,0.0,194.0
|
|
83
|
+
Pb,82.0,81.0,207.2,600.61,14.0,6.0,146.0,2.33,2.0,2.0,10.0,14.0,28.0,0.0,4.0,0.0,0.0,4.0,28.11,0.0,0.0,225.0
|
|
84
|
+
Bi,83.0,86.0,208.9804,544.4,15.0,6.0,148.0,2.02,2.0,3.0,10.0,14.0,29.0,0.0,3.0,0.0,0.0,3.0,32.95,0.0,0.0,12.0
|
|
85
|
+
Po,84.0,91.0,209.0,527.0,16.0,6.0,140.0,2.0,2.0,4.0,10.0,14.0,30.0,0.0,2.0,0.0,0.0,2.0,38.73125,0.0,0.0,221.0
|
|
86
|
+
At,85.0,97.0,210.0,575.0,17.0,6.0,150.0,2.2,2.0,5.0,10.0,14.0,31.0,0.0,1.0,0.0,0.0,1.0,38.73125,0.0,0.0,194.0
|
|
87
|
+
Rn,86.0,103.0,222.0,202.0,18.0,6.0,150.0,1.63,2.0,6.0,10.0,14.0,32.0,0.0,0.0,0.0,0.0,0.0,38.73125,0.0,0.0,194.0
|
|
88
|
+
Fr,87.0,6.0,223.0,1211.4,1.0,7.0,260.0,0.7,1.0,0.0,0.0,0.0,1.0,1.0,0.0,0.0,0.0,1.0,38.73125,0.0,0.0,194.0
|
|
89
|
+
Ra,88.0,10.0,226.0,973.0,2.0,7.0,221.0,0.9,2.0,0.0,0.0,0.0,2.0,0.0,0.0,0.0,0.0,0.0,38.73125,0.0,0.0,229.0
|
|
90
|
+
Ac,89.0,14.0,227.0,1323.0,3.0,7.0,215.0,1.1,2.0,0.0,1.0,0.0,3.0,0.0,0.0,9.0,0.0,9.0,44.5125,0.0,0.0,225.0
|
|
91
|
+
Th,90.0,16.0,232.03806,2023.0,3.0,7.0,206.0,1.3,2.0,0.0,2.0,0.0,4.0,0.0,0.0,8.0,0.0,8.0,32.37,0.0,0.0,225.0
|
|
92
|
+
Pa,91.0,18.0,231.03586,1845.0,3.0,7.0,200.0,1.5,2.0,0.0,1.0,2.0,5.0,0.0,0.0,9.0,12.0,21.0,25.18,0.0,0.0,139.0
|
|
93
|
+
U,92.0,20.0,238.02891,1408.0,3.0,7.0,196.0,1.38,2.0,0.0,1.0,3.0,6.0,0.0,0.0,9.0,11.0,20.0,20.025,0.0,0.0,63.0
|
|
94
|
+
Np,93.0,22.0,237.0,917.0,3.0,7.0,190.0,1.36,2.0,0.0,1.0,4.0,7.0,0.0,0.0,9.0,10.0,19.0,18.45375,0.0,0.0,62.0
|
|
95
|
+
Pu,94.0,24.0,244.0,913.0,3.0,7.0,187.0,1.28,2.0,0.0,0.0,6.0,8.0,0.0,0.0,0.0,8.0,8.0,18.08,0.0,0.3180036375,11.0
|
|
96
|
+
Am,95.0,26.0,243.0,1449.0,3.0,7.0,180.0,1.3,2.0,0.0,0.0,7.0,9.0,0.0,0.0,0.0,7.0,7.0,18.08,0.0,0.3180036375,194.0
|
|
97
|
+
Cm,96.0,28.0,247.0,1618.0,3.0,7.0,169.0,1.3,2.0,0.0,1.0,7.0,10.0,0.0,0.0,9.0,7.0,16.0,18.08,0.0,0.3180036375,194.0
|
|
98
|
+
Bk,97.0,30.0,247.0,1323.0,3.0,7.0,146.0,1.3,2.0,0.0,0.0,9.0,11.0,0.0,0.0,0.0,5.0,5.0,18.08,0.0,0.3180036375,194.0
|
|
@@ -13,6 +13,8 @@ are used in the background and it is not necessary to use them directly.
|
|
|
13
13
|
import csv
|
|
14
14
|
import os
|
|
15
15
|
|
|
16
|
+
import pandas as pd
|
|
17
|
+
|
|
16
18
|
from smact import data_directory
|
|
17
19
|
|
|
18
20
|
# Module-level switch: print "verbose" warning messages
|
|
@@ -822,3 +824,134 @@ def lookup_element_sse_pauling_data(symbol):
|
|
|
822
824
|
)
|
|
823
825
|
|
|
824
826
|
return None
|
|
827
|
+
|
|
828
|
+
|
|
829
|
+
_element_magpie_data = None
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
def lookup_element_magpie_data(symbol: str, copy: bool = True):
|
|
833
|
+
"""
|
|
834
|
+
Retrieve element data contained in the Magpie representation.
|
|
835
|
+
|
|
836
|
+
Taken from Ward, L., Agrawal, A., Choudhary, A. et al.
|
|
837
|
+
A general-purpose machine learning framework for
|
|
838
|
+
predicting properties of inorganic materials.
|
|
839
|
+
npj Comput Mater 2, 16028 (2016).
|
|
840
|
+
https://doi.org/10.1038/npjcompumats.2016.28
|
|
841
|
+
|
|
842
|
+
Args:
|
|
843
|
+
symbol : the atomic symbol of the element to look up.
|
|
844
|
+
copy: if True (default), return a copy of the data dictionary,
|
|
845
|
+
rather than a reference to a cached object -- only use
|
|
846
|
+
copy=False in performance-sensitive code and where you are
|
|
847
|
+
certain the dictionary will not be modified!
|
|
848
|
+
|
|
849
|
+
Returns:
|
|
850
|
+
list:
|
|
851
|
+
Magpie features.
|
|
852
|
+
Returns None if the element was not found among the external
|
|
853
|
+
data.
|
|
854
|
+
|
|
855
|
+
Magpie features are dictionaries with the keys:
|
|
856
|
+
|
|
857
|
+
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
"""
|
|
861
|
+
|
|
862
|
+
global _element_magpie_data
|
|
863
|
+
|
|
864
|
+
if _element_magpie_data is None:
|
|
865
|
+
_element_magpie_data = {}
|
|
866
|
+
|
|
867
|
+
df = pd.read_csv(os.path.join(data_directory, "magpie.csv"))
|
|
868
|
+
for _index, row in df.iterrows():
|
|
869
|
+
key = row.iloc[0]
|
|
870
|
+
|
|
871
|
+
dataset = {
|
|
872
|
+
"Number": int(row.iloc[1]),
|
|
873
|
+
"MendeleevNumber": int(row.iloc[2]),
|
|
874
|
+
"AtomicWeight": float(row.iloc[3]),
|
|
875
|
+
"MeltingT": float(row.iloc[4]),
|
|
876
|
+
"Column": int(row.iloc[5]),
|
|
877
|
+
"Row": int(row.iloc[6]),
|
|
878
|
+
"CovalentRadius": float(row.iloc[7]),
|
|
879
|
+
"Electronegativity": float(row.iloc[8]),
|
|
880
|
+
"NsValence": int(row.iloc[9]),
|
|
881
|
+
"NpValence": int(row.iloc[10]),
|
|
882
|
+
"NdValence": int(row.iloc[11]),
|
|
883
|
+
"NfValence": int(row.iloc[12]),
|
|
884
|
+
"NValence": int(row.iloc[13]),
|
|
885
|
+
"NsUnfilled": int(row.iloc[14]),
|
|
886
|
+
"NpUnfilled": int(row.iloc[15]),
|
|
887
|
+
"NdUnfilled": int(row.iloc[16]),
|
|
888
|
+
"NfUnfilled": int(row.iloc[17]),
|
|
889
|
+
"NUnfilled": int(row.iloc[18]),
|
|
890
|
+
"GSvolume_pa": float(row.iloc[19]),
|
|
891
|
+
"GSbandgap": float(row.iloc[20]),
|
|
892
|
+
"GSmagmom": float(row.iloc[21]),
|
|
893
|
+
"SpaceGroupNumber": int(row.iloc[22]),
|
|
894
|
+
}
|
|
895
|
+
_element_magpie_data[key] = dataset
|
|
896
|
+
|
|
897
|
+
if symbol in _element_magpie_data:
|
|
898
|
+
return _element_magpie_data[symbol]
|
|
899
|
+
else:
|
|
900
|
+
if _print_warnings:
|
|
901
|
+
print(
|
|
902
|
+
"WARNING: Magpie data for element {} not "
|
|
903
|
+
"found.".format(symbol)
|
|
904
|
+
)
|
|
905
|
+
|
|
906
|
+
return None
|
|
907
|
+
|
|
908
|
+
|
|
909
|
+
_element_valence_data = None
|
|
910
|
+
|
|
911
|
+
|
|
912
|
+
def lookup_element_valence_data(symbol: str, copy: bool = True):
|
|
913
|
+
"""
|
|
914
|
+
Retrieve valence electron data.
|
|
915
|
+
|
|
916
|
+
For d-block elements, the s and d electrons contribute to NValence.
|
|
917
|
+
For p-block elements, the s and p electrons contribute to NValence.
|
|
918
|
+
For s- and f-block elements, NValence is calculated from the Noble Gas electron configuration
|
|
919
|
+
i.e.
|
|
920
|
+
|
|
921
|
+
Args:
|
|
922
|
+
symbol : the atomic symbol of the element to look up.
|
|
923
|
+
copy: if True (default), return a copy of the data dictionary,
|
|
924
|
+
rather than a reference to a cached object -- only use
|
|
925
|
+
copy=False in performance-sensitive code and where you are
|
|
926
|
+
certain the dictionary will not be modified!
|
|
927
|
+
|
|
928
|
+
Returns:
|
|
929
|
+
NValence (int): the number of valence electrons
|
|
930
|
+
Returns None if the element was not found among the external
|
|
931
|
+
data.
|
|
932
|
+
"""
|
|
933
|
+
|
|
934
|
+
global _element_valence_data
|
|
935
|
+
|
|
936
|
+
if _element_valence_data is None:
|
|
937
|
+
_element_valence_data = {}
|
|
938
|
+
|
|
939
|
+
df = pd.read_csv(
|
|
940
|
+
os.path.join(data_directory, "element_valence_modified.csv")
|
|
941
|
+
)
|
|
942
|
+
for _index, row in df.iterrows():
|
|
943
|
+
key = row.iloc[0]
|
|
944
|
+
|
|
945
|
+
dataset = {"NValence": int(row.iloc[1])}
|
|
946
|
+
_element_valence_data[key] = dataset
|
|
947
|
+
|
|
948
|
+
if symbol in _element_valence_data:
|
|
949
|
+
return _element_valence_data[symbol]
|
|
950
|
+
else:
|
|
951
|
+
if _print_warnings:
|
|
952
|
+
print(
|
|
953
|
+
"WARNING: Valence data for element {} not "
|
|
954
|
+
"found.".format(symbol)
|
|
955
|
+
)
|
|
956
|
+
|
|
957
|
+
return None
|
|
@@ -3,6 +3,7 @@ from typing import List, Optional, Union
|
|
|
3
3
|
import numpy as np
|
|
4
4
|
|
|
5
5
|
import smact
|
|
6
|
+
from smact.utils.composition import parse_formula
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
def eneg_mulliken(element: Union[smact.Element, str]) -> float:
|
|
@@ -157,3 +158,48 @@ def compound_electroneg(
|
|
|
157
158
|
print("Geometric mean = Compound 'electronegativity'=", compelectroneg)
|
|
158
159
|
|
|
159
160
|
return compelectroneg
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
def valence_electron_count(compound: str) -> float:
|
|
164
|
+
"""
|
|
165
|
+
Calculate the Valence Electron Count (VEC) for a given chemical compound.
|
|
166
|
+
|
|
167
|
+
This function parses the input compound, extracts the elements and their
|
|
168
|
+
stoichiometries, and calculates the VEC using the valence electron data
|
|
169
|
+
from SMACT's Element class.
|
|
170
|
+
|
|
171
|
+
Args:
|
|
172
|
+
compound (str): Chemical formula of the compound (e.g., "Fe2O3").
|
|
173
|
+
|
|
174
|
+
Returns:
|
|
175
|
+
float: Valence Electron Count (VEC) for the compound.
|
|
176
|
+
|
|
177
|
+
Raises:
|
|
178
|
+
ValueError: If an element in the compound is not found in the valence data.
|
|
179
|
+
"""
|
|
180
|
+
|
|
181
|
+
def get_element_valence(element: str) -> int:
|
|
182
|
+
try:
|
|
183
|
+
return smact.Element(element).num_valence_modified
|
|
184
|
+
except NameError:
|
|
185
|
+
raise ValueError(
|
|
186
|
+
f"Valence data not found for element: {element}"
|
|
187
|
+
) from None
|
|
188
|
+
|
|
189
|
+
element_stoich = parse_formula(compound)
|
|
190
|
+
|
|
191
|
+
total_valence = 0
|
|
192
|
+
total_stoich = 0
|
|
193
|
+
for element, stoich in element_stoich.items():
|
|
194
|
+
try:
|
|
195
|
+
valence = get_element_valence(element)
|
|
196
|
+
total_valence += stoich * valence
|
|
197
|
+
total_stoich += stoich
|
|
198
|
+
except TypeError:
|
|
199
|
+
raise ValueError(f"No valence information for element {element}")
|
|
200
|
+
|
|
201
|
+
if total_stoich == 0:
|
|
202
|
+
return 0.0
|
|
203
|
+
|
|
204
|
+
vec = total_valence / total_stoich
|
|
205
|
+
return vec
|
|
@@ -321,19 +321,23 @@ def smact_filter(
|
|
|
321
321
|
threshold: Optional[int] = 8,
|
|
322
322
|
stoichs: Optional[List[List[int]]] = None,
|
|
323
323
|
species_unique: bool = True,
|
|
324
|
-
oxidation_states_set: str = "
|
|
324
|
+
oxidation_states_set: str = "smact14",
|
|
325
325
|
comp_tuple: bool = False,
|
|
326
326
|
) -> Union[List[Tuple[str, int, int]], List[Tuple[str, int]]]:
|
|
327
327
|
"""Function that applies the charge neutrality and electronegativity
|
|
328
328
|
tests in one go for simple application in external scripts that
|
|
329
329
|
wish to apply the general 'smact test'.
|
|
330
330
|
|
|
331
|
+
.. warning::
|
|
332
|
+
For backwards compatability in SMACT >=2.7, expllicitly set oxidation_states_set to 'smact14' if you wish to use the 2014 SMACT default oxidation states.
|
|
333
|
+
In SMACT 3.0, the smact_filter function will be set to use a new default oxidation states set.
|
|
334
|
+
|
|
331
335
|
Args:
|
|
332
336
|
els (tuple/list): A list of smact.Element objects
|
|
333
337
|
threshold (int): Threshold for stoichiometry limit, default = 8
|
|
334
338
|
stoichs (list[int]): A selection of valid stoichiometric ratios for each site.
|
|
335
339
|
species_unique (bool): Whether or not to consider elements in different oxidation states as unique in the results.
|
|
336
|
-
oxidation_states_set (string): A string to choose which set of oxidation states should be chosen. Options are '
|
|
340
|
+
oxidation_states_set (string): A string to choose which set of oxidation states should be chosen. Options are 'smact14', 'icsd', 'pymatgen' and 'wiki' for the 2014 SMACT default, 2016 ICSD, pymatgen structure predictor and Wikipedia (https://en.wikipedia.org/wiki/Template:List_of_oxidation_states_of_the_elements) oxidation states respectively. A filepath to an oxidation states text file can also be supplied as well.
|
|
337
341
|
comp_tuple (bool): Whether or not to return the results as a named tuple of elements and stoichiometries (True) or as a normal tuple of elements and stoichiometries (False).
|
|
338
342
|
Returns:
|
|
339
343
|
allowed_comps (list): Allowed compositions for that chemical system
|
|
@@ -373,7 +377,7 @@ def smact_filter(
|
|
|
373
377
|
|
|
374
378
|
# Select the specified oxidation states set:
|
|
375
379
|
oxi_set = {
|
|
376
|
-
"
|
|
380
|
+
"smact14": [e.oxidation_states_smact14 for e in els],
|
|
377
381
|
"icsd": [e.oxidation_states_icsd for e in els],
|
|
378
382
|
"pymatgen": [e.oxidation_states_sp for e in els],
|
|
379
383
|
"wiki": [e.oxidation_states_wiki for e in els],
|
|
@@ -385,7 +389,7 @@ def smact_filter(
|
|
|
385
389
|
else:
|
|
386
390
|
raise (
|
|
387
391
|
Exception(
|
|
388
|
-
f'{oxidation_states_set} is not valid. Enter either "
|
|
392
|
+
f'{oxidation_states_set} is not valid. Enter either "smact14", "icsd", "pymatgen","wiki" or a filepath to a textfile of oxidation states.'
|
|
389
393
|
)
|
|
390
394
|
)
|
|
391
395
|
if oxidation_states_set == "wiki":
|
|
@@ -430,19 +434,23 @@ def smact_validity(
|
|
|
430
434
|
composition: Union[pymatgen.core.Composition, str],
|
|
431
435
|
use_pauling_test: bool = True,
|
|
432
436
|
include_alloys: bool = True,
|
|
433
|
-
oxidation_states_set: Union[str, bytes, os.PathLike] = "
|
|
437
|
+
oxidation_states_set: Union[str, bytes, os.PathLike] = "smact14",
|
|
434
438
|
) -> bool:
|
|
435
439
|
"""Check if a composition is valid according to the SMACT rules.
|
|
436
440
|
|
|
437
441
|
Composition is considered valid if it passes the charge neutrality test and the Pauling electronegativity test.
|
|
438
442
|
|
|
443
|
+
.. warning::
|
|
444
|
+
For backwards compatability in SMACT >=2.7, expllicitly set oxidation_states_set to 'smact14' if you wish to use the 2014 SMACT default oxidation states.
|
|
445
|
+
In SMACT 3.0, the smact_filter function will be set to use a new default oxidation states set.
|
|
446
|
+
|
|
439
447
|
Args:
|
|
440
448
|
composition (Union[pymatgen.core.Composition, str]): Composition/formula to check. This can be a pymatgen Composition object or a string.
|
|
441
449
|
use_pauling_test (bool): Whether to use the Pauling electronegativity test
|
|
442
450
|
include_alloys (bool): If True, compositions which only contain metal elements will be considered valid without further checks.
|
|
443
451
|
oxidation_states_set (Union[str, bytes, os.PathLike]): A string to choose which set of
|
|
444
|
-
oxidation states should be chosen for charge-balancing. Options are '
|
|
445
|
-
'pymatgen' and 'wiki' for the default,
|
|
452
|
+
oxidation states should be chosen for charge-balancing. Options are 'smact14', 'icsd',
|
|
453
|
+
'pymatgen' and 'wiki' for the 2014 SMACT default, 2016 ICSD, pymatgen structure predictor and Wikipedia
|
|
446
454
|
(https://en.wikipedia.org/wiki/Template:List_of_oxidation_states_of_the_elements) oxidation states respectively.
|
|
447
455
|
A filepath to an oxidation states text file can also be supplied.
|
|
448
456
|
|
|
@@ -471,8 +479,8 @@ def smact_validity(
|
|
|
471
479
|
smact_elems = [e[1] for e in space.items()]
|
|
472
480
|
electronegs = [e.pauling_eneg for e in smact_elems]
|
|
473
481
|
|
|
474
|
-
if oxidation_states_set == "
|
|
475
|
-
ox_combos = [e.
|
|
482
|
+
if oxidation_states_set == "smact14" or oxidation_states_set is None:
|
|
483
|
+
ox_combos = [e.oxidation_states_smact14 for e in smact_elems]
|
|
476
484
|
elif oxidation_states_set == "icsd":
|
|
477
485
|
ox_combos = [e.oxidation_states_icsd for e in smact_elems]
|
|
478
486
|
elif oxidation_states_set == "pymatgen":
|
|
@@ -491,7 +499,7 @@ def smact_validity(
|
|
|
491
499
|
else:
|
|
492
500
|
raise (
|
|
493
501
|
Exception(
|
|
494
|
-
f'{oxidation_states_set} is not valid. Enter either "
|
|
502
|
+
f'{oxidation_states_set} is not valid. Enter either "smact14", "icsd", "pymatgen","wiki" or a filepath to a textfile of oxidation states.'
|
|
495
503
|
)
|
|
496
504
|
)
|
|
497
505
|
|
|
@@ -14,7 +14,11 @@ import smact.oxidation_states
|
|
|
14
14
|
import smact.screening
|
|
15
15
|
from smact import Species
|
|
16
16
|
from smact.builder import wurtzite
|
|
17
|
-
from smact.properties import
|
|
17
|
+
from smact.properties import (
|
|
18
|
+
band_gap_Harrison,
|
|
19
|
+
compound_electroneg,
|
|
20
|
+
valence_electron_count,
|
|
21
|
+
)
|
|
18
22
|
|
|
19
23
|
files_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "files")
|
|
20
24
|
TEST_OX_STATES = os.path.join(files_dir, "test_oxidation_states.txt")
|
|
@@ -87,6 +91,24 @@ class TestSequenceFunctions(unittest.TestCase):
|
|
|
87
91
|
3.545075110572662,
|
|
88
92
|
)
|
|
89
93
|
|
|
94
|
+
def test_valence_electron_count(self):
|
|
95
|
+
# Test valid compounds
|
|
96
|
+
self.assertAlmostEqual(valence_electron_count("Fe2O3"), 6.8, places=2)
|
|
97
|
+
self.assertAlmostEqual(valence_electron_count("CuZn"), 11.5, places=2)
|
|
98
|
+
|
|
99
|
+
# Test single element
|
|
100
|
+
self.assertEqual(valence_electron_count("Fe"), 8)
|
|
101
|
+
|
|
102
|
+
# Test empty string
|
|
103
|
+
self.assertEqual(valence_electron_count(""), 0.0)
|
|
104
|
+
|
|
105
|
+
# Test invalid elements and formats
|
|
106
|
+
with self.assertRaises(ValueError):
|
|
107
|
+
valence_electron_count("Xx2O3") # Xx is not a real element
|
|
108
|
+
|
|
109
|
+
with self.assertRaises(ValueError):
|
|
110
|
+
valence_electron_count("LrO")
|
|
111
|
+
|
|
90
112
|
# ---------------- BUILDER ----------------
|
|
91
113
|
|
|
92
114
|
def test_builder_ZnS(self):
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
|
|
3
|
+
from pymatgen.core import Composition
|
|
4
|
+
|
|
5
|
+
from smact import Element
|
|
6
|
+
from smact.screening import smact_filter
|
|
7
|
+
from smact.utils.composition import comp_maker, formula_maker, parse_formula
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class TestComposition(unittest.TestCase):
|
|
11
|
+
"""Test composition utilities"""
|
|
12
|
+
|
|
13
|
+
def setUp(self) -> None:
|
|
14
|
+
self.mock_filter_output = [
|
|
15
|
+
(("Fe", "O"), (2, -2), (1, 1)),
|
|
16
|
+
(("Fe", "O"), (1, 1)),
|
|
17
|
+
(("Fe", "Fe", "O"), (2, 3, -2), (1, 2, 4)),
|
|
18
|
+
]
|
|
19
|
+
self.smact_filter_output = smact_filter(
|
|
20
|
+
els=[Element("Li"), Element("Ge"), Element("P"), Element("S")],
|
|
21
|
+
stoichs=[[10], [1], [2], [12]],
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
def test_parse_formula(self):
|
|
25
|
+
"""Test the parse_formula function"""
|
|
26
|
+
|
|
27
|
+
formulas = ["Li10GeP2S12", "Mg0.5O0.5", "CaMg(CO3)2"]
|
|
28
|
+
|
|
29
|
+
LGPS = parse_formula(formulas[0])
|
|
30
|
+
self.assertIsInstance(LGPS, dict)
|
|
31
|
+
for el_sym, ammt in LGPS.items():
|
|
32
|
+
self.assertIsInstance(el_sym, str)
|
|
33
|
+
self.assertIsInstance(ammt, float)
|
|
34
|
+
self.assertEqual(LGPS["Li"], 10)
|
|
35
|
+
self.assertEqual(LGPS["Ge"], 1)
|
|
36
|
+
self.assertEqual(LGPS["P"], 2)
|
|
37
|
+
self.assertEqual(LGPS["S"], 12)
|
|
38
|
+
|
|
39
|
+
MgO = parse_formula(formulas[1])
|
|
40
|
+
self.assertIsInstance(MgO, dict)
|
|
41
|
+
self.assertEqual(MgO["Mg"], 0.5)
|
|
42
|
+
self.assertEqual(MgO["O"], 0.5)
|
|
43
|
+
|
|
44
|
+
dolomite = parse_formula(formulas[2])
|
|
45
|
+
self.assertIsInstance(dolomite, dict)
|
|
46
|
+
self.assertEqual(dolomite["Ca"], 1)
|
|
47
|
+
self.assertEqual(dolomite["Mg"], 1)
|
|
48
|
+
self.assertEqual(dolomite["C"], 2)
|
|
49
|
+
self.assertEqual(dolomite["O"], 6)
|
|
50
|
+
|
|
51
|
+
def test_comp_maker(self):
|
|
52
|
+
"""Test the comp_maker function"""
|
|
53
|
+
comp1 = comp_maker(self.mock_filter_output[0])
|
|
54
|
+
comp2 = comp_maker(self.mock_filter_output[1])
|
|
55
|
+
comp3 = comp_maker(self.mock_filter_output[2])
|
|
56
|
+
comp4 = comp_maker(self.smact_filter_output[1])
|
|
57
|
+
for comp in [comp1, comp2, comp3, comp4]:
|
|
58
|
+
self.assertIsInstance(comp, Composition)
|
|
59
|
+
self.assertEqual(Composition("FeO"), comp2)
|
|
60
|
+
self.assertEqual(Composition({"Fe2+": 1, "O2-": 1}), comp1)
|
|
61
|
+
self.assertEqual(Composition({"Fe2+": 1, "Fe3+": 2, "O2-": 4}), comp3)
|
|
62
|
+
self.assertEqual(
|
|
63
|
+
Composition({"Li+": 10, "Ge4+": 1, "P5+": 2, "S2-": 12}), comp4
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
def test_formula_maker(self):
|
|
67
|
+
"""Test the formula_maker function"""
|
|
68
|
+
form1 = formula_maker(self.mock_filter_output[0])
|
|
69
|
+
form2 = formula_maker(self.mock_filter_output[1])
|
|
70
|
+
form3 = formula_maker(self.mock_filter_output[2])
|
|
71
|
+
form4 = formula_maker(self.smact_filter_output[1])
|
|
72
|
+
self.assertEqual(form1, "FeO")
|
|
73
|
+
self.assertEqual(form2, "FeO")
|
|
74
|
+
self.assertEqual(form1, form2)
|
|
75
|
+
self.assertEqual(form3, "Fe3O4")
|
|
76
|
+
self.assertEqual(form4, "Li10Ge(PS6)2")
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Utility functions for SMACT."""
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"""Utility functioms for handling elements, species, formulas and composition"""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import re
|
|
5
|
+
from collections import defaultdict
|
|
6
|
+
|
|
7
|
+
from pymatgen.core import Composition
|
|
8
|
+
|
|
9
|
+
from smact.structure_prediction.utilities import unparse_spec
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
# Adapted from ElementEmbeddings and Pymatgen
|
|
13
|
+
def parse_formula(formula: str) -> dict[str, float]:
|
|
14
|
+
"""Parse a chemical formula into a dictionary of elements and their amounts.
|
|
15
|
+
|
|
16
|
+
Args:
|
|
17
|
+
formula (str): Chemical formula
|
|
18
|
+
|
|
19
|
+
Returns:
|
|
20
|
+
dict: Dictionary of element symbol: amount
|
|
21
|
+
"""
|
|
22
|
+
regex = r"\(([^\(\)]+)\)\s*([\.e\d]*)"
|
|
23
|
+
r = re.compile(regex)
|
|
24
|
+
m = re.search(r, formula)
|
|
25
|
+
if m:
|
|
26
|
+
factor = 1.0
|
|
27
|
+
if m.group(2) != "":
|
|
28
|
+
factor = float(m.group(2))
|
|
29
|
+
unit_sym_dict = _get_sym_dict(m.group(1), factor)
|
|
30
|
+
expanded_sym = "".join(
|
|
31
|
+
[f"{el}{amt}" for el, amt in unit_sym_dict.items()]
|
|
32
|
+
)
|
|
33
|
+
expanded_formula = formula.replace(m.group(), expanded_sym)
|
|
34
|
+
return parse_formula(expanded_formula)
|
|
35
|
+
return _get_sym_dict(formula, 1)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def _get_sym_dict(formula: str, factor: float) -> dict[str, float]:
|
|
39
|
+
sym_dict: dict[str, float] = defaultdict(float)
|
|
40
|
+
regex = r"([A-Z][a-z]*)\s*([-*\.e\d]*)"
|
|
41
|
+
r = re.compile(regex)
|
|
42
|
+
for m in re.finditer(r, formula):
|
|
43
|
+
el = m.group(1)
|
|
44
|
+
amt = 1.0
|
|
45
|
+
if m.group(2).strip() != "":
|
|
46
|
+
amt = float(m.group(2))
|
|
47
|
+
sym_dict[el] += amt * factor
|
|
48
|
+
formula = formula.replace(m.group(), "", 1)
|
|
49
|
+
if formula.strip():
|
|
50
|
+
msg = f"{formula} is an invalid formula"
|
|
51
|
+
raise ValueError(msg)
|
|
52
|
+
|
|
53
|
+
return sym_dict
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def comp_maker(
|
|
57
|
+
smact_filter_output: tuple[str, int, int] | tuple[str, int]
|
|
58
|
+
) -> Composition:
|
|
59
|
+
"""Convert an item in the output of smact.screening.smact_filer into a Pymatgen Composition.
|
|
60
|
+
|
|
61
|
+
Args:
|
|
62
|
+
smact_filter_output (tuple[str, int, int]|tuple[str, int]): An item in the list returned from smact_filter
|
|
63
|
+
|
|
64
|
+
Returns:
|
|
65
|
+
composition (pymatgen.core.Composition): An instance of the Composition class
|
|
66
|
+
"""
|
|
67
|
+
if len(smact_filter_output) == 2:
|
|
68
|
+
form = []
|
|
69
|
+
for el, ammt in zip(smact_filter_output[0], smact_filter_output[-1]):
|
|
70
|
+
form.append(el)
|
|
71
|
+
form.append(ammt)
|
|
72
|
+
form = "".join(str(e) for e in form)
|
|
73
|
+
else:
|
|
74
|
+
form = {
|
|
75
|
+
unparse_spec((el, ox)): ammt
|
|
76
|
+
for el, ox, ammt in zip(
|
|
77
|
+
smact_filter_output[0],
|
|
78
|
+
smact_filter_output[1],
|
|
79
|
+
smact_filter_output[2],
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
return Composition(form)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def formula_maker(
|
|
86
|
+
smact_filter_output: tuple[str, int, int] | tuple[str, int]
|
|
87
|
+
) -> str:
|
|
88
|
+
"""Convert an item in the output of smact.screening.smact_filter into a chemical formula.
|
|
89
|
+
|
|
90
|
+
Args:
|
|
91
|
+
smact_filter_output (tuple[str, int, int]|tuple[str, int]): An item in the list returned from smact_filter
|
|
92
|
+
|
|
93
|
+
Returns:
|
|
94
|
+
formula (str): A formula
|
|
95
|
+
|
|
96
|
+
"""
|
|
97
|
+
return comp_maker(smact_filter_output).reduced_formula
|
{smact-2.6 → smact-2.7}/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|