Skip to content

Commit

Permalink
Merge pull request #305 from Exabyte-io/feature/SOF-7524
Browse files Browse the repository at this point in the history
feature/SOF-7524 Vacancy in hBN tutorial
  • Loading branch information
VsevolodX authored Dec 28, 2024
2 parents f019a49 + f2d0d0b commit 0a7288e
Show file tree
Hide file tree
Showing 8 changed files with 157 additions and 0 deletions.
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
---
# YAML header
render_macros: true
---

# Vacancy Point Defects in Hexagonal Boron Nitride.

## Introduction.

This tutorial demonstrates the process of creating materials with vacancy point defects, based on the work presented in the following manuscript:

!!!note "Manuscript"
Fabian Bertoldo, Sajid Ali, Simone Manti & Kristian S. Thygesen, "Quantum point defects in 2D materials - the QPOD database", Nature, 2022. [DOI:10.1038/s41524-022-00730-w](https://doi.org/10.1038/s41524-022-00730-w){:target='_blank'}.

We use the [Materials Designer](../../../materials-designer/overview.md) and JupyterLite environment to create a nanoribbon of hexagonal boron nitride (h-BN) and introduce vacancy defects. The process combines the capabilities of nanoribbon creation and point defect introduction.

We will focus on creating a structure similar to Figure 6 from the manuscript, which demonstrates boron vacancy defects in hexagonal boron nitride:

![Vacancy in h-BN](/images/tutorials/materials/defects/defect_point_vacancy_boron_nitride/0-figure-from-manuscript.webp "Vacancy in h-BN")

## 1. Import Base Material.

First, we need to import the hexagonal boron nitride (h-BN) material from the [Standata](../../../materials-designer/header-menu/input-output/standata-import.md) database.

### 1.1. Open Materials Designer.

Navigate to [Materials Designer](../../../materials-designer/overview.md) and click on the "Input/Output" menu.

### 1.2. Import from Standata.

1. Select "Import from Standata" in the Input/Output menu
2. In the search box, enter "Boron Nitride"
4. Click on the h-BN material to import it

![Standata h-BN Import](/images/tutorials/materials/interfaces/twisted-bilayer-boron-nitride/standata-import-bn.png "Standata h-BN Import")

## 2. Create h-BN Nanoribbon.

Next, we'll create a nanoribbon structure using the JupyterLite environment.

### 2.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")

### 2.2. Open and Configure Nanoribbon Notebook.

Find and open `create_nanoribbon.ipynb` in the list of notebooks. Edit the nanoribbon parameters in section 1.1 of the notebook:

```python
WIDTH = 3 # in number of unit cells
LENGTH = 6 # in number of unit cells
VACUUM_WIDTH = 0 # in number of unit cells
VACUUM_LENGTH = 0 # in number of unit cells
EDGE_TYPE = "zigzag" # "zigzag" or "armchair"
```

![Nanoribbon Parameters](/images/tutorials/materials/defects/defect_point_vacancy_boron_nitride/2-jl-nb-setup-nanoribbon.webp "Nanoribbon Parameters")

### 2.3. Run the Notebook.

Run the notebook by clicking `Run` > `Run All` in the top menu. This will create a nanoribbon structure from the imported h-BN material.

### 2.4. Review Nanoribbon in Materials Designer.

After the notebook completes:

1. The nanoribbon structure will be passed back to Materials Designer
2. User can view the structure in the 3D editor
3. Verify the nanoribbon dimensions and edge type

![Nanoribbon Preview](/images/tutorials/materials/defects/defect_point_vacancy_boron_nitride/3-wave-preview-nanoribbon.webp "Nanoribbon Preview")


## 3. Create the Vacancy Defect.

After creating the nanoribbon, we'll introduce the vacancy defect using the point defect notebook.

### 3.1. Open Point Defect Notebook.

Open `create_point_defect.ipynb` and modify the defect configuration parameters:

```python
SUPERCELL_MATRIX = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
DEFECT_CONFIGS = [
{
"defect_type": "vacancy",
"approximate_coordinate": [0.5, 0.5, 0.5],
"use_cartesian_coordinates": False
}
]
```

The configuration specifies:

- `defect_type`: "vacancy" for removing an atom
- `approximate_coordinate`: Position in crystal coordinates where the vacancy will be created
- `use_cartesian_coordinates`: False to use fractional coordinates

![Point Defect Parameters](/images/tutorials/materials/defects/defect_point_vacancy_boron_nitride/4-jl-nb-setup-point-defect.webp "Point Defect Parameters")

### 3.2. Run the Notebook.

Click `Run` > `Run All` in the top menu to run the notebook and preview the results.

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

## 4. Save the Material.

After running both notebooks, user can visualize the structure of h-BN with the vacancy defect in the Materials Designer 3D viewer.

![Vacancy in h-BN](/images/tutorials/materials/defects/defect_point_vacancy_boron_nitride/6-wave-result.webp "Vacancy in h-BN")


[Save or download](../../../materials-designer/header-menu/input-output.md) in Material JSON format

## Interactive JupyterLite Notebook.

The following JupyterLite notebooks demonstrate the complete process. Select "Run" > "Run All Cells".

{% with origin_url=config.extra.jupyterlite.origin_url %}
{% with notebooks_path_root=config.extra.jupyterlite.notebooks_path_root %}
{% with notebook_name='specific_examples/defect_point_vacancy_boron_nitride.ipynb' %}
{% include 'jupyterlite_embed.html' %}
{% endwith %}
{% endwith %}
{% endwith %}

## References.

1. Fabian Bertoldo, Sajid Ali, Simone Manti & Kristian S. Thygesen, "Quantum point defects in 2D materials - the QPOD database", Nature, 2022. [DOI:10.1038/s41524-022-00730-w](https://doi.org/10.1038/s41524-022-00730-w){:target='_blank'}.

2. Kohan A. F., Ceder G., Morgan D., Van de Walle C. G. (2000). First-principles study of native point defects in h-BN. Physical Review B, 61(23), 15019-15027. [DOI:10.1103/PhysRevB.61.15019](https://doi.org/10.1103/PhysRevB.61.15019){:target='_blank'}.

## Tags.

`defects`, `vacancy`, `point-defects`, `h-BN`, `boron-nitride`, `2D-materials`
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ nav:
- Specific:
- Substitutional Point Defects in Graphene: tutorials/materials/specific/defect-point-substitution-graphene.md
- Vacancy-Substitution Pair Defects in GaN: tutorials/materials/specific/defect-point-pair-gallium-nitride.md
- Vacancy Point Defect in h-BN: tutorials/materials/specific/defect-point-vacancy-boron-nitride.md
- Island Surface Defect Formation in TiN: tutorials/materials/specific/defect-surface-island-titanium-nitride.md
- Twisted Bilayer h-BN nanoribbons: tutorials/materials/specific/interface-bilayer-twisted-nanoribbons-boron-nitride.md
- Twisted Bilayer MoS2 commensurate lattices: tutorials/materials/specific/interface-bilayer-twisted-commensurate-lattices-molybdenum-disulfide.md
Expand Down

0 comments on commit 0a7288e

Please sign in to comment.