Skip to content

Commit ba5e986

Browse files
authored
Merge pull request #333 from WMD-group/documentation_fix
Fix the documentation
2 parents ce807e1 + 8434325 commit ba5e986

7 files changed

+58
-67
lines changed

docs/conf.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@
7171
# built documents.
7272
#
7373
# The short X.Y version.
74-
version = "2.7"
74+
version = "2.8"
7575
# The full version, including alpha/beta/rc tags.
76-
release = "2.7.0"
76+
release = "2.8.0"
7777

7878
# The language for content autogenerated by Sphinx. Refer to documentation
7979
# for a list of supported languages.
@@ -171,7 +171,7 @@
171171

172172
html_theme_options = {
173173
"repository_url": "https://github.com/WMD-Group/SMACT",
174-
"repository_branch": "docs_updates",
174+
"repository_branch": "master",
175175
"path_to_docs": "docs",
176176
"use_repository_button": True,
177177
# "home_page_in_toc": True,

docs/examples/oxidation_states.ipynb

+27-42
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"source": [
1818
"# Imports\n",
1919
"\n",
20-
"from pymatgen.core import Structure\n",
20+
"from pymatgen.core import Structure, Lattice\n",
2121
"from smact import Species\n",
2222
"from smact.oxidation_states import Oxidation_state_probability_finder"
2323
]
@@ -58,7 +58,7 @@
5858
"output_type": "stream",
5959
"text": [
6060
"The species included in the probability table for the oxidation states model are show below \n",
61-
"['O-2', 'Cl-1', 'Se-2', 'F-1', 'I-1', 'S-2', 'Te-2', 'Br-1', 'Ag2', 'Re4', 'Sc3', 'Mn2', 'Ag3', 'Re3', 'Ir5', 'La2', 'Bi5', 'Ge2', 'Ir4', 'Tm2', 'W5', 'Hg1', 'W2', 'Eu2', 'Ta4', 'In3', 'Hg2', 'Cu3', 'Cr2', 'K1', 'Ir3', 'Hf2', 'Sc1', 'Er3', 'Mo2', 'Co2', 'Yb2', 'Fe2', 'Re2', 'Ni2', 'Bi3', 'U4', 'Co3', 'Eu3', 'Fe3', 'Ru3', 'Ge4', 'Pd4', 'Mg2', 'Nd3', 'Cd2', 'Rh1', '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Tl3', 'Fe1', 'Zn2', 'Nd2', 'Cr4', 'Rb1', 'Bi5', 'Be2', 'W3', 'Nb2', 'Re5', 'Ti3', 'Co2', 'W5', 'Fe2', 'Re6', 'Pr3', 'Sm2', 'U3', 'U4', 'Ni2', 'K1', 'Bi1', 'Ho2', 'Nb4', 'Tm2', 'Pb4', 'Nd3', 'W4', 'Gd3', 'Rh1', 'Mn6', 'Y3', 'Bi3', 'Mn1', 'Al3', 'Ta2', 'Er3', 'Eu2', 'Ir4', 'Hg1', 'Ag1', 'Sn4', 'Ta1', 'Ta3', 'U5', 'U6', 'V5', 'Tb3', 'Rh3', 'Ta4', 'Mo2', 'Nb1', 'Nb3', 'Mg2', 'Hg2', 'Ru2', 'Ag3', 'Mn5', 'Ce3', 'Pr2', 'Re3', 'Ag2', 'Mo3', 'Cu2', 'Y2', 'Cr2', 'Dy3', 'Zr4', 'Zr1', 'Mo5', 'Sn3', 'Ba2', 'Th4', 'Co1', 'Cs1', 'Ru3', 'U2', 'Rh4', 'Tb2', 'Mn2', 'La3', 'Mn3', 'Cr5', 'Zr2', 'Ti4', 'Ni4', 'Ni3', 'Ru6', 'V2', 'Re4', 'Pb2', 'Y1', 'W6', 'Tl1', 'Ru4', 'La1', 'Ga2', 'Re7', 'Sb5', 'Tb4', 'Mo4', 'Fe4', 'In3', 'Dy2', 'Sc1', 'Lu3', 'In1', 'Yb3', 'Pd2', 'Pd3', 'Ti2', 'Ge3', 'Ir6', 'Cd2', 'Sc2', 'Re2', 'Sb3', 'Tb1', 'Ir5', 'Ca2', 'Th3', 'Zr3', 'Cu3', 'Yb2', 'Ir3', 'Sb4', 'V4', 'Mo6', 'Fe3', 'Mn7', 'Co3', 'Cu1', 'Na1', 'Ru5', 'Eu3', 'V3', 'Hf4', 'Tm3', 'Cr6', 'La2']\n"
6262
]
6363
}
6464
],
@@ -90,7 +90,7 @@
9090
"name": "stdout",
9191
"output_type": "stream",
9292
"text": [
93-
" The probability of Al existing in 3+ oxidation states with O in a 2- oxidation state is 1.0\n"
93+
" The probability of Al existing in a 3+ oxidation state with O in a 2- oxidation state is 1.0\n"
9494
]
9595
}
9696
],
@@ -99,7 +99,7 @@
9999
"O = Species(\"O\", oxidation=-2, coordination=6)\n",
100100
"\n",
101101
"print(\n",
102-
" f\" The probability of Al existing in 3+ oxidation states with O in a 2- oxidation state is {ox_prob_finder.pair_probability(Al,O)}\"\n",
102+
" f\" The probability of Al existing in a 3+ oxidation state with O in a 2- oxidation state is {ox_prob_finder.pair_probability(Al,O)}\"\n",
103103
")"
104104
]
105105
},
@@ -152,59 +152,49 @@
152152
"name": "stdout",
153153
"output_type": "stream",
154154
"text": [
155-
"The structure of mp-540839 CsPbI3:\n",
155+
"The structure of CsPbI3:\n",
156156
"\n",
157-
"Full Formula (Cs4 Pb4 I12)\n",
157+
"Full Formula (Cs1 Pb1 I3)\n",
158158
"Reduced Formula: CsPbI3\n",
159-
"abc : 4.847142 10.650447 18.031199\n",
159+
"abc : 6.410000 6.410000 6.410000\n",
160160
"angles: 90.000000 90.000000 90.000000\n",
161161
"pbc : True True True\n",
162-
"Sites (20)\n",
163-
" # SP a b c\n",
164-
"--- ---- ---- -------- --------\n",
165-
" 0 Cs+ 0.75 0.581276 0.17212\n",
166-
" 1 Cs+ 0.25 0.418724 0.82788\n",
167-
" 2 Cs+ 0.75 0.081276 0.32788\n",
168-
" 3 Cs+ 0.25 0.918724 0.67212\n",
169-
" 4 Pb2+ 0.25 0.661849 0.439217\n",
170-
" 5 Pb2+ 0.75 0.338151 0.560783\n",
171-
" 6 Pb2+ 0.25 0.161849 0.060783\n",
172-
" 7 Pb2+ 0.75 0.838151 0.939217\n",
173-
" 8 I- 0.75 0.837211 0.502045\n",
174-
" 9 I- 0.25 0.162789 0.497955\n",
175-
" 10 I- 0.75 0.337211 0.997955\n",
176-
" 11 I- 0.25 0.662789 0.002045\n",
177-
" 12 I- 0.25 0.529272 0.612308\n",
178-
" 13 I- 0.75 0.470728 0.387692\n",
179-
" 14 I- 0.25 0.029272 0.887692\n",
180-
" 15 I- 0.75 0.970728 0.112308\n",
181-
" 16 I- 0.25 0.796317 0.287306\n",
182-
" 17 I- 0.75 0.203683 0.712694\n",
183-
" 18 I- 0.25 0.296317 0.212694\n",
184-
" 19 I- 0.75 0.703683 0.787306\n",
162+
"Sites (5)\n",
163+
" # SP a b c\n",
164+
"--- ---- --- --- ---\n",
165+
" 0 Pb2+ 0 0 0\n",
166+
" 1 Cs+ 0.5 0.5 0.5\n",
167+
" 2 I- 0 0.5 0\n",
168+
" 3 I- 0.5 0 0\n",
169+
" 4 I- 0 0 0.5\n",
185170
"\n",
186171
"The compound probability for CsPbI3 is 1.0.\n"
187172
]
188173
}
189174
],
190175
"source": [
191-
"# Load the structure file\n",
176+
"# Create the structure\n",
192177
"\n",
193-
"struct = Structure.from_file(\"cspbi3.cif\")\n",
194-
"print(\"The structure of mp-540839 CsPbI3:\\n\")\n",
195-
"print(struct)\n",
178+
"CsPbI3 = Structure.from_spacegroup(\n",
179+
"'Pm-3m', # Spacegroup for a cubic perovskite\n",
180+
"Lattice.cubic(6.41), # Cubic spacing of 6.41 Å\n",
181+
"['Pb2+', 'Cs+', 'I-'], # Unique species of the ABX3 compound\n",
182+
"[[0.,0.,0.],[0.5,0.5,0.5],[0.,0.,0.5]] # Fractional atomic coordinates of each site\n",
183+
")\n",
184+
"print(\"The structure of CsPbI3:\\n\")\n",
185+
"print(CsPbI3)\n",
196186
"\n",
197187
"\n",
198188
"# Get the compound probability for CsPbI3\n",
199-
"prob = ox_prob_finder.compound_probability(struct)\n",
189+
"prob = ox_prob_finder.compound_probability(CsPbI3)\n",
200190
"\n",
201191
"print(f\"\\nThe compound probability for CsPbI3 is {prob_compound}.\")"
202192
]
203193
}
204194
],
205195
"metadata": {
206196
"kernelspec": {
207-
"display_name": "Python 3.8.13 ('smact_tests')",
197+
"display_name": "smact_dev",
208198
"language": "python",
209199
"name": "python3"
210200
},
@@ -218,12 +208,7 @@
218208
"name": "python",
219209
"nbconvert_exporter": "python",
220210
"pygments_lexer": "ipython3",
221-
"version": "3.11.5"
222-
},
223-
"vscode": {
224-
"interpreter": {
225-
"hash": "9f89bce96645c075fd87ba4308874c26726cf41cb3962e47a97b7697a60dd355"
226-
}
211+
"version": "3.10.14"
227212
}
228213
},
229214
"nbformat": 4,

