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

Update/SOF-7544 cleanups #314

Merged
merged 21 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ render_macros: true

# Oxygen interstitial Defect(s) in SnO.

## Introduction
## Introduction.

This tutorial demonstrates how to create an oxygen interstitial defect in tin monoxide (SnO), following the methodology described in the literature.

Expand All @@ -19,42 +19,42 @@ We will recreate the O-interstitial defect structure shown in Fig. 4 a) using [V

![SnO O-interstitial](/images/tutorials/materials/defects/defect_point_interstitial_tin_oxide/0-figure-from-manuscript.webp "O-interstitial defect in SnO")

## 1. Prepare Base Structure
## 1. Prepare Base Structure.

### 1.1. Load Base Material
### 1.1. Load Base Material.

Navigate to [Materials Designer](../../../materials-designer/overview.md) and import the SnO material from [Standata](../../../materials-designer/header-menu/input-output/standata-import.md) using the search term "SnO".

![Original SnO](/images/tutorials/materials/defects/defect_point_interstitial_tin_oxide/2-wave-original-material.webp "SnO from Standata, 2x2x2 repetitions")

### 1.2. Launch JupyterLite Session
### 1.2. Launch JupyterLite Session.

Select the "Advanced > [JupyterLite Transformation](../../../materials-designer/header-menu/advanced/jupyterlite-dialog.md)" menu item to launch the JupyterLite environment.

### 1.3. Open `create_defect.ipynb` Notebook
### 1.3. Open `create_defect.ipynb` Notebook.

Find and open the `create_defect.ipynb` notebook. Select "SnO" input material.

We'll modify its parameters to create the Sn-vacancy O-interstitial defects according to the image above.

### 1.4. Set Defect Parameters
### 1.4. Set Defect Parameters.

Replace the default parameters in section 1.1 with:

```python
# Supercell parameters
# Supercell parameters.
SUPERCELL_MATRIX = [[2, 0, 0], [0, 2, 0], [0, 0, 2]]

# Defect parameters
# Defect parameters.
DEFECT_CONFIGS = [
{
"defect_type": "vacancy",
# Coordiante will be resolved to nearest atom
# Coordiante will be resolved to nearest atom.
"approximate_coordinate": [0.0, 0.25, 0.525],
},
{
"defect_type": "interstitial",
# Coordiante will be resolved to nearest Voronoi site
# Coordiante will be resolved to nearest Voronoi site.
"coordinate": [0.0, 0.25, 0.35],
"chemical_element": "O",
"placement_method": "voronoi_site"
Expand All @@ -77,43 +77,43 @@ Second defect:
- `chemical_element`: "O" for oxygen interstitial
- `placement_method`: "voronoi_site" to place atom at appropriate interstitial position

## 2. Create the Defect
## 2. Create the Defect.

### 2.1. Run Supercell Creation
### 2.1. Run Supercell Creation.

Run the notebook by selecting "Run" > "Run All Cells". This will:

1. Initialize the defect configuration
2. Create the O-interstitial at the specified position
3. Generate the final defect structure

## 3. Analyze Results
## 3. Analyze Results.

After creating the defect, examine the structure to verify:

![SnO with O-interstitial defect](/images/tutorials/materials/defects/defect_point_interstitial_tin_oxide/4-wave-result-material.webp "SnO with O-interstitial defect")

### 3.1. Defect Position
### 3.1. Defect Position.

- O interstitial should be at (0.0, 0.5, 0.5) in crystal coordinates
- Position should be in a void space between Sn-O layers
- Verify symmetry of surrounding atoms

### 3.2. Local Structure
### 3.2. Local Structure.

- Check distances to nearest Sn and O atoms
- Verify no unrealistic atom overlaps
- Confirm overall crystal structure is maintained

## 4. Save Defect Structure
## 4. Save Defect Structure.

The defect structure will be automatically passed back to Materials Designer where you can:

1. Save it in your workspace
2. Export it in various formats
3. Use it for further calculations

## Interactive JupyterLite Notebook
## Interactive JupyterLite Notebook.

The following embedded notebook demonstrates the complete process. Select "Run" > "Run All Cells".

Expand All @@ -126,7 +126,7 @@ The following embedded notebook demonstrates the complete process. Select "Run"
{% endwith %}


## Parameter Fine-tuning
## Parameter Fine-tuning.

To adjust the defect creation:

Expand All @@ -141,7 +141,7 @@ To adjust the defect creation:
- Change `SUPERCELL_MATRIX` for larger/smaller systems
- Consider periodic boundary conditions effects

## References
## References.

1. Togo, A., Oba, F., & Tanaka, I. (2006). First-principles calculations of native defects in tin monoxide. Physical Review B, 74(19), 195128. [DOI: 10.1103/PhysRevB.74.195128](https://doi.org/10.1103/PhysRevB.74.195128){:target='_blank'}.

Expand All @@ -152,6 +152,6 @@ To adjust the defect creation:
[DOI: 10.1103/PhysRevB.73.125205](https://doi.org/10.1103/PhysRevB.73.125205){:target='_blank'}.


## Tags
## Tags.

`SnO`, `defects`, `interstitial`, `voronoi`, `oxygen`, `point defects`, `Sn`, `O`
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
render_macros: true
---

# Nitrogen vacancy and Mg substitution in GaN
# Nitrogen vacancy and Mg substitution in GaN.

## Introduction
## Introduction.

This tutorial demonstrates the process of creating material with nitrogen vacancies and magnesium substitution defects in GaN.

Expand All @@ -24,7 +24,7 @@ Specifically, the material from FIG. 2. c) of the manuscript:
![Point Pair Defects: Mg Substitution and Vacancy in GaN](/images/tutorials/materials/defects/defect_point_pair_gallium_nitride/0-figure-from-manuscript.webp "Point Defect Pair: Substitution, Vacancy in GaN, FIG. 2.")


## 1. Create GaN Supercell
## 1. Create GaN Supercell.

First, we navigate to [Materials Designer](../../../materials-designer/overview.md) and import the GaN material from the [Standata](../../../materials-designer/header-menu/input-output/standata-import.md).

Expand All @@ -34,7 +34,7 @@ We then use the [Advanced](../../../materials-designer/header-menu/advanced/supe

![Supercell Creation for GaN](/images/tutorials/materials/defects/defect_point_pair_gallium_nitride/2-advanced-supercell.webp "Supercell GaN")

## 2. Identify Defect Sites
## 2. Identify Defect Sites.

Next, we open the [3D editor](../../../materials-designer/3d-editor.md) to identify the crystal site positions for the defects.

Expand All @@ -44,21 +44,21 @@ Hover over the atoms to get the coordinates of the atoms to replace. Then copy/p

`[1.608, 4.642, 5.240]` for the Mg substitution defect and `[1.608, 4.642, 7.210]` for the nitrogen vacancy.

## 3. Create Nitrogen Defects and Vacancies
## 3. Create Nitrogen Defects and Vacancies.

For the defect creation, we will use the [JupyterLite](../../../jupyterlite/overview.md) environment with the corresponding notebook.

### 3.1. Launch JupyterLite Session
### 3.1. Launch JupyterLite Session.

Select the "Advanced > [JupyterLite Transformation](../../../materials-designer/header-menu/advanced/jupyterlite-dialog.md)" menu item to launch the JupyterLite environment.

![JupyterLite Dialog](/images/jupyterlite/md-advanced-jl.webp "JupyterLite Dialog")

### 3.2. Open `create_point_defect_pair.ipynb` notebook
### 3.2. Open `create_point_defect_pair.ipynb` notebook.

Find `create_point_defect_pair.ipynb` in the list of notebooks and click/double-click open it.

### 3.3. Open and modify the notebook
### 3.3. Open and modify the notebook.

Next, edit `create_point_defect_pair.ipynb` notebook to modify the parameters by adding a list of [defect configuration objects](https://github.com/Exabyte-io/made/blob/3d938b4d91a31323dca7a02acb12b646dbb26634/src/py/mat3ra/made/tools/build/defect/configuration.py#L257) containing the approximate coordinates of the atoms to replace.

Expand Down Expand Up @@ -86,19 +86,19 @@ Here's the visual of the updated content:

![Notebook setup](/images/tutorials/materials/defects/defect_point_pair_gallium_nitride/5-jl-setup.webp "Notebook setup")

## 4. Run the Notebook
## 4. Run the Notebook.

Run the notebook by clicking `Run` > `Run All` in the top menu to run cells and wait for the results to appear.

![Run All](/images/jupyterlite/run-all.webp "Run All")

## 5. Analyze the Results
## 5. Analyze the Results.

After running the notebook, the user will be able to visualize the structure of GaN with substitution and vacancy defects.

![Review the Results](/images/tutorials/materials/defects/defect_point_pair_gallium_nitride/6-jl-result-preview.webp "Review the Results")

## 6. Pass the Material to Materials Designer
## 6. Pass the Material to Materials Designer.

The user can pass the resulting material in the current Materials Designer environment and save it.

Expand All @@ -107,7 +107,7 @@ The user can pass the resulting material in the current Materials Designer envir
Or the user can [save or download](../../../materials-designer/header-menu/input-output.md) the material in Material JSON format or POSCAR format.


## Interactive JupyterLite Notebook
## Interactive JupyterLite Notebook.

The following JupyterLite notebook demonstrates the process of creating materials with substitution defects in GaN. Select "Run" > "Run All Cells".

Expand All @@ -119,12 +119,12 @@ The following JupyterLite notebook demonstrates the process of creating material
{% endwith %}
{% endwith %}

## References
## References.

1. **Giacomo Miceli, Alfredo Pasquarello**,
"Self-compensation due to point defects in Mg-doped GaN", Physical Review B, 2016.
[DOI: 10.1103/PhysRevB.93.165207](https://journals.aps.org/prb/abstract/10.1103/PhysRevB.93.165207){:target='_blank'}.

## Tags
## Tags.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may use the in-built tags feature - https://squidfunk.github.io/mkdocs-material/setup/setting-up-tags/

In that case, we need to specify the tags on the top/frontmatter (also tags are shown on the top of the page):

---
tags:
  - defects
  - defect pair
---

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't seem to use them anywhere currently, do we?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, we need to place them before

# YAML header
render_macros: true

And also set to hide:

hide:
   - tags

For desired display

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, we used tags to set YouTube hashtags. But they are set via JSON metadata (e.g., https://github.com/Exabyte-io/documentation/blob/master/lang/en/docs/metadata/general.json). We may think of modifying the tags plugin to include tags from JSON files and extend them.


`defects`, `defect pair`, `substitutional`, `vacancy`, `point defects`, `impurities`, `doped semiconductors`, `nitrogen`, `GaN`, `gallium nitride`
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
render_macros: true
---

# Substitutional Point Defects in Graphene
# Substitutional Point Defects in Graphene.

## Introduction
## Introduction.

This tutorial demonstrates the process of creating materials with substitution defects, based on the work presented in the following manuscript, where nitrogen defects in graphene are studied.

Expand All @@ -23,7 +23,7 @@ Specifically, the material from FIG. 1. b) of the paper:
![Point Defect, Substitution, 0](/images/tutorials/materials/defects/defect_creation_point_substitution_graphene/0-figure-from-manuscript.webp "Point Defect, Substitution, FIG. 1.")


## 1. Create Graphene Supercell
## 1. Create Graphene Supercell.

First, we navigate to [Materials Designer](../../../materials-designer/overview.md) and import the graphene material from the [Standata](../../../materials-designer/header-menu/input-output/standata-import.md).

Expand All @@ -33,29 +33,29 @@ We then use the [Advanced](../../../materials-designer/header-menu/advanced/supe

![Supercell Creation for Graphene](/images/tutorials/materials/defects/defect_creation_point_substitution_graphene/2-advanced-supercell.webp "Supercell Graphene")

## 2. Identify Defect Sites
## 2. Identify Defect Sites.

Next, we open the [3D editor](../../../materials-designer/3d-editor.md) to identify the crystal site positions for the defects.

![3D Editor](/images/tutorials/materials/defects/defect_creation_point_substitution_graphene/4-threejs-editor-coordinates.webp "3D Editor")

Hover over the atoms to get the coordinates of the atoms to replace. Then copy/paste these coordinates into a text file for later use.

## 3. Create Nitrogen Defects and Vacancies
## 3. Create Nitrogen Defects and Vacancies.

For the defect creation, we will use the [JupyterLite](../../../jupyterlite/overview.md) environment with the corresponding notebook.

### 3.1. Launch JupyterLite Session
### 3.1. Launch JupyterLite Session.

Select the "Advanced > [JupyterLite Transformation](../../../materials-designer/header-menu/advanced/jupyterlite-dialog.md)" menu item to launch the JupyterLite environment.

![JupyterLite Dialog](/images/jupyterlite/md-advanced-jl.webp "JupyterLite Dialog")

### 3.2. Open `create_point_defect.ipynb` notebook
### 3.2. Open `create_point_defect.ipynb` notebook.

Find `create_point_defect.ipynb` in the list of notebooks and click/double-click open it.

### 3.3. Open and modify the notebook
### 3.3. Open and modify the notebook.

Next, edit `create_point_defect.ipynb` notebook to modify the parameters by adding a list of [defect configuration objects](https://github.com/Exabyte-io/made/blob/3d938b4d91a31323dca7a02acb12b646dbb26634/src/py/mat3ra/made/tools/build/defect/configuration.py#L32) containing the approximate coordinates of the atoms to replace.

Expand Down Expand Up @@ -101,19 +101,19 @@ Here's the visual of the updated content:

![Notebook setup](/images/tutorials/materials/defects/defect_creation_point_substitution_graphene/5-jl-setup.webp "Notebook setup")

## 4. Run the Notebook
## 4. Run the Notebook.

Run the notebook by clicking `Run` > `Run All` in the top menu to run cells and wait for the results to appear.

![Run All](/images/jupyterlite/run-all.webp "Run All")

## 5. Analyze the Results
## 5. Analyze the Results.

After running the notebook, the user will be able to visualize the structure of Graphene with substitution defects.

![Review the Results](/images/tutorials/materials/defects/defect_creation_point_substitution_graphene/6-jl-result-preview.webp "Review the Results")

## 6. Pass the Material to Materials Designer
## 6. Pass the Material to Materials Designer.

The user can pass the material with substitution defects in the current Materials Designer environment and save it.

Expand All @@ -122,7 +122,7 @@ The user can pass the material with substitution defects in the current Material
Or the user can [save or download](../../../materials-designer/header-menu/input-output.md) the material in Material JSON format or POSCAR format.


## Interactive JupyterLite Notebook
## Interactive JupyterLite Notebook.

The following JupyterLite notebook demonstrates the process of creating materials with substitution defects in graphene. Select "Run" > "Run All Cells".

Expand All @@ -134,11 +134,11 @@ The following JupyterLite notebook demonstrates the process of creating material
{% endwith %}
{% endwith %}

## References
## References.

1. Yoshitaka Fujimoto and Susumu Saito, "Formation, stabilities, and electronic properties of nitrogen defects in graphene", Physical Review B, 2011. [DOI: 10.1103/PhysRevB.84.245446](https://journals.aps.org/prb/abstract/10.1103/PhysRevB.84.245446){:target='_blank'}.


## Tags
## Tags.

`defects`, `graphene`, `substitutional`, `point-defects`, `nitrogen`
Loading