diff --git a/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/bands-around-K.webp b/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/bands-around-K.webp new file mode 100644 index 000000000..454de4c48 --- /dev/null +++ b/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/bands-around-K.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d51c95c1c17bc8384d56460ce3204711e35f8e726444ce4172ba01a8f4ae1506 +size 12536 diff --git a/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/fig2-energy-vs-distance.webp b/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/fig2-energy-vs-distance.webp new file mode 100644 index 000000000..9e83ff6b2 --- /dev/null +++ b/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/fig2-energy-vs-distance.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b9b9de43eeda89725078e43f278cca61ab02c9d28449431cba9a41bee18ab63c +size 14640 diff --git a/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/fig4-gap-vs-distance.webp b/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/fig4-gap-vs-distance.webp new file mode 100644 index 000000000..aee460c49 --- /dev/null +++ b/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/fig4-gap-vs-distance.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8360f9db627d0609c3b3f1de449b9bcb900222f0a4d8313852301ebe8c85304 +size 12840 diff --git a/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/giovannetti2007-fig1-stackings.webp b/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/giovannetti2007-fig1-stackings.webp new file mode 100644 index 000000000..baa4c545a --- /dev/null +++ b/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/giovannetti2007-fig1-stackings.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea3e4035556a58c9fc94ff147f8e8c9fae2e39cadfa16b55b0575488f2df3552 +size 70890 diff --git a/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/giovannetti2007-fig2-energy-vs-distance.webp b/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/giovannetti2007-fig2-energy-vs-distance.webp new file mode 100644 index 000000000..e448b7dab --- /dev/null +++ b/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/giovannetti2007-fig2-energy-vs-distance.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91a793fd6aac7b30a1221578395585b7704746bf523f4543ad21f5c4bd984546 +size 25094 diff --git a/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/giovannetti2007-fig4-gap-vs-distance.webp b/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/giovannetti2007-fig4-gap-vs-distance.webp new file mode 100644 index 000000000..2f46f2895 --- /dev/null +++ b/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/giovannetti2007-fig4-gap-vs-distance.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf3765795a4f83e762281ca16ad304dffef894237a4bc8a1a9f722b7c406392c +size 25046 diff --git a/lang/en/docs/includes/references.bib b/lang/en/docs/includes/references.bib index 316d5bff2..1f648cd78 100644 --- a/lang/en/docs/includes/references.bib +++ b/lang/en/docs/includes/references.bib @@ -265,6 +265,16 @@ @doi = url = {https://doi.org/10.1038/ncomms7308} } +@article{Giovannetti2007, + title = {Substrate-induced band gap in graphene on hexagonal boron nitride: Ab initio density functional calculations}, + author = {Giovannetti, Gianluca and Khomyakov, Petr A. and Brocks, Geert and Kelly, Paul J. and van den Brink, Jeroen}, + journal = {Physical Review B}, + volume = {76}, + pages = {073103}, + year = {2007}, + doi = {10.1103/PhysRevB.76.073103} +} + @article{Novoselov2016, title = {2D materials and van der Waals heterostructures}, author = {K. S. Novoselov, A. Mishchenko, A. Carvalho and A. H. Castro Neto}, diff --git a/lang/en/docs/index-guide.md b/lang/en/docs/index-guide.md index 4eef020ee..42230822f 100644 --- a/lang/en/docs/index-guide.md +++ b/lang/en/docs/index-guide.md @@ -42,7 +42,7 @@ Step-by-step recipes reproducing published work, one row per publication: the st | Chan et al. (2008)[^7] | Adatom surface defects | [Graphene](tutorials/materials/specific/defect-surface-adatom-graphene.md) | Adsorption energy, density of states, diffusion barriers (Coming Soon) | | Xian et al. (2019)[^8] | Twisted bilayer | [h-BN nanoribbons](tutorials/materials/specific/interface-bilayer-twisted-nanoribbons-boron-nitride.md) | Band structure, total energies versus twist angle (Coming Soon) | | Liu et al. (2014)[^9] | Twisted bilayer | [MoS2](tutorials/materials/specific/interface-bilayer-twisted-commensurate-lattices-molybdenum-disulfide.md) | [Band structure](tutorials/materials/specific/interface-bilayer-twisted-commensurate-lattices-molybdenum-disulfide-simulation.md) | -| Jung et al. (2015)[^10] | 2D–2D interface | [Graphene / h-BN](tutorials/materials/specific/interface-2d-2d-graphene-boron-nitride.md) | Band structure, total energies (Coming Soon) | +| Jung et al. (2015)[^10] | 2D–2D interface | [Graphene / h-BN](tutorials/materials/specific/interface-2d-2d-graphene-boron-nitride.md) | [Stacking energy and band gap](tutorials/materials/specific/interface-2d-2d-graphene-boron-nitride-simulation.md) | | Shan et al. (2011)[^11] | 3D–3D interface | [Cu / SiO2](tutorials/materials/specific/interface-3d-3d-copper-silicon-dioxide.md) | Band structure (Coming Soon) | | Kang et al. (2008)[^12] | 2D–3D interface | [Graphene / SiO2](tutorials/materials/specific/interface-2d-3d-graphene-silicon-dioxide.md) | Band structure (Coming Soon) | | Dahal et al. (2014)[^13] | Interface optimization | [Graphene / Ni(111)](tutorials/materials/specific/optimization-interface-film-xy-position-graphene-nickel.md) | [Registry and work of adhesion](tutorials/materials/specific/optimization-interface-film-xy-position-graphene-nickel-simulation.md) | diff --git a/lang/en/docs/tutorials/materials/specific/interface-2d-2d-graphene-boron-nitride-simulation.md b/lang/en/docs/tutorials/materials/specific/interface-2d-2d-graphene-boron-nitride-simulation.md new file mode 100644 index 000000000..fd6b25e2b --- /dev/null +++ b/lang/en/docs/tutorials/materials/specific/interface-2d-2d-graphene-boron-nitride-simulation.md @@ -0,0 +1,199 @@ +--- +tags: + - 2D + - graphene + - boron-nitride + - interface + - band-structure + - stacking + - C-2D-INT-Z + +hide: + - tags +# YAML header +render_macros: true +--- + +# Graphene on h-BN (Stacking Energy and Band Gap) + +## 1. Introduction + +This tutorial calculates the total energy and band structure of graphene on four layers of h-BN for the three stackings (a), (b) and (c) of the structure tutorial, over a list of graphene–h-BN distances, reproducing Fig. 2 (total energy vs distance and the equilibrium distances), Fig. 3 (bands and density of states of (c) at its equilibrium distance, gap at K) and Fig. 4 (gap at K vs distance) of the following manuscript. + +!!!note "Manuscript" + **Gianluca Giovannetti, Petr A. Khomyakov, Geert Brocks, Paul J. Kelly and Jeroen van den Brink** + **Substrate-induced band gap in graphene on hexagonal boron nitride: Ab initio density functional calculations** + Physical Review B 76, 073103 (2007) + [DOI: 10.1103/PhysRevB.76.073103](https://doi.org/10.1103/PhysRevB.76.073103){:target='_blank'} [@Giovannetti2007] + +![The three stackings of graphene on h-BN](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/giovannetti2007-fig1-stackings.webp "The three stackings of graphene on h-BN (Giovannetti et al. 2007, Fig. 1): (a) C over B and N, (b) C over N and a hexagon centre, (c) C over B and a hexagon centre") + +![Total energy vs interlayer distance for the three stackings](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/giovannetti2007-fig2-energy-vs-distance.webp "Total energy vs interlayer distance for the three stackings (Giovannetti et al. 2007, Fig. 2)") + +![Gap at K vs interlayer distance for the three stackings](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/giovannetti2007-fig4-gap-vs-distance.webp "Gap at K vs interlayer distance for the three stackings (Giovannetti et al. 2007, Fig. 4)") + +## 2. Prerequisites + +Run the [structure creation tutorial](interface-2d-2d-graphene-boron-nitride.md) first. Its `interface_2d_2d_boron_nitride_graphene.ipynb` notebook creates and names the materials this notebook loads, for example `Gr/hBN (c) d3.10`. The defaults build stacking (c) at 3.1, 3.2 and 3.3 Å. The paper's full set is described in [Customization options](#7-customization-options). + +## 3. Workflow overview + +The notebook runs the Standata `band_structure_dos.json` workflow once per material. It chains `pw_scf` (total energy), `pw_bands` (band structure), `pw_nscf` and `projwfc` (density of states). + +The sheets are rigid and the workflow includes no relaxation step, as in the paper. The jobs run one at a time, and a re-run finds each finished job by its material and workflow name and reuses it. + +## 4. Calculation parameters + +Cell 1.2 sets the stackings, the distances, the cluster and the workflow name: + +```python +from datetime import datetime +from mat3ra.ide.compute import QueueName + +ORGANIZATION_NAME = None # set to your organization name (full or partial); otherwise, your default one is used +FOLDER = "./uploads" + +# Giovannetti et al. 2007 compute all three stackings at every distance 2.5–3.9 Å; the defaults run +# stacking (c) at three distances around its minimum. Uncomment entries to compute more +# (one job per stacking × distance, ~25 min each on queue D with two cores). +STACKINGS = [ + "c", + # "a", + # "b", +] +DISTANCES = [ + 3.1, 3.2, 3.3, + # 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, +] +MATERIAL_NAME = "Gr/hBN ({stacking}) d{distance:.2f}" # as saved by the structure notebook + +WORKFLOW_SEARCH_TERM = "band_structure_dos.json" +MY_WORKFLOW_NAME = "Band Structure + DOS" +APPLICATION_NAME = "espresso" + +CLUSTER_NAME = "001" # specify full or partial name i.e. "cluster-001" to select +QUEUE_NAME = QueueName.D +PPN = 2 +TIME_LIMIT = "04:00:00" + +timestamp = datetime.now().strftime("%Y-%m-%d %H:%M") +POLL_INTERVAL = 60 # seconds +``` + +Cell 1.3 sets the DFT parameters: + +```python +MODEL_SUBTYPE = "lda" +FUNCTIONAL = "pz" # Giovannetti et al. 2007 use LDA: GGA gives essentially no interlayer binding +PSEUDOPOTENTIAL_TYPE = "us" # GBRV ultrasoft, the only LDA family the platform publishes for B, C and N +ECUTWFC = 40 # Ry, GBRV's tested cutoff; the paper's 600 eV is a VASP number +ECUTRHO = 200 # Ry, GBRV's tested charge-density cutoff + +KGRID = [36, 36, 1] # Giovannetti et al. 2007; a multiple of 3 keeps K on the mesh +OCCUPATIONS_SETTINGS = {"occupations": "tetrahedra"} # the paper's tetrahedron method +# eamp = 0: the sawtooth is the dipole correction only, no external field +DIPOLE_SETTINGS = {"control": {"tefield": True, "dipfield": True}, "system": {"edir": 3, "eamp": 0.0, "eopreg": 0.05}} +KPATH_STEPS = 100 +MODEL_TAG = (f"{FUNCTIONAL}-{PSEUDOPOTENTIAL_TYPE} {ECUTWFC}-{ECUTRHO}Ry k{KGRID[0]} p{KPATH_STEPS} " + f"{OCCUPATIONS_SETTINGS['occupations']} eamp{DIPOLE_SETTINGS['system']['eamp']}") + +SCF_UNIT = "pw_scf" +NSCF_UNIT = "pw_nscf" +BANDS_UNIT = "pw_bands" +NUMBER_OF_OCCUPIED_BANDS = 20 # 40 valence electrons: C 4×2, B 3×4, N 5×4 + +KPATH = [ + {"point": "Γ", "steps": KPATH_STEPS}, + {"point": "K", "steps": KPATH_STEPS}, + {"point": "M", "steps": KPATH_STEPS}, + {"point": "Γ", "steps": 1}, +] + +VELOCITY_FIT_RANGE = (3, 8) # path points from K used for the ħv fit +ZOOM_POINTS = 12 # path points each side of K in the zoom +ZOOM_WINDOW = 0.5 # eV each side of the band edges +``` + +| paper | this notebook | +|---|---| +| LDA | LDA | +| VASP, plane waves, 600 eV | GBRV ultrasoft, 40/200 Ry | +| 36×36×1 | 36×36×1 | +| tetrahedron | tetrahedron (scf, nscf) | +| dipole correction | dipole correction (`tefield`, `dipfield`, `edir = 3`, `eamp = 0`, no external field) | +| 4 h-BN layers at 3.24 Å | 4 h-BN layers at 3.24 Å | +| a = 2.445 Å | a = 2.445 Å | +| vacuum 12–15 Å | vacuum 15 Å | +| rigid sheets | rigid sheets | + +## 5. Step-by-step instructions + +### 5.1. Open the notebook + +Navigate to the API examples repository and open: + +``` +other/materials_designer/specific_examples/interface_2d_2d_boron_nitride_graphene_SIMULATION.ipynb +``` + +### 5.2. Configure parameters + +In cell 1.2, set `ORGANIZATION_NAME` to the account's organization, and `STACKINGS` and `DISTANCES` to the same lists as in the structure notebook. Cell 1.3 keeps the paper's settings. + +### 5.3. Run the notebook + +Select *Run* > *Run All*. The notebook [authenticates with the platform]({{ interface_url }}/jupyterlite/authentication.md) (section 2), loads the materials by name, prints their provenance and saves them to the platform (section 3), configures one workflow per material (section 4), creates the compute configuration (section 5) and submits the jobs one at a time (section 6). Each ten-atom job takes about 16 minutes on queue D with two cores, so the full set runs overnight. Section 7 retrieves the total energies, gaps and plots, and section 8 prints the comparison with the paper. + +### 5.4. Re-run the notebook + +A re-run finds the finished jobs by material and workflow name and reuses them rather than resubmitting. + +## 6. Expected results + +The paper's values and the values measured by the notebook: + +| quantity | paper | this notebook | deviation | +|---|---|---|---| +| equilibrium distance (a) | 3.50 Å | computed when "a" / "b" and the other distances are uncommented | | +| equilibrium distance (b) | 3.40 Å | computed when "a" / "b" and the other distances are uncommented | | +| equilibrium distance (c) | 3.22 Å | 3.232 Å | +0.4 % | +| gap at K at the equilibrium distance (a) | 56 meV | computed when "a" / "b" and the other distances are uncommented | | +| gap at K at the equilibrium distance (b) | 46 meV | computed when "a" / "b" and the other distances are uncommented | | +| gap at K at the equilibrium distance (c) | 53 meV | 50.1 meV | −5 % | +| h-BN gap at K | 4.7 eV | 4.73 eV | +1 % | +| effective mass at K (c) | 4.7·10⁻³ mₑ | 6.7·10⁻³ mₑ | +43 % | +| E(c) < E(b) < E(a) at every distance | yes | computed when "a" / "b" and the other distances are uncommented | | + +Gap at K at 3.1 / 3.2 / 3.3 Å: 75.2 / 55.0 / 39.8 meV (Fig. 4, curve (c)). + +![Total energy vs distance, stacking (c)](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/fig2-energy-vs-distance.webp "Total energy vs distance, stacking (c), default run (the paper's Fig. 2, one curve)") + +![Gap at K vs distance, stacking (c)](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/fig4-gap-vs-distance.webp "Gap at K vs distance, stacking (c), default run (the paper's Fig. 4, one curve)") + +![Bands around K for stacking (c) at 3.20 Å](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/bands-around-K.webp "Bands around K for (c) at 3.20 Å, default run (the paper's Fig. 3 inset): 55 meV gap") + +The notebook plots the total energy and the gap at K against the distance for each stacking (the paper's Fig. 2 and Fig. 4) and, for (c) at its equilibrium distance, the bands, the density of states and a zoom around K (Fig. 3). + +## 7. Customization options + +`DISTANCES` and `STACKINGS` select the materials; they must match the lists in the structure notebook. `KGRID` and `KPATH_STEPS` control the k-point sampling of the SCF/NSCF grid and the band-structure path; `ECUTWFC` and `ECUTRHO` set the plane-wave cutoffs. `MODEL_TAG` is built from these settings and is part of every workflow's name, so changing any of them creates new jobs rather than reusing the ones already run. + +The paper's full set (three stackings × 2.5–3.9 Å) is obtained by uncommenting the `STACKINGS` and `DISTANCES` entries in both notebooks, one job per entry pair, about 25 minutes each on queue D. + +## 8. Troubleshooting + +### 8.1. Material not found + +`ValueError: No material named …` means the structure notebook has not been run, or the stackings and distances do not match those of the structure notebook. Run the [structure tutorial](interface-2d-2d-graphene-boron-nitride.md) first; the names must match those the structure notebook saves. + +## 9. Interactive JupyterLite notebook + +{% with origin_url=config.extra.jupyterlite.origin_url_lab %} +{% with notebooks_path_root=config.extra.jupyterlite.notebooks_path_root %} +{% with notebook_name='specific_examples/interface_2d_2d_boron_nitride_graphene_SIMULATION.ipynb' %} +{% include 'jupyterlite_embed.html' %} +{% endwith %} +{% endwith %} +{% endwith %} + +## 10. References diff --git a/lang/en/docs/tutorials/materials/specific/interface-2d-2d-graphene-boron-nitride.md b/lang/en/docs/tutorials/materials/specific/interface-2d-2d-graphene-boron-nitride.md index 28330f6ec..9a52f9515 100644 --- a/lang/en/docs/tutorials/materials/specific/interface-2d-2d-graphene-boron-nitride.md +++ b/lang/en/docs/tutorials/materials/specific/interface-2d-2d-graphene-boron-nitride.md @@ -17,146 +17,180 @@ render_macros: true ## 1. Introduction -This tutorial demonstrates the process of creating interfaces with different stacking configurations between 2D materials, specifically hexagonal boron nitride (h-BN) and graphene, based on the work presented in the following manuscript, where the electronic properties of h-BN-graphene interfaces are studied. +This tutorial creates graphene on four layers of hexagonal boron nitride (h-BN) for three stackings and a list of graphene–h-BN distances, following the manuscript below. !!!note "Manuscript" - **Jeil Jung, Ashley M. DaSilva, Allan H. MacDonald & Shaffique Adam** - **Origin of the band gap in graphene on hexagonal boron nitride** - Nature Communications volume 6, Article number: 6308 (2015) - [DOI: 10.1038/ncomms7308](https://doi.org/10.1038/ncomms7308) [@Jung2015; @Novoselov2016; @Gupta2024] + **Gianluca Giovannetti, Petr A. Khomyakov, Geert Brocks, Paul J. Kelly and Jeroen van den Brink** + **Substrate-induced band gap in graphene on hexagonal boron nitride: Ab initio density functional calculations** + Physical Review B 76, 073103 (2007) + [DOI: 10.1103/PhysRevB.76.073103](https://doi.org/10.1103/PhysRevB.76.073103){:target='_blank'} [@Giovannetti2007] - -We use the [Materials Designer]({{ interface_url }}/materials-designer/overview/) to create interfaces and shift the layers along the y-axis to achieve different stacking configurations. - -The Figure 7 shows the different stacking configurations of graphene on h-BN. - -![Graphene on Hexagonal Boron Nitride](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/0-figure-from-manuscript.webp "Graphene on Hexagonal Boron Nitride, FIG. 7") +The [Materials Designer]({{ interface_url }}/materials-designer/overview/) imports the two materials from Standata, and the [JupyterLite]({{ interface_url }}/jupyterlite/overview/) notebook builds the interfaces. ## 2. Load and preview materials -First, we navigate to [Materials Designer]({{ interface_url }}/materials-designer/overview/) and import the Graphene and Hexagonal BN materials from the [Standata]({{ interface_url }}/materials-designer/header-menu/input-output/standata-import/). - +First, navigate to [Materials Designer]({{ interface_url }}/materials-designer/overview/) and import graphene (`2dm-3993`) and bulk h-BN (`mp-7991`) from [Standata]({{ interface_url }}/materials-designer/header-menu/input-output/standata-import/). ![Standata Graphene and h-BN Import](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/1-standata-import-gr-hbn.webp "Standata Graphene and h-BN Import") -Then we will use the [JupyterLite]({{ interface_url }}/jupyterlite/overview/) environment to create the target structures. - - -## 3. Create interface between h-BN and Graphene - -### 2.1 Launch JupyterLite Session - -Select the "Advanced > [JupyterLite Transformation]({{ interface_url }}/materials-designer/header-menu/advanced/jupyterlite-dialog/)" menu item to launch the JupyterLite environment. +### 2.1. Launch JupyterLite session +Select the "Advanced > [JupyterLite Transformation]({{ interface_url }}/materials-designer/header-menu/advanced/jupyterlite-dialog/)" menu item to launch the JupyterLite environment, with h-BN as the first material and graphene as the second. ![JupyterLite Dialog](../../../images/jupyterlite/md-advanced-jl.webp "JupyterLite Dialog") -### 3.2. Open and modify the notebook - -Select the input materials with first one being the substrate (h-BN) and the second one being the film (Graphene). +### 2.2. Open the notebook and set the parameters -Next, open `create_interface_with_min_strain_zsl.ipynb` notebook to modify the parameters by changing: +Open the `interface_2d_2d_boron_nitride_graphene.ipynb` notebook. Cell 1.1 sets the parameters: -Miller indices of both materials to `(0,0,1)`, +```python +LATTICE_CONSTANT = 2.445 # Å, graphene LDA (Giovannetti et al. 2007); h-BN is compressed to it +H_BN_LAYERS = 4 +H_BN_INTERLAYER_DISTANCE = 3.24 # Å, the paper's LDA value +VACUUM = 15.0 # Å above graphene + +# Giovannetti et al. 2007 compute all three stackings at every distance 2.5–3.9 Å; the defaults run +# stacking (c) at three distances around its minimum. Uncomment entries to compute more +# (one job per stacking × distance, ~25 min each on queue D with two cores). +STACKINGS = [ + "c", + # "a", + # "b", +] +DISTANCES = [ + 3.1, 3.2, 3.3, + # 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, +] +STACKING_SHIFTS = {"a": 0, "b": 1, "c": -1} # in units of a/√3 along y +REGISTRY_TOLERANCE = 1e-3 # crystal units +``` -Thickness of both materials to `1`, +`STACKINGS` and `DISTANCES` list the registries and distances to build; the defaults build stacking (c) at 3.1, 3.2 and 3.3 Å, and uncommenting the rest builds the paper's 3 × 15 set. -Distance between materials to `3.4` angstroms -- mentioned in the publication. +![Notebook setup](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/2-jl-setup-notebook.webp "Notebook setup") -Default value for `MAX_AREA = 50` should be enough since materials have similar lattice constants. +## 3. Create the interfaces between h-BN and graphene +### 3.1. Strain the materials -Adjust the "1.1. Set up slab parameters" cell in the notebook according to: +Both materials are strained in-plane to a = 2.445 Å, and h-BN along c to 3.24 Å between layers: ```python -# Enable interactive selection of terminations via UI prompt -IS_TERMINATIONS_SELECTION_INTERACTIVE = False - -FILM_INDEX = 1 # Index in the list of materials, to access as materials[FILM_INDEX] -FILM_MILLER_INDICES = (0, 0, 1) -FILM_THICKNESS = 1 # in atomic layers -FILM_TERMINATION_FORMULA = None # if None, the first termination will be used -FILM_VACUUM = 0.0 # in angstroms -FILM_XY_SUPERCELL_MATRIX = [[1, 0], [0, 1]] -FILM_USE_ORTHOGONAL_C = True - -SUBSTRATE_INDEX = 0 -SUBSTRATE_MILLER_INDICES = (0, 0, 1) -SUBSTRATE_THICKNESS = 1 # in atomic layers -SUBSTRATE_TERMINATION_FORMULA = None # if None, the first termination will be used -SUBSTRATE_VACUUM = 0.0 # in angstroms -SUBSTRATE_XY_SUPERCELL_MATRIX = [[1, 0], [0, 1]] -SUBSTRATE_USE_ORTHOGONAL_C = True - -INTERFACE_DISTANCE = 3.4 # Gap between substrate and film, in Angstrom -INTERFACE_VACUUM = 20.0 # Vacuum over film, in Angstrom - -# Whether to convert materials to conventional cells before creating slabs. -# To create interfaces with smaller cells, set this flag to False. (and pass already conventional cells as input) -USE_CONVENTIONAL_CELL = True - -# Maximum area for the superlattice search algorithm (the final interface area will be smaller) -MAX_AREA = 50 # in Angstrom^2 -# Additional fine-tuning parameters (increase values to get more strained matches): -MAX_AREA_TOLERANCE = 0.09 # in Angstrom^2 -MAX_LENGTH_TOLERANCE = 0.05 -MAX_ANGLE_TOLERANCE = 0.02 - -# Whether to reduce the resulting interface cell to the primitive cell after the interface creation. -# If the reduction causes unexpected results, try increasing the `MAX_AREA` for search. -REDUCE_RESULT_CELL_TO_PRIMITIVE = True +from mat3ra.made.tools.build_components.operations.core.modifications.strain.helpers import create_strain + +film_scale = LATTICE_CONSTANT / film.lattice.a +substrate_scale = LATTICE_CONSTANT / substrate.lattice.a +substrate_c_scale = 2 * H_BN_INTERLAYER_DISTANCE / substrate.lattice.c +film = create_strain(film, strain_matrix=[[film_scale, 0, 0], [0, film_scale, 0], [0, 0, 1]]) +substrate = create_strain( + substrate, strain_matrix=[[substrate_scale, 0, 0], [0, substrate_scale, 0], [0, 0, substrate_c_scale]] +) ``` -![Notebook setup](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/2-jl-setup-notebook.webp "Notebook setup") +### 3.2. Set the AA' stacking of h-BN +The standata bulk h-BN entry is not AA': its boron atoms sit over hexagon centres of the next layer. The atoms of the upper layer are moved by (1/3, 2/3, 0) in crystal coordinates, so that boron sits over nitrogen in adjacent layers: -### 3.3. Run the Notebook +```python +from mat3ra.made.tools.analyze.other import get_atom_indices_with_condition_on_coordinates +from mat3ra.made.tools.operations.core.unary import translate_atoms -After setting the parameters, run the notebook to create the interface between h-BN and Graphene. +upper_layer_ids = get_atom_indices_with_condition_on_coordinates(substrate, lambda coordinate: coordinate[2] > 0.5) +substrate = translate_atoms( + substrate, atom_ids=upper_layer_ids, vector=[1 / 3, 2 / 3, 0], use_cartesian_coordinates=False +) +``` -![Run All](../../../images/jupyterlite/run-all.webp "Run All") +### 3.3. Create the slabs -### 3.4. View Results and shift the layers +The h-BN slab has four layers, two per bulk cell, and the graphene slab one layer: -The generation might take some time. -After that, the user can pass the material to the Materials Designer for further analysis. +```python +from mat3ra.made.tools.build.pristine_structures.two_dimensional.slab import SlabConfiguration, SlabBuilder -Interface between h-BN and Graphene with the specified parameters is shown below. +substrate_slab_config = SlabConfiguration.from_parameters( + material_or_dict=substrate, + miller_indices=(0, 0, 1), + number_of_layers=H_BN_LAYERS // 2, # two BN layers per bulk cell + vacuum=0.0, +) -![Gr/h-BN Interface ](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/3-jl-result-preview.webp "Gr/h-BN Interface") +film_slab_config = SlabConfiguration.from_parameters( + material_or_dict=film, + miller_indices=(0, 0, 1), + number_of_layers=1, + vacuum=0.0, +) -To shift graphene layer along the y-axis, the user can modify the last cell in the notebook to achieve different stacking configurations. +substrate_slab = SlabBuilder().get_material(substrate_slab_config) +film_slab = SlabBuilder().get_material(film_slab_config) +``` -As mentioned in the publication, the vector to slide the layers between AA, AB and BB configurations is `a/sqrt(3)`. +### 3.4. Create the interface at each distance and stacking -One can achieve any multiples of shift vector by changing the value of `n` in the following code snippet using the `interface_displace_part()` function from the `mat3ra.made.tools.modify` module. +The loop places graphene on the h-BN slab at each distance, shifts it along y by the registry shift of each stacking, names the interface and prints the measured registry: ```python import numpy as np +from mat3ra.made.tools.analyze.other import get_average_interlayer_distance +from mat3ra.made.tools.convert.interface_parts_enum import InterfacePartsEnum +from mat3ra.made.tools.helpers import create_interface_zsl_between_slabs as create_zsl_interface_between_slabs from mat3ra.made.tools.modify import interface_displace_part -n = 1 -a = selected_interface.lattice.a -shifted_interface = interface_displace_part( - interface=selected_interface, - displacement=[0, n * a / np.sqrt(3), 0], - use_cartesian_coordinates=True, -) + +def get_registry(interface): + elements = np.array(interface.basis.elements.values) + coordinates = np.array(interface.basis.coordinates.values) + top_layer = (elements != "C") & np.isclose(coordinates[:, 2], coordinates[elements != "C", 2].max()) + registry = [] + for carbon in coordinates[elements == "C"]: + in_plane_offsets = (coordinates[top_layer, :2] - carbon[:2] + 0.5) % 1 - 0.5 + atoms_below = elements[top_layer][np.all(np.abs(in_plane_offsets) < 1e-3, axis=1)] + registry.append(atoms_below[0] if len(atoms_below) else "hollow") + return registry + + +interfaces = [] +for stacking in STACKINGS: + for distance in DISTANCES: + # the builder adds the gap to the vacuum above the film + interface = create_zsl_interface_between_slabs( + substrate_slab=substrate_slab, film_slab=film_slab, gap=distance, vacuum=VACUUM - distance + ) + interface = interface_displace_part( + interface=interface, + displacement=[0, STACKING_SHIFTS[stacking] * interface.lattice.a / np.sqrt(3), 0], + use_cartesian_coordinates=True, + ) + interface.name = f"Gr/hBN ({stacking}) d{distance:.2f}" + interface.lattice.type = "HEX" + interfaces.append(interface) + interlayer_distance = get_average_interlayer_distance( + interface, InterfacePartsEnum.SUBSTRATE.value, InterfacePartsEnum.FILM.value + ) + vacuum = interface.lattice.c * (1 - max(coordinate[2] for coordinate in interface.basis.coordinates.values)) + print(f"{interface.name}: {len(interface.basis.elements.ids)} atoms, a = {interface.lattice.a:.4f} Å, " + f"gamma = {interface.lattice.gamma:.1f}°, distance = {interlayer_distance:.3f} Å, " + f"vacuum = {vacuum:.2f} Å, C over {' / '.join(get_registry(interface))}") ``` -![Shift Interface](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/4-jl-setup-shift.webp "Shift Interface") +![Gr/h-BN Interface](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/3-jl-result-preview.webp "Gr/h-BN Interface") -Preview of interfaces with different stacking configurations is shown below. +### 3.5. Run the notebook -![Shifted Interfaces](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/5-jl-result-preview.webp "Shifted Interfaces") +Select *Run* > *Run All*. + +![Run All](../../../images/jupyterlite/run-all.webp "Run All") ## 4. Pass the Material to Materials Designer -The user can pass the material with the interface in the current Materials Designer environment and save it. +The user can pass the materials to the current Materials Designer environment and save them. ![Final Material](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/6-wave-result.webp "Graphene on Hexagonal Boron Nitride Interface") -Or the user can [save or download]({{ interface_url }}/materials-designer/header-menu/input-output/) the material in Material JSON format or POSCAR format. +Or the user can [save or download]({{ interface_url }}/materials-designer/header-menu/input-output/) the materials in Material JSON format or POSCAR format. + +The interfaces are named `Gr/hBN () d`, for example `Gr/hBN (c) d3.10`, and the [simulation tutorial](interface-2d-2d-graphene-boron-nitride-simulation.md) loads them by these names. ## 5. Interactive JupyterLite Notebook diff --git a/lang/en/docs/tutorials/materials/specific/overview.md b/lang/en/docs/tutorials/materials/specific/overview.md index 8968f21fe..bc7ba43fa 100644 --- a/lang/en/docs/tutorials/materials/specific/overview.md +++ b/lang/en/docs/tutorials/materials/specific/overview.md @@ -41,7 +41,7 @@ This document provides a comprehensive catalog of materials science tutorials or ##### 2.1.1.1. Graphene/h-BN Interface C-2D-INT-Z **Structure**: [Create Graphene/h-BN Interface](interface-2d-2d-graphene-boron-nitride.md) -**Properties**: Calculate band structure and total energies (Coming Soon) +**Properties**: [Calculate Stacking Energy and Band Gap of Graphene on h-BN](interface-2d-2d-graphene-boron-nitride-simulation.md) **DOI**: [10.1038/ncomms7308](https://doi.org/10.1038/ncomms7308){:target='_blank'} [@Jung2015] ![Graphene on Hexagonal Boron Nitride](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/0-figure-from-manuscript.webp "Graphene on Hexagonal Boron Nitride, FIG. 7"){ style="max-height:500px;width:auto;" } diff --git a/mkdocs-guide.yml b/mkdocs-guide.yml index ba00f7226..bb6be7f04 100644 --- a/mkdocs-guide.yml +++ b/mkdocs-guide.yml @@ -209,6 +209,7 @@ nav: - Gold Nanoclusters: tutorials/materials/specific/nanocluster-gold.md - SrTiO3 Slab: tutorials/materials/specific/slab-strontium-titanate.md - Graphene / h-BN Interface: tutorials/materials/specific/interface-2d-2d-graphene-boron-nitride.md + - Graphene on h-BN (Stacking Energy and Band Gap): tutorials/materials/specific/interface-2d-2d-graphene-boron-nitride-simulation.md - Cu / SiO2 Interface: tutorials/materials/specific/interface-3d-3d-copper-silicon-dioxide.md - Graphene / SiO2 Interface: tutorials/materials/specific/interface-2d-3d-graphene-silicon-dioxide.md - High-k Metal Gate Stack: tutorials/materials/specific/heterostructure-silicon-silicon-dioxide-hafnium-dioxide-titanium-nitride.md diff --git a/mkdocs.yml b/mkdocs.yml index 474190c5e..905ffa664 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -170,6 +170,7 @@ nav: - Gold Nanoclusters: tutorials/materials/specific/nanocluster-gold.md - SrTiO3 Slab: tutorials/materials/specific/slab-strontium-titanate.md - Interface between Graphene and h-BN: tutorials/materials/specific/interface-2d-2d-graphene-boron-nitride.md + - Graphene on h-BN (Stacking Energy and Band Gap): tutorials/materials/specific/interface-2d-2d-graphene-boron-nitride-simulation.md - Interface between Copper and SiO2 (Cristobalite): tutorials/materials/specific/interface-3d-3d-copper-silicon-dioxide.md - 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