Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Crystal Space and Oxidation Utilities to the Documentation #337

Merged
merged 17 commits into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"html_image",
]
myst_url_schemes = ("http", "https", "mailto")
jupyter_execute_notebooks = "off"
nb_execution_mode = "off"

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
Expand Down Expand Up @@ -154,7 +154,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
# html_static_path = ["_static"]

# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
Expand Down Expand Up @@ -418,5 +418,8 @@ def __getattr__(cls, name):
"pymatgen.analysis.structure_prediction",
"pymatgen.transformations.standard_transformations",
"tabulate",
"mp_api",
"mp_api.client",
"emmet",
]
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
1 change: 0 additions & 1 deletion docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ For workflows that have been used in real examples and in published work, visit
examples/filter
examples/validity
examples/lists
examples/neutral_combos
examples/oxidation_states
examples/compound_electroneg
examples/valence_electron_count
Expand Down
3 changes: 2 additions & 1 deletion docs/examples/doper.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"\n",
"By default, the top five p-type and n-type candidates are reported. Use the `num_dopants` input to modify the number of outputs.\n",
"\n",
"### Output Format\n",
"**Output Format**\n",
"\n",
"The output is a dictionary with keys:\n",
"- \"n_type_cation\"\n",
"- \"p_type_cation\"\n",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Crystal Space Materials Project Data Retrieval Module
===========================


.. automodule:: smact.utils.crystal_space.download_compounds_with_mp_api
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Crystal Space SMACT Generation Module
===========================

.. automodule:: smact.utils.crystal_space.generate_composition_with_smact
:members:
:undoc-members:
:show-inheritance:
8 changes: 8 additions & 0 deletions docs/smact.utils.crystal_space.plot_embedding.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Crystal Space Embedding Module
===========================


.. automodule:: smact.utils.crystal_space.plot_embedding
:members:
:undoc-members:
:show-inheritance:
14 changes: 14 additions & 0 deletions docs/smact.utils.crystal_space.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
SMACT Utilities Crystal Space Module
===========================

Utility functions associated with our `Faraday Discussions publication 'Mapping Inorganic Crystal Space' <https://doi.org/10.1039/D4FD00063C>`_ using SMACT


Submodules
----------

.. toctree::

smact.utils.crystal_space.download_compounds_with_mp_api
smact.utils.crystal_space.generate_composition_with_smact
smact.utils.crystal_space.plot_embedding
9 changes: 9 additions & 0 deletions docs/smact.utils.oxidation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
SMACT Utilities Oxidation Module
=====================================

Miscellaneous utilities for creating SMACT compatible oxidation states list

.. automodule:: smact.utils.oxidation
:members:
:undoc-members:
:show-inheritance:
6 changes: 2 additions & 4 deletions docs/smact.utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,5 @@ Submodules
.. toctree::

smact.utils.composition
smact.utils.band_gap_simple
smact.utils.download_compounds_with_mp_api
smact.utils.generate_composition_with_smact
smact.utils.plot_embeddings
smact.utils.crystal_space
smact.utils.oxidation
4 changes: 2 additions & 2 deletions docs/tutorials/crystal_space.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"\n",
"First, we'll create binary chemical compositions using the SMACT filter. The SMACT filter is a smart tool that helps us select compositions based on important chemical rules, such as oxidation states and electronegativity.\n",
"\n",
"To generate these compositions, we'll use a function called [`generate_composition_with_smact`](../smact/utils/generate_composition_with_smact.py). This function allows us to enumerate all possible binary compositions and filter them based on the SMACT rules. \n",
"To generate these compositions, we'll use a function called [`generate_composition_with_smact`](../../smact/utils/crystal_space/generate_composition_with_smact.py). This function allows us to enumerate all possible binary compositions and filter them based on the SMACT rules. \n",
"\n",
"### Key parameters:\n",
"- `num_elements`: Number of elements in the composition (e.g., 2 for binary).\n",
Expand Down Expand Up @@ -127,7 +127,7 @@
"source": [
"Next, we download data from the `Materials Project api` using the `download_mp_data` function. This function allows us to download data for a given number of elements and maximum stoichiometry. The data includes the chemical formula, energy, and other properties of the compounds.\n",
"\n",
"[`download_mp_data`](../smact/utils/download_compounds_with_mp_api.py) function takes in the following parameters:\n",
"[`download_mp_data`](../../smact/utils/crystal_space/download_compounds_with_mp_api.py) function takes in the following parameters:\n",
"\n",
"### Key parameters:\n",
"- `mp_api_key`: your Materials Project API key\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/crystal_space_visualisation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"(prerequisite: [crystal_space_with_smact.ipynb](./crystal_space_with_smact.ipynb))\n",
"(prerequisite: [crystal_space.ipynb](./crystal_space.ipynb))\n",
"\n",
"In this tutorial, we will use the dimension reduction techniques to visualise a large crystal space. We will use the following techniques:\n",
"\n",
Expand Down
Loading