From 04bf6063a37e9fd803851010b572915a12afc0cd Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Sun, 29 Dec 2024 20:35:57 -0800 Subject: [PATCH 1/6] feat: add gb 2d tutorial (claude) --- .../grain-boundary-2d-boron-nitride.md | 150 ++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 lang/en/docs/tutorials/materials/specific/grain-boundary-2d-boron-nitride.md diff --git a/lang/en/docs/tutorials/materials/specific/grain-boundary-2d-boron-nitride.md b/lang/en/docs/tutorials/materials/specific/grain-boundary-2d-boron-nitride.md new file mode 100644 index 00000000..1f425a0f --- /dev/null +++ b/lang/en/docs/tutorials/materials/specific/grain-boundary-2d-boron-nitride.md @@ -0,0 +1,150 @@ +--- +# YAML header +render_macros: true +--- + +# 2D Grain Boundaries in Hexagonal Boron Nitride + +## Introduction + +This tutorial demonstrates the process of creating 2D grain boundary structures in hexagonal boron nitride (h-BN), based on the work presented in the following manuscript: + +!!!note "Manuscript" + Qiucheng Li, Xiaolong Zou, Mengxi Liu, Jingyu Sun, Yabo Gao, Yue Qi, Xiebo Zhou, Boris I. Yakobson, Yanfeng Zhang, and Zhongfan Liu, "Grain Boundary Structures and Electronic Properties of Hexagonal Boron Nitride on Cu(111)", ACS Nano 2015 9 (6), 6308-6315. [DOI: 10.1021/acs.nanolett.5b01852](https://doi.org/10.1021/acs.nanolett.5b01852){:target='_blank'}. + +We will focus on creating h-BN grain boundary structures similar to Figure 2c from the manuscript: + +![h-BN Grain Boundary](/images/tutorials/materials/interfaces/grain_boundary_hbn/0-figure-from-manuscript.webp "h-BN Grain Boundary, FIG. 2c.") + +## 1. Create Initial h-BN Structure + +### 1.1. Load h-BN Material + +Navigate to [Materials Designer](../../../materials-designer/overview.md) and import the h-BN material from the [Standata](../../../materials-designer/header-menu/input-output/standata-import.md). + +1. Click on "Input/Output" menu +2. Select "Import from Standata" +3. Search for "Boron_Nitride" and select the 2D h-BN material + +![h-BN Material Import](/images/tutorials/materials/interfaces/grain_boundary_hbn/1-standata-hbn.webp "h-BN Material Import") + +### 1.2. Launch JupyterLite Session + +Select "Advanced > [JupyterLite Transformation](../../../materials-designer/header-menu/advanced/jupyterlite-dialog.md)" to open JupyterLite. + +### 1.3. Open and Configure Notebook + +Find and open `create_grain_boundary_film.ipynb`. Edit the grain boundary parameters in section 1.1: + +`TARGET_TWIST_ANGLE = 9.0` -- As described in the manuscript. +`ANGLE_TOLERANCE = 0.5` -- Tolerance for twist angle matching, in degrees. +`BOUNDARY_GAP = 0.0` -- Gap between orientations in X direction, should be set to 0.0 for seamless boundaries. +`DISTANCE_TOLERANCE = 1.43` -- Distance tolerance for atom merging, in Angstroms. Set to be smaller than the B-N length to avoid symmetrical atoms. +`EDGE_INCLUSION_TOLERANCE = 0.0` -- Edge inclusion parameter, in Angstroms. Controls the overlap of the second phase onto the first phase. + +```python +# Grain boundary parameters +TARGET_TWIST_ANGLE = 9.0 # in degrees +BOUNDARY_GAP = 0.0 # Gap between orientations in X direction +XY_SUPERCELL_MATRIX = [[1, 0], [0, 2]] + +# Search algorithm parameters +MAX_REPETITION = None +ANGLE_TOLERANCE = 0.5 # in degrees +RETURN_FIRST_MATCH = True + +# Distance tolerance for atom merging +DISTANCE_TOLERANCE = 1.43 # in Angstroms + +# Edge inclusion parameter +EDGE_INCLUSION_TOLERANCE = 0.0 # in Angstroms +``` + +!!!note "Important Parameter" + The `DISTANCE_TOLERANCE` parameter (1.43 Å) is larger than B-N distances at the one specific spot in the boundary. This will cause certain nitrogen atoms to be removed during structure generation, which we'll need to restore later. + +## 2. Generate Grain Boundary + +### 2.1. Run Initial Configuration + +Run the first part of the notebook to: +1. Load the h-BN structure +2. Set up the grain boundary configuration +3. Initialize the builder with the specified parameters + +### 2.2. Create and Analyze Grain Boundaries + +The notebook will: +1. Generate possible grain boundary structures +2. Display the number of structures found +3. Show the actual twist angle and number of atoms for each structure +4. Plot angle vs. number of atoms for all solutions + +![Solutions Analysis](/images/tutorials/materials/interfaces/grain_boundary_hbn/2-solutions.webp "Solutions Analysis") + +### 2.3. Review Selected Structure + +Select and visualize the grain boundary structure (by default, the first solution is used): + +```python +selected_structure = grain_boundaries[0] +visualize_materials(selected_structure, repetitions=[1, 1, 1]) +``` + +## 3. Restore Missing Nitrogen Atom + +Due to the `DISTANCE_TOLERANCE` setting, some nitrogen atoms at the boundary are removed. We need to restore them: + +### 3.1. Add Missing Nitrogen + +Use the adatom builder to add the missing nitrogen atom: + +```python +from mat3ra.made.tools.build.defect import AdatomSlabDefectBuilder, AdatomSlabPointDefectConfiguration + +config = AdatomSlabPointDefectConfiguration( + crystal=selected_structure, + chemical_element="N", + position_on_surface=[0.5, 0.45], + distance_z=0.01, +) + +builder = AdatomSlabDefectBuilder() +adjusted_structure = builder.get_material(config) +``` + +### 3.2. Verify Final Structure + +Review the completed structure: +1. Check the atomic positions at the boundary +2. Verify the restored nitrogen atom +3. Confirm overall structure integrity + +![Final Structure](/images/tutorials/materials/interfaces/grain_boundary_hbn/3-final-structure.webp "Final Structure") + +## 4. Save the Structure + +The final structure can be: +1. Passed back to Materials Designer +2. [Saved or downloaded](../../../materials-designer/header-menu/input-output.md) in Material JSON format +3. Exported as a POSCAR file + +## Interactive JupyterLite Notebook + +The following JupyterLite notebook demonstrates 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/grain_boundary_2d_hbn.ipynb' %} +{% include 'jupyterlite_embed.html' %} +{% endwith %} +{% endwith %} +{% endwith %} + +## References + +1. Qiucheng Li, et al., "Grain Boundary Structures and Electronic Properties of Hexagonal Boron Nitride on Cu(111)", ACS Nano 2015 9 (6), 6308-6315. [DOI: 10.1021/acs.nanolett.5b01852](https://doi.org/10.1021/acs.nanolett.5b01852) + +## Tags + +`grain-boundary`, `h-BN`, `2D-materials`, `interface`, `twist-angle`, `atom-restoration` From fe76e1203a51559ee323df678653443b6a07ba63 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Sun, 29 Dec 2024 20:45:06 -0800 Subject: [PATCH 2/6] update: human touch --- .../grain-boundary-2d-boron-nitride.md | 81 ++++++++----------- 1 file changed, 32 insertions(+), 49 deletions(-) diff --git a/lang/en/docs/tutorials/materials/specific/grain-boundary-2d-boron-nitride.md b/lang/en/docs/tutorials/materials/specific/grain-boundary-2d-boron-nitride.md index 1f425a0f..6d3d1934 100644 --- a/lang/en/docs/tutorials/materials/specific/grain-boundary-2d-boron-nitride.md +++ b/lang/en/docs/tutorials/materials/specific/grain-boundary-2d-boron-nitride.md @@ -63,71 +63,54 @@ EDGE_INCLUSION_TOLERANCE = 0.0 # in Angstroms !!!note "Important Parameter" The `DISTANCE_TOLERANCE` parameter (1.43 Å) is larger than B-N distances at the one specific spot in the boundary. This will cause certain nitrogen atoms to be removed during structure generation, which we'll need to restore later. -## 2. Generate Grain Boundary +## 2. Run the Notebook -### 2.1. Run Initial Configuration +Run the notebook by selecting "Run" > "Run All Cells". -Run the first part of the notebook to: -1. Load the h-BN structure -2. Set up the grain boundary configuration -3. Initialize the builder with the specified parameters - -### 2.2. Create and Analyze Grain Boundaries - -The notebook will: -1. Generate possible grain boundary structures -2. Display the number of structures found -3. Show the actual twist angle and number of atoms for each structure -4. Plot angle vs. number of atoms for all solutions - -![Solutions Analysis](/images/tutorials/materials/interfaces/grain_boundary_hbn/2-solutions.webp "Solutions Analysis") - -### 2.3. Review Selected Structure - -Select and visualize the grain boundary structure (by default, the first solution is used): - -```python -selected_structure = grain_boundaries[0] -visualize_materials(selected_structure, repetitions=[1, 1, 1]) -``` +![Initial h-BN Structure](/images/tutorials/materials/interfaces/grain_boundary_hbn/2-wave-result-1.webp "Initial h-BN Structure") ## 3. Restore Missing Nitrogen Atom -Due to the `DISTANCE_TOLERANCE` setting, some nitrogen atoms at the boundary are removed. We need to restore them: +Due to the `DISTANCE_TOLERANCE` setting, one nitrogen atom at the boundary is removed. We need to restore it: ### 3.1. Add Missing Nitrogen -Use the adatom builder to add the missing nitrogen atom: +Open JupyterLite Session and find `create_point_defect.ipynb` notebook. + +Select the h-BN grain boundary structure as input material and configure the adatom defect parameters in the "1.1. Set Notebook Parameters" section: ```python -from mat3ra.made.tools.build.defect import AdatomSlabDefectBuilder, AdatomSlabPointDefectConfiguration +DEFECT_TYPE = "interstitial" # (e.g. "vacancy", "substitution", "interstitial") +SITE_ID = None # Site index of the defect +COORDINATE = [0.5, 0.45, 0.5] # Position of the defect in crystal coordinates +APPROXIMATE_COORDINATE = None # Approximate coordinates of the defect in crystal coordinates +CHEMICAL_ELEMENT = "N" # Element to be placed at the site (ignored for vacancy) + +SUPERCELL_MATRIX = [[1, 0, 0], [0, 1, 0], [0, 0, 1]] + +# List of dictionaries with defect parameters +DEFECT_CONFIGS = [ + { + "defect_type": DEFECT_TYPE, + "coordinate": COORDINATE, + "chemical_element": CHEMICAL_ELEMENT, + } +] +``` -config = AdatomSlabPointDefectConfiguration( - crystal=selected_structure, - chemical_element="N", - position_on_surface=[0.5, 0.45], - distance_z=0.01, -) +### 3.2. Run the Notebook -builder = AdatomSlabDefectBuilder() -adjusted_structure = builder.get_material(config) -``` +Run the notebook to add the missing nitrogen atom to the h-BN grain boundary structure. -### 3.2. Verify Final Structure +![Final Structure Preview](/images/tutorials/materials/interfaces/grain_boundary_hbn/3-jl-result-preview.webp "Final Structure Preview") -Review the completed structure: -1. Check the atomic positions at the boundary -2. Verify the restored nitrogen atom -3. Confirm overall structure integrity +## 4. Pass Final Material to Materials Designer -![Final Structure](/images/tutorials/materials/interfaces/grain_boundary_hbn/3-final-structure.webp "Final Structure") +The user can pass the material with substitution defects in the current Materials Designer environment and save it. -## 4. Save the Structure +![Final Material](/images/tutorials/materials/interfaces/grain_boundary_hbn/4-wave-result-2.webp "Final Material") -The final structure can be: -1. Passed back to Materials Designer -2. [Saved or downloaded](../../../materials-designer/header-menu/input-output.md) in Material JSON format -3. Exported as a POSCAR file +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 @@ -135,7 +118,7 @@ The following JupyterLite notebook demonstrates the complete process. Select "Ru {% with origin_url=config.extra.jupyterlite.origin_url %} {% with notebooks_path_root=config.extra.jupyterlite.notebooks_path_root %} -{% with notebook_name='specific_examples/grain_boundary_2d_hbn.ipynb' %} +{% with notebook_name='specific_examples/grain_boundary_2d_boron_nitride.ipynb' %} {% include 'jupyterlite_embed.html' %} {% endwith %} {% endwith %} From b4e81f06c4daf3ffb6b139749f11dacc99572ce9 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Sun, 29 Dec 2024 21:35:41 -0800 Subject: [PATCH 3/6] update: add images --- .../0-figure-from-manuscript.webp | 3 +++ .../2-jl-setup-nb-gb.webp | 3 +++ .../3-jl-result-preview-gb.webp | 3 +++ .../4-wave-result-gb.webp | 3 +++ .../5-jl-setup-nb-final-gb.webp | 3 +++ .../6-jl-result-preview-final-gb.webp | 3 +++ .../7-wave-result-final-gb.webp | 3 +++ .../8-wave-result-final-gb-relaxed.webp | 3 +++ .../grain-boundary-2d-boron-nitride.md | 23 ++++++++++++++----- 9 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/0-figure-from-manuscript.webp create mode 100644 images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/2-jl-setup-nb-gb.webp create mode 100644 images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/3-jl-result-preview-gb.webp create mode 100644 images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/4-wave-result-gb.webp create mode 100644 images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/5-jl-setup-nb-final-gb.webp create mode 100644 images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/6-jl-result-preview-final-gb.webp create mode 100644 images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/7-wave-result-final-gb.webp create mode 100644 images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/8-wave-result-final-gb-relaxed.webp diff --git a/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/0-figure-from-manuscript.webp b/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/0-figure-from-manuscript.webp new file mode 100644 index 00000000..5e685279 --- /dev/null +++ b/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/0-figure-from-manuscript.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:967ddc92fe51fdb5be9842b049a8221267cf6c1167b2d1bee4ede52b85f72a38 +size 214234 diff --git a/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/2-jl-setup-nb-gb.webp b/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/2-jl-setup-nb-gb.webp new file mode 100644 index 00000000..d00b4606 --- /dev/null +++ b/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/2-jl-setup-nb-gb.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:236fb52008dca93cfe2374cc6bb5a2ed903b1d89513da38437fd83ba11f9bfb7 +size 64638 diff --git a/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/3-jl-result-preview-gb.webp b/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/3-jl-result-preview-gb.webp new file mode 100644 index 00000000..cc16c9b4 --- /dev/null +++ b/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/3-jl-result-preview-gb.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba8aa9f5bd10f2f83ad892e7f92942643820c91af9b43a8ca51944b753a215a9 +size 22688 diff --git a/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/4-wave-result-gb.webp b/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/4-wave-result-gb.webp new file mode 100644 index 00000000..22d93982 --- /dev/null +++ b/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/4-wave-result-gb.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2f2eb9e32900f34dabcc8bdc894dd4935fa1e78ae51bb5fc59d856f7a06259a +size 81548 diff --git a/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/5-jl-setup-nb-final-gb.webp b/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/5-jl-setup-nb-final-gb.webp new file mode 100644 index 00000000..7c9b5537 --- /dev/null +++ b/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/5-jl-setup-nb-final-gb.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ddef1c98a8589d119858a66569b53974ffb2f654c23d70e4cf94bdd167426a38 +size 75424 diff --git a/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/6-jl-result-preview-final-gb.webp b/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/6-jl-result-preview-final-gb.webp new file mode 100644 index 00000000..a1dcddd8 --- /dev/null +++ b/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/6-jl-result-preview-final-gb.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40355c1103f363f39ecd414fc5f58756eaed13b133ff05b2b3e2e0eeacc142d4 +size 27472 diff --git a/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/7-wave-result-final-gb.webp b/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/7-wave-result-final-gb.webp new file mode 100644 index 00000000..b4b5f75b --- /dev/null +++ b/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/7-wave-result-final-gb.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8ba0278efa6581dfaedff12d4efe9b370656f9c0cf53332db879bb6ff266f97 +size 69220 diff --git a/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/8-wave-result-final-gb-relaxed.webp b/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/8-wave-result-final-gb-relaxed.webp new file mode 100644 index 00000000..5d7c2af1 --- /dev/null +++ b/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/8-wave-result-final-gb-relaxed.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09c0df6dad544883e268d19fc4454a3647b1e197bd9106a6c892f1f92c1ec980 +size 84132 diff --git a/lang/en/docs/tutorials/materials/specific/grain-boundary-2d-boron-nitride.md b/lang/en/docs/tutorials/materials/specific/grain-boundary-2d-boron-nitride.md index 6d3d1934..8ca54c98 100644 --- a/lang/en/docs/tutorials/materials/specific/grain-boundary-2d-boron-nitride.md +++ b/lang/en/docs/tutorials/materials/specific/grain-boundary-2d-boron-nitride.md @@ -14,7 +14,7 @@ This tutorial demonstrates the process of creating 2D grain boundary structures We will focus on creating h-BN grain boundary structures similar to Figure 2c from the manuscript: -![h-BN Grain Boundary](/images/tutorials/materials/interfaces/grain_boundary_hbn/0-figure-from-manuscript.webp "h-BN Grain Boundary, FIG. 2c.") +![h-BN Grain Boundary](/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/0-figure-from-manuscript.webp "h-BN Grain Boundary, FIG. 2c.") ## 1. Create Initial h-BN Structure @@ -26,7 +26,8 @@ Navigate to [Materials Designer](../../../materials-designer/overview.md) and im 2. Select "Import from Standata" 3. Search for "Boron_Nitride" and select the 2D h-BN material -![h-BN Material Import](/images/tutorials/materials/interfaces/grain_boundary_hbn/1-standata-hbn.webp "h-BN Material Import") +![Standata h-BN Import](/images/tutorials/materials/interfaces/twisted-bilayer-boron-nitride/standata-import-bn.png "Standata h-BN Import") + ### 1.2. Launch JupyterLite Session @@ -38,7 +39,7 @@ Find and open `create_grain_boundary_film.ipynb`. Edit the grain boundary parame `TARGET_TWIST_ANGLE = 9.0` -- As described in the manuscript. `ANGLE_TOLERANCE = 0.5` -- Tolerance for twist angle matching, in degrees. -`BOUNDARY_GAP = 0.0` -- Gap between orientations in X direction, should be set to 0.0 for seamless boundaries. +`BOUNDARY_GAP = 0.0` -- Gap between two phases in X direction, should be set to 0.0 for seamless boundary. `DISTANCE_TOLERANCE = 1.43` -- Distance tolerance for atom merging, in Angstroms. Set to be smaller than the B-N length to avoid symmetrical atoms. `EDGE_INCLUSION_TOLERANCE = 0.0` -- Edge inclusion parameter, in Angstroms. Controls the overlap of the second phase onto the first phase. @@ -60,6 +61,8 @@ DISTANCE_TOLERANCE = 1.43 # in Angstroms EDGE_INCLUSION_TOLERANCE = 0.0 # in Angstroms ``` +![Notebook Setup](/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/3-jl-setup-nb-gb.webp "Notebook Setup") + !!!note "Important Parameter" The `DISTANCE_TOLERANCE` parameter (1.43 Å) is larger than B-N distances at the one specific spot in the boundary. This will cause certain nitrogen atoms to be removed during structure generation, which we'll need to restore later. @@ -67,7 +70,7 @@ EDGE_INCLUSION_TOLERANCE = 0.0 # in Angstroms Run the notebook by selecting "Run" > "Run All Cells". -![Initial h-BN Structure](/images/tutorials/materials/interfaces/grain_boundary_hbn/2-wave-result-1.webp "Initial h-BN Structure") +![Initial h-BN Structure](/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/4-wave-result-gb.webp "Initial h-BN Structure") ## 3. Restore Missing Nitrogen Atom @@ -98,20 +101,28 @@ DEFECT_CONFIGS = [ ] ``` +![Notebook Setup](/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/5-jl-setup-nb-final-gb.webp "Notebook Setup") + ### 3.2. Run the Notebook Run the notebook to add the missing nitrogen atom to the h-BN grain boundary structure. -![Final Structure Preview](/images/tutorials/materials/interfaces/grain_boundary_hbn/3-jl-result-preview.webp "Final Structure Preview") +![Final Structure Preview](/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/6-jl-result-preview-final-gb.webp "Final Structure Preview") ## 4. Pass Final Material to Materials Designer The user can pass the material with substitution defects in the current Materials Designer environment and save it. -![Final Material](/images/tutorials/materials/interfaces/grain_boundary_hbn/4-wave-result-2.webp "Final Material") +![Final Material](/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/7-wave-result-final-gb.webp "Final Material") Or the user can [save or download](../../../materials-designer/header-menu/input-output.md) the material in Material JSON format or POSCAR format. +## 5. Relaxation + +The relaxation can be performed elsewhere, and the resulting structure will be similar to the one shown in the manuscript. + +![Relaxed Structure](/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/8-wave-result-final-gb-relaxed.webp "Relaxed Structure") + ## Interactive JupyterLite Notebook The following JupyterLite notebook demonstrates the complete process. Select "Run" > "Run All Cells". From 698a78e8e9614a8cbec2b63efbc59ddddbc20f0d Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Sun, 29 Dec 2024 21:35:51 -0800 Subject: [PATCH 4/6] update: mkdocs --- mkdocs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/mkdocs.yml b/mkdocs.yml index 2f0ac49c..969c69fa 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -235,6 +235,7 @@ nav: - Interface between Graphene and SiO2 (alpha-quartz): tutorials/materials/specific/interface-2d-3d-graphene-silicon-dioxide.md - High-k Metal Gate Stack (Si/SiO2/HfO2/TiN): tutorials/materials/specific/heterostructure-silicon-silicon-dioxide-hafnium-dioxide-titanium-nitride.md - Grain Boundary in FCC Metals: tutorials/materials/specific/grain-boundary-3d-fcc-metals.md + - Grain Boundary (2D) in h-BN: tutorials/materials/specific/grain-boundary-2d-boron-nitride.md # COMMON UI COMPONENTS - Interface Components: From 9d87c7bc5ae05ce8444d90599bef6e65db6847c2 Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Sun, 29 Dec 2024 21:39:01 -0800 Subject: [PATCH 5/6] update: cleanup --- .../materials/specific/grain-boundary-2d-boron-nitride.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lang/en/docs/tutorials/materials/specific/grain-boundary-2d-boron-nitride.md b/lang/en/docs/tutorials/materials/specific/grain-boundary-2d-boron-nitride.md index 8ca54c98..e60ece22 100644 --- a/lang/en/docs/tutorials/materials/specific/grain-boundary-2d-boron-nitride.md +++ b/lang/en/docs/tutorials/materials/specific/grain-boundary-2d-boron-nitride.md @@ -61,7 +61,7 @@ DISTANCE_TOLERANCE = 1.43 # in Angstroms EDGE_INCLUSION_TOLERANCE = 0.0 # in Angstroms ``` -![Notebook Setup](/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/3-jl-setup-nb-gb.webp "Notebook Setup") +![Notebook Setup](/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/2-jl-setup-nb-gb.webp "Notebook Setup") !!!note "Important Parameter" The `DISTANCE_TOLERANCE` parameter (1.43 Å) is larger than B-N distances at the one specific spot in the boundary. This will cause certain nitrogen atoms to be removed during structure generation, which we'll need to restore later. @@ -70,6 +70,8 @@ EDGE_INCLUSION_TOLERANCE = 0.0 # in Angstroms Run the notebook by selecting "Run" > "Run All Cells". +The notebook will generate the h-BN grain boundary structure based on the parameters provided. + ![Initial h-BN Structure](/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/4-wave-result-gb.webp "Initial h-BN Structure") ## 3. Restore Missing Nitrogen Atom From 1dd7782cd01ac5e7b20efc5062fc1acc80370dca Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Tue, 31 Dec 2024 00:12:43 -0800 Subject: [PATCH 6/6] update: explain manual adjustment --- .../specific/grain-boundary-2d-boron-nitride.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lang/en/docs/tutorials/materials/specific/grain-boundary-2d-boron-nitride.md b/lang/en/docs/tutorials/materials/specific/grain-boundary-2d-boron-nitride.md index e60ece22..1bd80bb1 100644 --- a/lang/en/docs/tutorials/materials/specific/grain-boundary-2d-boron-nitride.md +++ b/lang/en/docs/tutorials/materials/specific/grain-boundary-2d-boron-nitride.md @@ -38,7 +38,7 @@ Select "Advanced > [JupyterLite Transformation](../../../materials-designer/head Find and open `create_grain_boundary_film.ipynb`. Edit the grain boundary parameters in section 1.1: `TARGET_TWIST_ANGLE = 9.0` -- As described in the manuscript. -`ANGLE_TOLERANCE = 0.5` -- Tolerance for twist angle matching, in degrees. +`ANGLE_TOLERANCE = 0.5` -- Tolerance for twist angle matching, in degrees. `BOUNDARY_GAP = 0.0` -- Gap between two phases in X direction, should be set to 0.0 for seamless boundary. `DISTANCE_TOLERANCE = 1.43` -- Distance tolerance for atom merging, in Angstroms. Set to be smaller than the B-N length to avoid symmetrical atoms. `EDGE_INCLUSION_TOLERANCE = 0.0` -- Edge inclusion parameter, in Angstroms. Controls the overlap of the second phase onto the first phase. @@ -119,11 +119,12 @@ 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. -## 5. Relaxation +## 5. Manual Adjustment -The relaxation can be performed elsewhere, and the resulting structure will be similar to the one shown in the manuscript. +To fill the gaps between two phases edge atoms can be adjusted manually in Materials Designer 3D editor. +The resulting structure should be similar to the one shown in the manuscript. -![Relaxed Structure](/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/8-wave-result-final-gb-relaxed.webp "Relaxed Structure") +![Adjusted Structure](/images/tutorials/materials/defects/grain_boundary_2d_boron_nitride/8-wave-result-final-gb-relaxed.webp "Adjusted Structure") ## Interactive JupyterLite Notebook