docs/tutorials/crystal_space.ipynb

+2-3
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@
7676
" IN_COLAB = False\n",
7777
"\n",
7878
"if IN_COLAB:\n",
79-
" !pip install git+https://github.com/WMD-group/SMACT.git --quiet\n",
80-
" !pip install -q mp_api"
79+
" !pip install \"smact[crystal_space] @ git+https://github.com/WMD-group/SMACT.git@master\" --quiet"
8180
]
8281
},
8382
{
@@ -246,7 +245,7 @@
246245
],
247246
"metadata": {
248247
"kernelspec": {
249-
"display_name": "Python 3 (ipykernel)",
248+
"display_name": "smact_dev",
250249
"language": "python",
251250
"name": "python3"
252251
},

docs/tutorials/crystal_space_visualisation.ipynb

+2-5
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,7 @@
6565
" IN_COLAB = False\n",
6666
"\n",
6767
"if IN_COLAB:\n",
68-
" !pip install git+https://github.com/WMD-group/SMACT.git --quiet\n",
69-
" !pip install -q ElementEmbeddings\n",
70-
" !pip install umap-learn==0.5.3\n",
71-
" !pip install -q kaleido"
68+
" !pip install \"smact[crystal_space] @ git+https://github.com/WMD-group/SMACT.git@master\" --quiet"
7269
]
7370
},
7471
{
@@ -368,7 +365,7 @@
368365
],
369366
"metadata": {
370367
"kernelspec": {
371-
"display_name": "Python 3 (ipykernel)",
368+
"display_name": "smact_dev",
372369
"language": "python",
373370
"name": "python3"
374371
},

docs/tutorials/smact_generation_of_solar_oxides.ipynb

+1-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@
3939
" IN_COLAB = False\n",
4040
"\n",
4141
"if IN_COLAB:\n",
42-
" !pip install git+https://github.com/WMD-group/SMACT.git --quiet\n",
43-
" !pip install smact pandas pymatgen matminer"
42+
" !pip install \"smact[featurisers] @ git+https://github.com/WMD-group/SMACT.git@documentation_fix\" --quiet\n"
4443
]
4544
},
4645
{

docs/tutorials/smact_validity_of_GNoMe.ipynb

+18-11
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,17 @@
2121
"outputs_hidden": false
2222
}
2323
},
24-
"outputs": [],
24+
"outputs": [
25+
{
26+
"name": "stdout",
27+
"output_type": "stream",
28+
"text": [
29+
"\n",
30+
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m24.2\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.3.1\u001b[0m\n",
31+
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n"
32+
]
33+
}
34+
],
2535
"source": [
2636
"# Install the required packages\n",
2737
"try:\n",
@@ -50,11 +60,8 @@
5060
"name": "stdout",
5161
"output_type": "stream",
5262
"text": [
53-
"INFO: Pandarallel will run on 8 workers.\n",
54-
"INFO: Pandarallel will use standard multiprocessing data transfer (pipe) to transfer data between the main process and workers.\n",
55-
"\n",
56-
"WARNING: You are on Windows. If you detect any issue with pandarallel, be sure you checked out the Troubleshooting page:\n",
57-
"https://nalepae.github.io/pandarallel/troubleshooting/\n"
63+
"INFO: Pandarallel will run on 12 workers.\n",
64+
"INFO: Pandarallel will use standard multiprocessing data transfer (pipe) to transfer data between the main process and workers.\n"
5865
]
5966
}
6067
],
@@ -199,7 +206,7 @@
199206
"# Load the data\n",
200207
"# Load the data into a dataframe\n",
201208
"\n",
202-
"data_path = \"https://raw.githubusercontent.com/WMD-group/SMACT/master/examples/smact_validity/stable_materials_hull.csv\"\n",
209+
"data_path = \"https://raw.githubusercontent.com/WMD-group/SMACT/refs/heads/master/docs/tutorials/stable_materials_hull.csv\"\n",
203210
"df = pd.read_csv(data_path)\n",
204211
"\n",
205212
"# Get quick info about the data\n",
@@ -230,12 +237,12 @@
230237
{
231238
"data": {
232239
"application/vnd.jupyter.widget-view+json": {
233-
"model_id": "054530e7da2c4137ad2a8d875c73ae75",
240+
"model_id": "16fd0c26938f4483abee04fbcb7fe750",
234241
"version_major": 2,
235242
"version_minor": 0
236243
},
237244
"text/plain": [
238-
"VBox(children=(HBox(children=(IntProgress(value=0, description='0.00%', max=48109), Label(value='0 / 48109')))…"
245+
"VBox(children=(HBox(children=(IntProgress(value=0, description='0.00%', max=32073), Label(value='0 / 32073')))…"
239246
]
240247
},
241248
"metadata": {},
@@ -402,7 +409,7 @@
402409
],
403410
"metadata": {
404411
"kernelspec": {
405-
"display_name": "Python 3 (ipykernel)",
412+
"display_name": "smact_dev",
406413
"language": "python",
407414
"name": "python3"
408415
},
@@ -416,7 +423,7 @@
416423
"name": "python",
417424
"nbconvert_exporter": "python",
418425
"pygments_lexer": "ipython3",
419-
"version": "3.9.16"
426+
"version": "3.10.14"
420427
}
421428
},
422429
"nbformat": 4,

pyproject.toml

+5-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ classifiers = [
2323
"Programming Language :: Python :: 3.10",
2424
"Programming Language :: Python :: 3.11",
2525
"Programming Language :: Python :: 3.12",
26-
"Programming Language :: Python :: 3.9",
2726
"Topic :: Scientific/Engineering",
2827
"Topic :: Scientific/Engineering :: Chemistry",
2928
]
@@ -82,6 +81,11 @@ crystal_space = ["mp-api",
8281
"kaleido",
8382
"pydantic<2.10.0"]
8483

84+
featurisers = [
85+
"matminer",
86+
"ElementEmbeddings",
87+
]
88+
8589
[tool.semantic_release]
8690
version_variable = "setup.py:__version__"
8791
version_source = "tag"

0 commit comments

Comments
 (0)