From 99dc22b05741301f83964458b8e46491bb1af088 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Fri, 2 Oct 2026 17:10:32 -0700 Subject: [PATCH 01/18] =?UTF-8?q?SOF-8064:=20structure=20page=20=E2=80=94?= =?UTF-8?q?=20the=20120=C2=B0=20re-setting=20and=20the=20seven=20names;=20?= =?UTF-8?q?Giovannetti=202007=20bib;=20nav=20lines?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5 --- lang/en/docs/includes/references.bib | 10 ++++ .../interface-2d-2d-graphene-boron-nitride.md | 53 +++++++++++++++---- mkdocs-guide.yml | 1 + mkdocs.yml | 1 + 4 files changed, 56 insertions(+), 9 deletions(-) diff --git a/lang/en/docs/includes/references.bib b/lang/en/docs/includes/references.bib index 316d5bff2..dc116ed3f 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}, + 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/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..fdc920566 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 @@ -116,7 +116,7 @@ After setting the parameters, run the notebook to create the interface between h ![Run All](../../../images/jupyterlite/run-all.webp "Run All") -### 3.4. View Results and shift the layers +### 3.4. View Results The generation might take some time. After that, the user can pass the material to the Materials Designer for further analysis. @@ -125,23 +125,44 @@ Interface between h-BN and Graphene with the specified parameters is shown below ![Gr/h-BN Interface ](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/3-jl-result-preview.webp "Gr/h-BN Interface") +### 3.5. Set the cell to the standard hexagonal setting + +The ZSL interface cell comes out with γ = 60°, but the symbolic K point used by the simulation notebook assumes the standard 120° hexagonal cell. The cell is therefore re-set with a unimodular supercell matrix, and each shifted interface is typed `HEX`: + +```python +from mat3ra.made.tools.helpers import create_supercell + +interface = create_supercell(interface, supercell_matrix=[[1, 0, 0], [-1, 1, 0], [0, 0, 1]]) +``` + +### 3.6. Shift the layers to generate stacking configurations + To shift graphene layer along the y-axis, the user can modify the last cell in the notebook to achieve different stacking configurations. -As mentioned in the publication, the vector to slide the layers between AA, AB and BB configurations is `a/sqrt(3)`. +As mentioned in the publication, the vector to slide the layers between AA, AB and BB configurations is `a/sqrt(3)`. The notebook builds seven interfaces at half-steps of this vector, with `n` running from `2` to `8`. 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. ```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.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, -) +a = interface.lattice.a +shifted_interfaces = [] +for index, n in enumerate(range(2, 9)): + shifted_interface = interface_displace_part( + interface=interface, + displacement=[0, n * a / np.sqrt(3) / 2, 0], + use_cartesian_coordinates=True) + shifted_interface.name = INTERFACE_NAMES[index] + shifted_interface.lattice.type = "HEX" + shifted_interfaces.append(shifted_interface) + interlayer_distance = get_average_interlayer_distance( + shifted_interface, InterfacePartsEnum.SUBSTRATE.value, InterfacePartsEnum.FILM.value) + print(f"{shifted_interface.name}: {len(shifted_interface.basis.elements.ids)} atoms, " + f"gamma = {shifted_interface.lattice.gamma:.1f}°, interlayer distance = {interlayer_distance:.3f} Å") ``` ![Shift Interface](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/4-jl-setup-shift.webp "Shift Interface") @@ -158,6 +179,20 @@ The user can pass the material with the interface in the current Materials Desig Or the user can [save or download]({{ interface_url }}/materials-designer/header-menu/input-output/) the material in Material JSON format or POSCAR format. +The shift loop names the seven interfaces as follows, and the simulation notebook loads materials by these exact names: + +- `Gr/hBN d3.4 shift 0of6 BA` +- `Gr/hBN d3.4 shift 1of6` +- `Gr/hBN d3.4 shift 2of6 AA` +- `Gr/hBN d3.4 shift 3of6` +- `Gr/hBN d3.4 shift 4of6 AB` +- `Gr/hBN d3.4 shift 5of6` +- `Gr/hBN d3.4 shift 6of6 BA` + +Three of the seven are the symmetric stackings: AA (carbon over both boron and nitrogen), AB (carbon over nitrogen and over a hexagon centre) and BA (carbon over boron and over a hexagon centre); `0of6` and `6of6` are both BA, the same structure one period apart. + +Once the structures exist, the [simulation tutorial](interface-2d-2d-graphene-boron-nitride-simulation.md) loads them by name and reproduces the manuscript's stacking energies and band gaps. + ## 5. Interactive JupyterLite Notebook 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 From 4b1938c83e06ba3a78606483031ad31da38b2a9e Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Fri, 2 Oct 2026 17:31:17 -0700 Subject: [PATCH 02/18] =?UTF-8?q?SOF-8064:=20simulation=20tutorial=20page?= =?UTF-8?q?=20=E2=80=94=20stacking=20energy=20and=20gap=20at=20K=20of=20gr?= =?UTF-8?q?aphene=20on=20h-BN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5 --- lang/en/docs/includes/references.bib | 2 +- ...2d-2d-graphene-boron-nitride-simulation.md | 213 ++++++++++++++++++ .../interface-2d-2d-graphene-boron-nitride.md | 4 +- 3 files changed, 216 insertions(+), 3 deletions(-) create mode 100644 lang/en/docs/tutorials/materials/specific/interface-2d-2d-graphene-boron-nitride-simulation.md diff --git a/lang/en/docs/includes/references.bib b/lang/en/docs/includes/references.bib index dc116ed3f..1f648cd78 100644 --- a/lang/en/docs/includes/references.bib +++ b/lang/en/docs/includes/references.bib @@ -266,7 +266,7 @@ @doi = } @article{Giovannetti2007, - title = {Substrate-induced band gap in graphene on hexagonal boron nitride}, + 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}, 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..34b76b9d5 --- /dev/null +++ b/lang/en/docs/tutorials/materials/specific/interface-2d-2d-graphene-boron-nitride-simulation.md @@ -0,0 +1,213 @@ +--- +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 the seven stacking configurations of graphene on h-BN created in the structure tutorial, at a fixed interlayer distance of 3.4 Å, reproducing results from 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] + +Jung et al. (2015) model the same system; its Fig. 7(a) is an RPA-parameterised curve, not an independent DFT calculation, so the DFT numbers reproduced here are Giovannetti's [@Jung2015]. + +## 2. Prerequisites + +Run the [structure creation tutorial](interface-2d-2d-graphene-boron-nitride.md) first. Its notebook creates and names the seven stacking configurations this notebook loads: + +- `Gr/hBN d3.4 shift 0of6 BA` +- `Gr/hBN d3.4 shift 1of6` +- `Gr/hBN d3.4 shift 2of6 AA` +- `Gr/hBN d3.4 shift 3of6` +- `Gr/hBN d3.4 shift 4of6 AB` +- `Gr/hBN d3.4 shift 5of6` +- `Gr/hBN d3.4 shift 6of6 BA` + +An account with a cluster is also required. + +## 3. Workflow overview + +The notebook runs the Standata `band_structure_dos.json` workflow, which chains `pw_scf` (total energy), `pw_bands` (band structure), `pw_nscf` and `projwfc` (density of states, left on the job and not plotted). + +One workflow is created per material, so seven jobs run in total. The jobs run one after another: the notebook waits for each job to finish before submitting the next. Re-running the notebook finds each already-finished job by its material and workflow name and reuses it instead of resubmitting. + +Both sheets are held rigid at 3.4 Å; the workflow includes no relaxation step, matching the paper's own fixed-distance calculation. + +## 4. Calculation parameters + +Cell 1.2 sets the materials, 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" + +# Names saved by the structure notebook; the symmetric stackings carry their Jung 2015 / Giovannetti 2007 label +MATERIALS = { + "Gr/hBN d3.4 shift 0of6 BA": {"shift": 0, "stacking": "BA"}, + "Gr/hBN d3.4 shift 1of6": {"shift": 1, "stacking": None}, + "Gr/hBN d3.4 shift 2of6 AA": {"shift": 2, "stacking": "AA"}, + "Gr/hBN d3.4 shift 3of6": {"shift": 3, "stacking": None}, + "Gr/hBN d3.4 shift 4of6 AB": {"shift": 4, "stacking": "AB"}, + "Gr/hBN d3.4 shift 5of6": {"shift": 5, "stacking": None}, + "Gr/hBN d3.4 shift 6of6 BA": {"shift": 6, "stacking": "BA"}, +} + +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.OR +PPN = 16 # queue OR on cluster-001 allows at most 16 cores per node +TIME_LIMIT = "02: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 = 50 # Ry +ECUTRHO = 400 # Ry, 8x for ultrasoft pseudopotentials + +KGRID = [36, 36, 1] # Giovannetti et al. 2007; a multiple of 3 keeps K on the mesh +SMEARING_SETTINGS = {"degauss": 0.001} # Ry; the gaps compared are 30-80 meV +MODEL_TAG = f"{FUNCTIONAL}-{PSEUDOPOTENTIAL_TYPE} {ECUTWFC}-{ECUTRHO}Ry k{KGRID[0]} g{SMEARING_SETTINGS['degauss']}" + +SCF_UNIT = "pw_scf" +NSCF_UNIT = "pw_nscf" +BANDS_UNIT = "pw_bands" +N_OCCUPIED_BANDS = 8 # 16 valence electrons: C 4 + 4, B 3, N 5 + +KPATH_STEPS = 40 +KPATH = [ + {"point": "Γ", "steps": KPATH_STEPS}, + {"point": "K", "steps": KPATH_STEPS}, + {"point": "M", "steps": KPATH_STEPS}, + {"point": "Γ", "steps": 1}, +] +``` + +| paper | this notebook | +|---|---| +| LDA (both) | LDA (both) | +| VASP 600 eV / PAW-type potentials | GBRV ultrasoft, 50/400 Ry | +| 36×36×1 (both) | 36×36×1 (both) | +| tetrahedron | Gaussian 0.001 Ry | +| cell a = 2.445 Å (graphene LDA, h-BN compressed) | 2.509 Å (h-BN unstrained, graphene +1.79%) | +| 4 h-BN layers | 1 | +| dipole correction | none | +| vacuum 12–15 Å | 23.4 Å | + +## 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` and `CLUSTER_NAME` to the account's organization and cluster. `MATERIALS` already lists the seven names the structure notebook saves; leave it unchanged unless a material was renamed. + +### 5.3. Run the notebook + +Select *Run* > *Run All*. The notebook [authenticates with the platform]({{ interface_url }}/jupyterlite/authentication.md), loads the seven materials and prints their provenance, saves them to the platform, configures one workflow per material, creates the compute configuration, then submits the seven jobs one at a time. Each job blocks the notebook until it finishes, a few minutes for a four-atom cell. Once all seven have finished, the notebook retrieves the band structures, total energies and gaps at K, and prints the comparison table. + +### 5.4. Re-run the notebook + +Running the notebook again finds the seven jobs already finished by material and workflow name and reuses them rather than resubmitting. + +## 6. Expected results + +At d = 3.4 Å, Giovannetti et al. (Fig. 4) give gaps at K of AA ≈ 80 meV, AB ≈ 45 meV, BA ≈ 30 meV (±5 meV read off the axis), and Fig. 2 gives the energy ordering E(BA) < E(AB) < E(AA), with values at 3.4 Å of c ≈ −0.055 eV, b ≈ −0.045 eV, a ≈ −0.035 eV per cell for BA, AB, AA respectively. + +| shift | stacking | ΔE (meV) | gap (meV) | paper gap (meV) | +|---|---|---|---|---| +| 0 | BA | TODO(live run) | TODO(live run) | 30 | +| 1 | bridge | TODO(live run) | TODO(live run) | | +| 2 | AA | TODO(live run) | TODO(live run) | 80 | +| 3 | bridge | TODO(live run) | TODO(live run) | | +| 4 | AB | TODO(live run) | TODO(live run) | 45 | +| 5 | bridge | TODO(live run) | TODO(live run) | | +| 6 | BA | TODO(live run) | TODO(live run) | 30 | + +![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") + +At its own equilibrium distances the paper reports larger gaps, quoted here for reference and not compared: AA 56 meV at 3.50 Å, AB 46 meV at 3.40 Å, BA 53 meV at 3.22 Å. + +The notebook's final cell prints four clauses and a verdict: + +``` +E(BA) < E(AB) < E(AA): {energy_ordering} +Minimum at BA, maximum at AA: {energy_extrema} +Gap AA > AB > BA: {gap_ordering} +Each gap within 15 meV of Fig. 4: {gaps_within_tolerance} +``` + +``` +Reproduces Giovannetti et al. (2007): yes|no +``` + +## 7. Customization options + +`KGRID` and `KPATH_STEPS` control the k-point sampling of the SCF/NSCF grid and the band-structure path; `ECUTWFC` (with `ECUTRHO` at 8×) controls the plane-wave cutoff; `SMEARING_SETTINGS["degauss"]` controls the Gaussian smearing width. `MODEL_TAG` is built from these and is part of every workflow's name, so changing any of them creates new jobs rather than reusing the ones already run. + +To add a material, add a name to `MATERIALS` with its shift index and stacking label (`"AA"`, `"AB"`, `"BA"` or `None` for a bridge point); the name must match one saved by the structure notebook. + +## 8. Troubleshooting + +### 8.1. Material not found + +`ValueError: No material named …` means the structure notebook has not been run, or the name in `MATERIALS` does not match. Run the [structure tutorial](interface-2d-2d-graphene-boron-nitride.md) first; the names must match cell 1.2 exactly. + +### 8.2. Cluster not found + +`Cluster '001' not found` means no cluster matching `CLUSTER_NAME` is registered on the account. Register a cluster, or set `CLUSTER_NAME` to one that is. + +### 8.3. Gap near 1 eV + +If a printed gap is around 1 eV or larger, the provenance line's `gamma` is not 120.000°. The structure notebook's cell 3.5 re-setting of the cell to the hexagonal setting did not run. + +### 8.4. Provenance print fails + +The provenance print in cell 3.1 depends on labels that are not stored when a material is saved to the platform. Run the structure notebook so that the materials exist in `uploads/` rather than being loaded from the platform. + +## 9. Interactive JupyterLite notebook + +{% with origin_url=config.extra.jupyterlite.origin_url %} +{% 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 fdc920566..7b5030481 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 @@ -139,9 +139,9 @@ interface = create_supercell(interface, supercell_matrix=[[1, 0, 0], [-1, 1, 0], To shift graphene layer along the y-axis, the user can modify the last cell in the notebook to achieve different stacking configurations. -As mentioned in the publication, the vector to slide the layers between AA, AB and BB configurations is `a/sqrt(3)`. The notebook builds seven interfaces at half-steps of this vector, with `n` running from `2` to `8`. +As mentioned in the publication, the vector to slide the layers between AA, AB and BA configurations is `a/sqrt(3)`. The notebook builds seven interfaces at half-steps of this vector, with `n` running from `2` to `8`. -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 below builds the seven interfaces and names them from `INTERFACE_NAMES`, using the `interface_displace_part()` function from the `mat3ra.made.tools.modify` module. ```python import numpy as np From d77064c469a3f8fb58c1b02db962ac966aa998ab Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Fri, 2 Oct 2026 17:33:49 -0700 Subject: [PATCH 03/18] =?UTF-8?q?SOF-8064:=20simulation=20page=20=E2=80=94?= =?UTF-8?q?=20JupyterLab=20embed,=20settings=20table=20wording,=20drop=20t?= =?UTF-8?q?he=20Jung=20figure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5 --- ...erface-2d-2d-graphene-boron-nitride-simulation.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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 index 34b76b9d5..4858f328d 100644 --- 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 @@ -114,9 +114,9 @@ KPATH = [ | paper | this notebook | |---|---| -| LDA (both) | LDA (both) | -| VASP 600 eV / PAW-type potentials | GBRV ultrasoft, 50/400 Ry | -| 36×36×1 (both) | 36×36×1 (both) | +| LDA | LDA | +| VASP, plane waves, 600 eV | GBRV ultrasoft, 50/400 Ry | +| 36×36×1 | 36×36×1 | | tetrahedron | Gaussian 0.001 Ry | | cell a = 2.445 Å (graphene LDA, h-BN compressed) | 2.509 Å (h-BN unstrained, graphene +1.79%) | | 4 h-BN layers | 1 | @@ -147,7 +147,7 @@ Running the notebook again finds the seven jobs already finished by material and ## 6. Expected results -At d = 3.4 Å, Giovannetti et al. (Fig. 4) give gaps at K of AA ≈ 80 meV, AB ≈ 45 meV, BA ≈ 30 meV (±5 meV read off the axis), and Fig. 2 gives the energy ordering E(BA) < E(AB) < E(AA), with values at 3.4 Å of c ≈ −0.055 eV, b ≈ −0.045 eV, a ≈ −0.035 eV per cell for BA, AB, AA respectively. +At d = 3.4 Å, Giovannetti et al. (Fig. 4) give gaps at K of AA ≈ 80 meV, AB ≈ 45 meV, BA ≈ 30 meV (±5 meV read off the axis), and Fig. 2 gives the energy ordering E(BA) < E(AB) < E(AA), with Fig. 2 read at 3.4 Å as BA ≈ −0.055, AB ≈ −0.045, AA ≈ −0.035 eV per cell. | shift | stacking | ΔE (meV) | gap (meV) | paper gap (meV) | |---|---|---|---|---| @@ -159,8 +159,6 @@ At d = 3.4 Å, Giovannetti et al. (Fig. 4) give gaps at K of AA ≈ 80 meV, AB | 5 | bridge | TODO(live run) | TODO(live run) | | | 6 | BA | TODO(live run) | TODO(live run) | 30 | -![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") - At its own equilibrium distances the paper reports larger gaps, quoted here for reference and not compared: AA 56 meV at 3.50 Å, AB 46 meV at 3.40 Å, BA 53 meV at 3.22 Å. The notebook's final cell prints four clauses and a verdict: @@ -202,7 +200,7 @@ The provenance print in cell 3.1 depends on labels that are not stored when a ma ## 9. Interactive JupyterLite notebook -{% with origin_url=config.extra.jupyterlite.origin_url %} +{% 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' %} From c3707b85e6df36a497b04ac87c01e7372b18a26a Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Fri, 2 Oct 2026 18:16:53 -0700 Subject: [PATCH 04/18] =?UTF-8?q?SOF-8064:=20review=20=E2=80=94=20re-quote?= =?UTF-8?q?=20cells=20after=2040/200=20Ry,=20AB=2046=20meV,=20Fig.=204,=20?= =?UTF-8?q?names=20shown=20once,=20Coming=20Soon=20links?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5 --- .../giovannetti2007-fig4-gap-vs-distance.webp | 3 ++ lang/en/docs/index-guide.md | 2 +- ...2d-2d-graphene-boron-nitride-simulation.md | 38 ++++++++----------- .../interface-2d-2d-graphene-boron-nitride.md | 16 ++++++++ .../tutorials/materials/specific/overview.md | 2 +- 5 files changed, 37 insertions(+), 24 deletions(-) create mode 100644 images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/giovannetti2007-fig4-gap-vs-distance.webp 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..f98a1a601 --- /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:5d4bbc0fdf424791196831b09bd91c5973a1315ee13ed32c0d0f4cc773647b96 +size 23758 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 index 4858f328d..39dc18ab7 100644 --- 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 @@ -30,15 +30,7 @@ Jung et al. (2015) model the same system; its Fig. 7(a) is an RPA-parameterised ## 2. Prerequisites -Run the [structure creation tutorial](interface-2d-2d-graphene-boron-nitride.md) first. Its notebook creates and names the seven stacking configurations this notebook loads: - -- `Gr/hBN d3.4 shift 0of6 BA` -- `Gr/hBN d3.4 shift 1of6` -- `Gr/hBN d3.4 shift 2of6 AA` -- `Gr/hBN d3.4 shift 3of6` -- `Gr/hBN d3.4 shift 4of6 AB` -- `Gr/hBN d3.4 shift 5of6` -- `Gr/hBN d3.4 shift 6of6 BA` +Run the [structure creation tutorial](interface-2d-2d-graphene-boron-nitride.md) first. Its `interface_2d_2d_boron_nitride_graphene.ipynb` notebook names the seven stacking configurations (listed on that page) that this notebook loads. An account with a cluster is also required. @@ -91,19 +83,19 @@ Cell 1.3 sets the DFT parameters: 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 = 50 # Ry -ECUTRHO = 400 # Ry, 8x for ultrasoft pseudopotentials +ECUTWFC = 40 # Ry, GBRV's tested cutoff +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 SMEARING_SETTINGS = {"degauss": 0.001} # Ry; the gaps compared are 30-80 meV -MODEL_TAG = f"{FUNCTIONAL}-{PSEUDOPOTENTIAL_TYPE} {ECUTWFC}-{ECUTRHO}Ry k{KGRID[0]} g{SMEARING_SETTINGS['degauss']}" +KPATH_STEPS = 40 +MODEL_TAG = f"{FUNCTIONAL}-{PSEUDOPOTENTIAL_TYPE} {ECUTWFC}-{ECUTRHO}Ry k{KGRID[0]} p{KPATH_STEPS} g{SMEARING_SETTINGS['degauss']}" SCF_UNIT = "pw_scf" NSCF_UNIT = "pw_nscf" BANDS_UNIT = "pw_bands" -N_OCCUPIED_BANDS = 8 # 16 valence electrons: C 4 + 4, B 3, N 5 +NUMBER_OF_OCCUPIED_BANDS = 8 # 16 valence electrons: C 4 + 4, B 3, N 5 -KPATH_STEPS = 40 KPATH = [ {"point": "Γ", "steps": KPATH_STEPS}, {"point": "K", "steps": KPATH_STEPS}, @@ -115,7 +107,7 @@ KPATH = [ | paper | this notebook | |---|---| | LDA | LDA | -| VASP, plane waves, 600 eV | GBRV ultrasoft, 50/400 Ry | +| VASP, plane waves, 600 eV | GBRV ultrasoft, 40/200 Ry | | 36×36×1 | 36×36×1 | | tetrahedron | Gaussian 0.001 Ry | | cell a = 2.445 Å (graphene LDA, h-BN compressed) | 2.509 Å (h-BN unstrained, graphene +1.79%) | @@ -147,19 +139,21 @@ Running the notebook again finds the seven jobs already finished by material and ## 6. Expected results -At d = 3.4 Å, Giovannetti et al. (Fig. 4) give gaps at K of AA ≈ 80 meV, AB ≈ 45 meV, BA ≈ 30 meV (±5 meV read off the axis), and Fig. 2 gives the energy ordering E(BA) < E(AB) < E(AA), with Fig. 2 read at 3.4 Å as BA ≈ −0.055, AB ≈ −0.045, AA ≈ −0.035 eV per cell. +![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; a = AA, b = AB, c = BA)") + +At d = 3.4 Å, Giovannetti et al. (Fig. 4) give gaps at K of AA ≈ 80 and BA ≈ 30 meV read off Fig. 4 (±5 meV), AB = 46 meV, the paper's value at its 3.40 Å equilibrium, and Fig. 2 gives the energy ordering E(BA) < E(AB) < E(AA), with Fig. 2 read at 3.4 Å as BA ≈ −0.055, AB ≈ −0.045, AA ≈ −0.035 eV per cell. -| shift | stacking | ΔE (meV) | gap (meV) | paper gap (meV) | +| shift | stacking | ΔE vs 0of6 (meV) | gap (meV) | paper gap (meV) | |---|---|---|---|---| | 0 | BA | TODO(live run) | TODO(live run) | 30 | | 1 | bridge | TODO(live run) | TODO(live run) | | | 2 | AA | TODO(live run) | TODO(live run) | 80 | | 3 | bridge | TODO(live run) | TODO(live run) | | -| 4 | AB | TODO(live run) | TODO(live run) | 45 | +| 4 | AB | TODO(live run) | TODO(live run) | 46 | | 5 | bridge | TODO(live run) | TODO(live run) | | | 6 | BA | TODO(live run) | TODO(live run) | 30 | -At its own equilibrium distances the paper reports larger gaps, quoted here for reference and not compared: AA 56 meV at 3.50 Å, AB 46 meV at 3.40 Å, BA 53 meV at 3.22 Å. +The paper's gaps at its own equilibrium distances are AA 56 meV at 3.50 Å, AB 46 meV at 3.40 Å and BA 53 meV at 3.22 Å. The notebook's final cell prints four clauses and a verdict: @@ -167,7 +161,7 @@ The notebook's final cell prints four clauses and a verdict: E(BA) < E(AB) < E(AA): {energy_ordering} Minimum at BA, maximum at AA: {energy_extrema} Gap AA > AB > BA: {gap_ordering} -Each gap within 15 meV of Fig. 4: {gaps_within_tolerance} +Each gap within 15 meV of the paper: {gaps_within_tolerance} ``` ``` @@ -176,7 +170,7 @@ Reproduces Giovannetti et al. (2007): yes|no ## 7. Customization options -`KGRID` and `KPATH_STEPS` control the k-point sampling of the SCF/NSCF grid and the band-structure path; `ECUTWFC` (with `ECUTRHO` at 8×) controls the plane-wave cutoff; `SMEARING_SETTINGS["degauss"]` controls the Gaussian smearing width. `MODEL_TAG` is built from these and is part of every workflow's name, so changing any of them creates new jobs rather than reusing the ones already run. +`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; `SMEARING_SETTINGS["degauss"]` controls the Gaussian smearing width. `MODEL_TAG` is built from these and is part of every workflow's name, so changing any of them creates new jobs rather than reusing the ones already run. To add a material, add a name to `MATERIALS` with its shift index and stacking label (`"AA"`, `"AB"`, `"BA"` or `None` for a bridge point); the name must match one saved by the structure notebook. @@ -196,7 +190,7 @@ If a printed gap is around 1 eV or larger, the provenance line's `gamma` is not ### 8.4. Provenance print fails -The provenance print in cell 3.1 depends on labels that are not stored when a material is saved to the platform. Run the structure notebook so that the materials exist in `uploads/` rather than being loaded from the platform. +`ValueError: zero-size array to reduction operation` in cell 3.1 means the material came from the platform rather than from `uploads/`, so the labels the provenance print depends on are not stored. Run the structure notebook so that the materials exist in `uploads/` rather than being loaded from the platform. ## 9. Interactive JupyterLite notebook 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 7b5030481..8aa55df00 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 @@ -141,6 +141,22 @@ To shift graphene layer along the y-axis, the user can modify the last cell in t As mentioned in the publication, the vector to slide the layers between AA, AB and BA configurations is `a/sqrt(3)`. The notebook builds seven interfaces at half-steps of this vector, with `n` running from `2` to `8`. +The parameters cell sets the names used by the loop below and by the simulation notebook: + +```python +# One name per shift (n = 2..8); the three symmetric registries carry their Jung 2015 / Giovannetti 2007 label, +# n = 8 repeats n = 2 one period later. +INTERFACE_NAMES = [ + "Gr/hBN d3.4 shift 0of6 BA", + "Gr/hBN d3.4 shift 1of6", + "Gr/hBN d3.4 shift 2of6 AA", + "Gr/hBN d3.4 shift 3of6", + "Gr/hBN d3.4 shift 4of6 AB", + "Gr/hBN d3.4 shift 5of6", + "Gr/hBN d3.4 shift 6of6 BA", +] +``` + The loop below builds the seven interfaces and names them from `INTERFACE_NAMES`, using the `interface_displace_part()` function from the `mat3ra.made.tools.modify` module. ```python 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;" } From 07ba2d96891ba7f9d4a32d0ebc0652e814421da6 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Mon, 5 Oct 2026 15:56:24 -0700 Subject: [PATCH 05/18] SOF-8064: gap tolerance relative on the page Co-Authored-By: Claude Sonnet 5.5 --- .../interface-2d-2d-graphene-boron-nitride-simulation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index 39dc18ab7..f16a7586c 100644 --- 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 @@ -161,7 +161,7 @@ The notebook's final cell prints four clauses and a verdict: E(BA) < E(AB) < E(AA): {energy_ordering} Minimum at BA, maximum at AA: {energy_extrema} Gap AA > AB > BA: {gap_ordering} -Each gap within 15 meV of the paper: {gaps_within_tolerance} +Each gap within 15 % of the paper's: {gaps_within_tolerance} ``` ``` From d1c8a28e48b44c05260ac4d21420e74c21804834 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Mon, 5 Oct 2026 17:04:22 -0700 Subject: [PATCH 06/18] =?UTF-8?q?SOF-8064:=20page=20=E2=80=94=20the=20comp?= =?UTF-8?q?arison=20table,=20no=20verdict?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- ...2d-2d-graphene-boron-nitride-simulation.md | 31 ++++++------------- 1 file changed, 10 insertions(+), 21 deletions(-) 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 index f16a7586c..67a8dc1dc 100644 --- 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 @@ -143,30 +143,19 @@ Running the notebook again finds the seven jobs already finished by material and At d = 3.4 Å, Giovannetti et al. (Fig. 4) give gaps at K of AA ≈ 80 and BA ≈ 30 meV read off Fig. 4 (±5 meV), AB = 46 meV, the paper's value at its 3.40 Å equilibrium, and Fig. 2 gives the energy ordering E(BA) < E(AB) < E(AA), with Fig. 2 read at 3.4 Å as BA ≈ −0.055, AB ≈ −0.045, AA ≈ −0.035 eV per cell. -| shift | stacking | ΔE vs 0of6 (meV) | gap (meV) | paper gap (meV) | -|---|---|---|---|---| -| 0 | BA | TODO(live run) | TODO(live run) | 30 | -| 1 | bridge | TODO(live run) | TODO(live run) | | -| 2 | AA | TODO(live run) | TODO(live run) | 80 | -| 3 | bridge | TODO(live run) | TODO(live run) | | -| 4 | AB | TODO(live run) | TODO(live run) | 46 | -| 5 | bridge | TODO(live run) | TODO(live run) | | -| 6 | BA | TODO(live run) | TODO(live run) | 30 | +| shift | stacking | ΔE vs 0of6 (meV) | gap (meV) | paper gap (meV) | deviation | +|---|---|---|---|---|---| +| 0 | BA | TODO(live run) | TODO(live run) | 30 | TODO(live run) | +| 1 | bridge | TODO(live run) | TODO(live run) | | | +| 2 | AA | TODO(live run) | TODO(live run) | 80 | TODO(live run) | +| 3 | bridge | TODO(live run) | TODO(live run) | | | +| 4 | AB | TODO(live run) | TODO(live run) | 46 | TODO(live run) | +| 5 | bridge | TODO(live run) | TODO(live run) | | | +| 6 | BA | TODO(live run) | TODO(live run) | 30 | TODO(live run) | The paper's gaps at its own equilibrium distances are AA 56 meV at 3.50 Å, AB 46 meV at 3.40 Å and BA 53 meV at 3.22 Å. -The notebook's final cell prints four clauses and a verdict: - -``` -E(BA) < E(AB) < E(AA): {energy_ordering} -Minimum at BA, maximum at AA: {energy_extrema} -Gap AA > AB > BA: {gap_ordering} -Each gap within 15 % of the paper's: {gaps_within_tolerance} -``` - -``` -Reproduces Giovannetti et al. (2007): yes|no -``` +The notebook's final cell prints this table with the measured ΔE, gap and deviation columns, and plots ΔE and the gap along the sliding path. ## 7. Customization options From 5a7bcd1893228a5ab2251fd5081de1f3e6b0f973 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Mon, 5 Oct 2026 17:05:52 -0700 Subject: [PATCH 07/18] =?UTF-8?q?SOF-8064:=20page=20=E2=80=94=20five=20mea?= =?UTF-8?q?sured=20rows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- ...nterface-2d-2d-graphene-boron-nitride-simulation.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 index 67a8dc1dc..bd80a937c 100644 --- 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 @@ -145,11 +145,11 @@ At d = 3.4 Å, Giovannetti et al. (Fig. 4) give gaps at K of AA ≈ 80 and BA | shift | stacking | ΔE vs 0of6 (meV) | gap (meV) | paper gap (meV) | deviation | |---|---|---|---|---|---| -| 0 | BA | TODO(live run) | TODO(live run) | 30 | TODO(live run) | -| 1 | bridge | TODO(live run) | TODO(live run) | | | -| 2 | AA | TODO(live run) | TODO(live run) | 80 | TODO(live run) | -| 3 | bridge | TODO(live run) | TODO(live run) | | | -| 4 | AB | TODO(live run) | TODO(live run) | 46 | TODO(live run) | +| 0 | BA | 0.0 | 33.1 | 30 | +10 % | +| 1 | bridge | +11.1 | 65.5 | | | +| 2 | AA | +21.2 | 94.1 | 80 | +18 % | +| 3 | bridge | +16.7 | 77.8 | | | +| 4 | AB | +16.4 | 54.9 | 46 | +19 % | | 5 | bridge | TODO(live run) | TODO(live run) | | | | 6 | BA | TODO(live run) | TODO(live run) | 30 | TODO(live run) | From 2aafd47e06a8e028b559fb32c78a7ea16a48b65b Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Mon, 5 Oct 2026 19:10:14 -0700 Subject: [PATCH 08/18] =?UTF-8?q?SOF-8064:=20page=20=E2=80=94=20queue=20D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- .../interface-2d-2d-graphene-boron-nitride-simulation.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 index bd80a937c..68f1d4d0d 100644 --- 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 @@ -69,9 +69,9 @@ 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.OR -PPN = 16 # queue OR on cluster-001 allows at most 16 cores per node -TIME_LIMIT = "02:00:00" +QUEUE_NAME = QueueName.D +PPN = 1 +TIME_LIMIT = "01:00:00" timestamp = datetime.now().strftime("%Y-%m-%d %H:%M") POLL_INTERVAL = 60 # seconds @@ -131,7 +131,7 @@ In cell 1.2, set `ORGANIZATION_NAME` and `CLUSTER_NAME` to the account's organiz ### 5.3. Run the notebook -Select *Run* > *Run All*. The notebook [authenticates with the platform]({{ interface_url }}/jupyterlite/authentication.md), loads the seven materials and prints their provenance, saves them to the platform, configures one workflow per material, creates the compute configuration, then submits the seven jobs one at a time. Each job blocks the notebook until it finishes, a few minutes for a four-atom cell. Once all seven have finished, the notebook retrieves the band structures, total energies and gaps at K, and prints the comparison table. +Select *Run* > *Run All*. The notebook [authenticates with the platform]({{ interface_url }}/jupyterlite/authentication.md), loads the seven materials and prints their provenance, saves them to the platform, configures one workflow per material, creates the compute configuration, then submits the seven jobs one at a time. Each job blocks the notebook until it finishes, about 2 minutes for a four-atom cell, run on queue D with one core. Once all seven have finished, the notebook retrieves the band structures, total energies and gaps at K, and prints the comparison table. ### 5.4. Re-run the notebook From 7f46bf020404f26e2cb29c9eec61d3a573e1f27d Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Mon, 5 Oct 2026 19:28:58 -0700 Subject: [PATCH 09/18] =?UTF-8?q?SOF-8064:=20page=20=E2=80=94=20all=20seve?= =?UTF-8?q?n=20stackings=20measured,=20plots=20from=20the=20run?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- .../energy-along-sliding-path.webp | 3 +++ .../gap-along-sliding-path.webp | 3 +++ ...nterface-2d-2d-graphene-boron-nitride-simulation.md | 10 ++++++++-- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/energy-along-sliding-path.webp create mode 100644 images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/gap-along-sliding-path.webp diff --git a/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/energy-along-sliding-path.webp b/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/energy-along-sliding-path.webp new file mode 100644 index 000000000..3972c9d03 --- /dev/null +++ b/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/energy-along-sliding-path.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0838142dec4def5ab115e39919b4c8a9523cebec28a44e08e74501ac50ec62d8 +size 14206 diff --git a/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/gap-along-sliding-path.webp b/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/gap-along-sliding-path.webp new file mode 100644 index 000000000..ae73ecd2a --- /dev/null +++ b/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/gap-along-sliding-path.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:82222933696918814dd7ab81ec26d3c344de3e8353562223a918d8bb7424b864 +size 15226 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 index 68f1d4d0d..605cf80d0 100644 --- 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 @@ -150,8 +150,14 @@ At d = 3.4 Å, Giovannetti et al. (Fig. 4) give gaps at K of AA ≈ 80 and BA | 2 | AA | +21.2 | 94.1 | 80 | +18 % | | 3 | bridge | +16.7 | 77.8 | | | | 4 | AB | +16.4 | 54.9 | 46 | +19 % | -| 5 | bridge | TODO(live run) | TODO(live run) | | | -| 6 | BA | TODO(live run) | TODO(live run) | 30 | TODO(live run) | +| 5 | bridge | +9.6 | 33.3 | | | +| 6 | BA | −0.0 | 33.1 | 30 | +10 % | + +Shift 6 is the same structure as shift 0 one period later and reproduces it to 1 μeV in energy and in gap. + +![Total energy along the sliding path (this notebook)](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/energy-along-sliding-path.webp "Total energy along the sliding path (this notebook)") + +![Direct gap along the sliding path (this notebook)](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/gap-along-sliding-path.webp "Direct gap along the sliding path (this notebook)") The paper's gaps at its own equilibrium distances are AA 56 meV at 3.50 Å, AB 46 meV at 3.40 Å and BA 53 meV at 3.22 Å. From db8bbf4c4377835dcf8944e663a40e1725ecb1d7 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Mon, 5 Oct 2026 19:39:42 -0700 Subject: [PATCH 10/18] =?UTF-8?q?SOF-8064:=20page=20=E2=80=94=20figures=20?= =?UTF-8?q?for=20the=20structure=20and=20the=20reproduced=20result,=20one?= =?UTF-8?q?=20Troubleshooting=20entry,=20no=20cluster=20talk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- ...ovannetti2007-fig2-energy-vs-distance.webp | 3 +++ .../jung2015-fig7a-sliding-energy.webp | 3 +++ ...2d-2d-graphene-boron-nitride-simulation.md | 22 ++++++------------- 3 files changed, 13 insertions(+), 15 deletions(-) create mode 100644 images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/giovannetti2007-fig2-energy-vs-distance.webp create mode 100644 images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/jung2015-fig7a-sliding-energy.webp 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..a6d6e71fd --- /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:56ce7e30739e22fa7c902f7f9678e14674d516e13ff9bb308b76888ce1d79953 +size 22222 diff --git a/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/jung2015-fig7a-sliding-energy.webp b/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/jung2015-fig7a-sliding-energy.webp new file mode 100644 index 000000000..8374f4443 --- /dev/null +++ b/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/jung2015-fig7a-sliding-energy.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f150686e7b8ed074a001bdb9cb8583c0b20b82ee397f525c284f26e961792b59 +size 21862 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 index 605cf80d0..554b42922 100644 --- 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 @@ -26,14 +26,16 @@ This tutorial calculates the total energy and band structure of the seven stacki Physical Review B 76, 073103 (2007) [DOI: 10.1103/PhysRevB.76.073103](https://doi.org/10.1103/PhysRevB.76.073103){:target='_blank'} [@Giovannetti2007] -Jung et al. (2015) model the same system; its Fig. 7(a) is an RPA-parameterised curve, not an independent DFT calculation, so the DFT numbers reproduced here are Giovannetti's [@Jung2015]. +The seven stackings follow the sliding path of Fig. 7(a) in Jung et al. (2015) [@Jung2015]; the energies and band gaps compared are from Giovannetti et al. (2007), Fig. 2 and Fig. 4. + +![The seven Gr/h-BN stackings](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/5-jl-result-preview.webp "The seven Gr/h-BN stackings along the sliding path, as built by the structure notebook") + +![Sliding energy, Jung et al. 2015](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/jung2015-fig7a-sliding-energy.webp "Total energy along the sliding path (Jung et al. 2015, Fig. 7(a)); the G/BN curve is the one reproduced") ## 2. Prerequisites Run the [structure creation tutorial](interface-2d-2d-graphene-boron-nitride.md) first. Its `interface_2d_2d_boron_nitride_graphene.ipynb` notebook names the seven stacking configurations (listed on that page) that this notebook loads. -An account with a cluster is also required. - ## 3. Workflow overview The notebook runs the Standata `band_structure_dos.json` workflow, which chains `pw_scf` (total energy), `pw_bands` (band structure), `pw_nscf` and `projwfc` (density of states, left on the job and not plotted). @@ -139,6 +141,8 @@ Running the notebook again finds the seven jobs already finished by material and ## 6. Expected results +![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; a = AA, b = AB, c = BA)") + ![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; a = AA, b = AB, c = BA)") At d = 3.4 Å, Giovannetti et al. (Fig. 4) give gaps at K of AA ≈ 80 and BA ≈ 30 meV read off Fig. 4 (±5 meV), AB = 46 meV, the paper's value at its 3.40 Å equilibrium, and Fig. 2 gives the energy ordering E(BA) < E(AB) < E(AA), with Fig. 2 read at 3.4 Å as BA ≈ −0.055, AB ≈ −0.045, AA ≈ −0.035 eV per cell. @@ -175,18 +179,6 @@ To add a material, add a name to `MATERIALS` with its shift index and stacking l `ValueError: No material named …` means the structure notebook has not been run, or the name in `MATERIALS` does not match. Run the [structure tutorial](interface-2d-2d-graphene-boron-nitride.md) first; the names must match cell 1.2 exactly. -### 8.2. Cluster not found - -`Cluster '001' not found` means no cluster matching `CLUSTER_NAME` is registered on the account. Register a cluster, or set `CLUSTER_NAME` to one that is. - -### 8.3. Gap near 1 eV - -If a printed gap is around 1 eV or larger, the provenance line's `gamma` is not 120.000°. The structure notebook's cell 3.5 re-setting of the cell to the hexagonal setting did not run. - -### 8.4. Provenance print fails - -`ValueError: zero-size array to reduction operation` in cell 3.1 means the material came from the platform rather than from `uploads/`, so the labels the provenance print depends on are not stored. Run the structure notebook so that the materials exist in `uploads/` rather than being loaded from the platform. - ## 9. Interactive JupyterLite notebook {% with origin_url=config.extra.jupyterlite.origin_url_lab %} From a582e3193cc6aaec7424a34a22ab1f7f220fb1af Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Mon, 5 Oct 2026 21:33:40 -0700 Subject: [PATCH 11/18] =?UTF-8?q?SOF-8064:=20page=20=E2=80=94=20Giovannett?= =?UTF-8?q?i=20figures=20complete,=20Jung=20figure=20removed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- .../giovannetti2007-fig2-energy-vs-distance.webp | 4 ++-- .../giovannetti2007-fig4-gap-vs-distance.webp | 4 ++-- .../jung2015-fig7a-sliding-energy.webp | 3 --- .../interface-2d-2d-graphene-boron-nitride-simulation.md | 2 -- 4 files changed, 4 insertions(+), 9 deletions(-) delete mode 100644 images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/jung2015-fig7a-sliding-energy.webp 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 index a6d6e71fd..e448b7dab 100644 --- 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 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:56ce7e30739e22fa7c902f7f9678e14674d516e13ff9bb308b76888ce1d79953 -size 22222 +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 index f98a1a601..2f46f2895 100644 --- 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 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d4bbc0fdf424791196831b09bd91c5973a1315ee13ed32c0d0f4cc773647b96 -size 23758 +oid sha256:bf3765795a4f83e762281ca16ad304dffef894237a4bc8a1a9f722b7c406392c +size 25046 diff --git a/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/jung2015-fig7a-sliding-energy.webp b/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/jung2015-fig7a-sliding-energy.webp deleted file mode 100644 index 8374f4443..000000000 --- a/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/jung2015-fig7a-sliding-energy.webp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f150686e7b8ed074a001bdb9cb8583c0b20b82ee397f525c284f26e961792b59 -size 21862 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 index 554b42922..59e1974ac 100644 --- 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 @@ -30,8 +30,6 @@ The seven stackings follow the sliding path of Fig. 7(a) in Jung et al. (2015) [ ![The seven Gr/h-BN stackings](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/5-jl-result-preview.webp "The seven Gr/h-BN stackings along the sliding path, as built by the structure notebook") -![Sliding energy, Jung et al. 2015](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/jung2015-fig7a-sliding-energy.webp "Total energy along the sliding path (Jung et al. 2015, Fig. 7(a)); the G/BN curve is the one reproduced") - ## 2. Prerequisites Run the [structure creation tutorial](interface-2d-2d-graphene-boron-nitride.md) first. Its `interface_2d_2d_boron_nitride_graphene.ipynb` notebook names the seven stacking configurations (listed on that page) that this notebook loads. From faf61825367b7a96efe3d342e14b53a974c4f72e Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Tue, 6 Oct 2026 15:09:01 -0700 Subject: [PATCH 12/18] =?UTF-8?q?SOF-8064:=20page=20=E2=80=94=20the=20pape?= =?UTF-8?q?r's=20figures=20in=20the=20introduction,=20ours=20with=20the=20?= =?UTF-8?q?results?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- ...face-2d-2d-graphene-boron-nitride-simulation.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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 index 59e1974ac..f79c2ef0e 100644 --- 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 @@ -26,9 +26,13 @@ This tutorial calculates the total energy and band structure of the seven stacki Physical Review B 76, 073103 (2007) [DOI: 10.1103/PhysRevB.76.073103](https://doi.org/10.1103/PhysRevB.76.073103){:target='_blank'} [@Giovannetti2007] -The seven stackings follow the sliding path of Fig. 7(a) in Jung et al. (2015) [@Jung2015]; the energies and band gaps compared are from Giovannetti et al. (2007), Fig. 2 and Fig. 4. +The seven stackings slide between the three configurations of Fig. 1 — (a) AA, (b) AB, (c) BA; the energies and band gaps compared are Fig. 2 and Fig. 4. -![The seven Gr/h-BN stackings](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/5-jl-result-preview.webp "The seven Gr/h-BN stackings along the sliding path, as built by the structure notebook") +![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; a = AA, b = AB, c = BA)") + +![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; a = AA, b = AB, c = BA)") ## 2. Prerequisites @@ -139,10 +143,6 @@ Running the notebook again finds the seven jobs already finished by material and ## 6. Expected results -![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; a = AA, b = AB, c = BA)") - -![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; a = AA, b = AB, c = BA)") - At d = 3.4 Å, Giovannetti et al. (Fig. 4) give gaps at K of AA ≈ 80 and BA ≈ 30 meV read off Fig. 4 (±5 meV), AB = 46 meV, the paper's value at its 3.40 Å equilibrium, and Fig. 2 gives the energy ordering E(BA) < E(AB) < E(AA), with Fig. 2 read at 3.4 Å as BA ≈ −0.055, AB ≈ −0.045, AA ≈ −0.035 eV per cell. | shift | stacking | ΔE vs 0of6 (meV) | gap (meV) | paper gap (meV) | deviation | @@ -157,6 +157,8 @@ At d = 3.4 Å, Giovannetti et al. (Fig. 4) give gaps at K of AA ≈ 80 and BA Shift 6 is the same structure as shift 0 one period later and reproduces it to 1 μeV in energy and in gap. +![The seven Gr/h-BN stackings](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/5-jl-result-preview.webp "The seven stackings as built by the structure notebook, shift 0 to 6") + ![Total energy along the sliding path (this notebook)](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/energy-along-sliding-path.webp "Total energy along the sliding path (this notebook)") ![Direct gap along the sliding path (this notebook)](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/gap-along-sliding-path.webp "Direct gap along the sliding path (this notebook)") From e4001095f241938f2abccff3880ae4255df508f6 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Tue, 6 Oct 2026 15:09:28 -0700 Subject: [PATCH 13/18] SOF-8064: add the paper's Fig. 1 image (LFS) Co-Authored-By: Claude Sonnet 5.5 --- .../giovannetti2007-fig1-stackings.webp | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/giovannetti2007-fig1-stackings.webp 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 From 883da09cd26cd576893f7c63b59265dd43457d84 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Wed, 7 Oct 2026 20:05:09 -0700 Subject: [PATCH 14/18] =?UTF-8?q?SOF-8064:=20pages=20=E2=80=94=20Giovannet?= =?UTF-8?q?ti's=20protocol:=20three=20stackings,=20distance=20scan,=20Figs?= =?UTF-8?q?.=202=E2=80=934?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- .../energy-along-sliding-path.webp | 3 - .../gap-along-sliding-path.webp | 3 - ...2d-2d-graphene-boron-nitride-simulation.md | 108 ++++---- .../interface-2d-2d-graphene-boron-nitride.md | 260 ++++++++---------- 4 files changed, 170 insertions(+), 204 deletions(-) delete mode 100644 images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/energy-along-sliding-path.webp delete mode 100644 images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/gap-along-sliding-path.webp diff --git a/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/energy-along-sliding-path.webp b/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/energy-along-sliding-path.webp deleted file mode 100644 index 3972c9d03..000000000 --- a/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/energy-along-sliding-path.webp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0838142dec4def5ab115e39919b4c8a9523cebec28a44e08e74501ac50ec62d8 -size 14206 diff --git a/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/gap-along-sliding-path.webp b/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/gap-along-sliding-path.webp deleted file mode 100644 index ae73ecd2a..000000000 --- a/images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/gap-along-sliding-path.webp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:82222933696918814dd7ab81ec26d3c344de3e8353562223a918d8bb7424b864 -size 15226 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 index f79c2ef0e..b7c351f08 100644 --- 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 @@ -18,7 +18,7 @@ render_macros: true ## 1. Introduction -This tutorial calculates the total energy and band structure of the seven stacking configurations of graphene on h-BN created in the structure tutorial, at a fixed interlayer distance of 3.4 Å, reproducing results from the following manuscript. +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** @@ -26,29 +26,25 @@ This tutorial calculates the total energy and band structure of the seven stacki Physical Review B 76, 073103 (2007) [DOI: 10.1103/PhysRevB.76.073103](https://doi.org/10.1103/PhysRevB.76.073103){:target='_blank'} [@Giovannetti2007] -The seven stackings slide between the three configurations of Fig. 1 — (a) AA, (b) AB, (c) BA; the energies and band gaps compared are Fig. 2 and Fig. 4. - ![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; a = AA, b = AB, c = BA)") +![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; a = AA, b = AB, c = BA)") +![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 names the seven stacking configurations (listed on that page) that this notebook loads. +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 Å. Uncommenting the rest of `STACKINGS` and `DISTANCES` in both notebooks builds the paper's set of 3 stackings × 15 distances. ## 3. Workflow overview -The notebook runs the Standata `band_structure_dos.json` workflow, which chains `pw_scf` (total energy), `pw_bands` (band structure), `pw_nscf` and `projwfc` (density of states, left on the job and not plotted). - -One workflow is created per material, so seven jobs run in total. The jobs run one after another: the notebook waits for each job to finish before submitting the next. Re-running the notebook finds each already-finished job by its material and workflow name and reuses it instead of resubmitting. +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). -Both sheets are held rigid at 3.4 Å; the workflow includes no relaxation step, matching the paper's own fixed-distance calculation. +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 materials, the cluster and the workflow name: +Cell 1.2 sets the stackings, the distances, the cluster and the workflow name: ```python from datetime import datetime @@ -57,16 +53,16 @@ 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" -# Names saved by the structure notebook; the symmetric stackings carry their Jung 2015 / Giovannetti 2007 label -MATERIALS = { - "Gr/hBN d3.4 shift 0of6 BA": {"shift": 0, "stacking": "BA"}, - "Gr/hBN d3.4 shift 1of6": {"shift": 1, "stacking": None}, - "Gr/hBN d3.4 shift 2of6 AA": {"shift": 2, "stacking": "AA"}, - "Gr/hBN d3.4 shift 3of6": {"shift": 3, "stacking": None}, - "Gr/hBN d3.4 shift 4of6 AB": {"shift": 4, "stacking": "AB"}, - "Gr/hBN d3.4 shift 5of6": {"shift": 5, "stacking": None}, - "Gr/hBN d3.4 shift 6of6 BA": {"shift": 6, "stacking": "BA"}, -} +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" @@ -75,7 +71,7 @@ APPLICATION_NAME = "espresso" CLUSTER_NAME = "001" # specify full or partial name i.e. "cluster-001" to select QUEUE_NAME = QueueName.D PPN = 1 -TIME_LIMIT = "01:00:00" +TIME_LIMIT = "04:00:00" timestamp = datetime.now().strftime("%Y-%m-%d %H:%M") POLL_INTERVAL = 60 # seconds @@ -87,18 +83,19 @@ Cell 1.3 sets the DFT parameters: 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 +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 -SMEARING_SETTINGS = {"degauss": 0.001} # Ry; the gaps compared are 30-80 meV -KPATH_STEPS = 40 -MODEL_TAG = f"{FUNCTIONAL}-{PSEUDOPOTENTIAL_TYPE} {ECUTWFC}-{ECUTRHO}Ry k{KGRID[0]} p{KPATH_STEPS} g{SMEARING_SETTINGS['degauss']}" +OCCUPATIONS_SETTINGS = {"occupations": "tetrahedra"} # the paper's tetrahedron method +DIPOLE_SETTINGS = {"control": {"tefield": True, "dipfield": True}, "system": {"edir": 3, "eopreg": 0.05}} +KPATH_STEPS = 100 +MODEL_TAG = f"{FUNCTIONAL}-{PSEUDOPOTENTIAL_TYPE} {ECUTWFC}-{ECUTRHO}Ry k{KGRID[0]} p{KPATH_STEPS} tetra dip" SCF_UNIT = "pw_scf" NSCF_UNIT = "pw_nscf" BANDS_UNIT = "pw_bands" -NUMBER_OF_OCCUPIED_BANDS = 8 # 16 valence electrons: C 4 + 4, B 3, N 5 +NUMBER_OF_OCCUPIED_BANDS = 20 # 40 valence electrons: C 4×2, B 3×4, N 5×4 KPATH = [ {"point": "Γ", "steps": KPATH_STEPS}, @@ -113,11 +110,12 @@ KPATH = [ | LDA | LDA | | VASP, plane waves, 600 eV | GBRV ultrasoft, 40/200 Ry | | 36×36×1 | 36×36×1 | -| tetrahedron | Gaussian 0.001 Ry | -| cell a = 2.445 Å (graphene LDA, h-BN compressed) | 2.509 Å (h-BN unstrained, graphene +1.79%) | -| 4 h-BN layers | 1 | -| dipole correction | none | -| vacuum 12–15 Å | 23.4 Å | +| tetrahedron | tetrahedron (scf, nscf) | +| dipole correction | dipole correction (`tefield`, `dipfield`, `edir = 3`) | +| 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 @@ -131,53 +129,43 @@ other/materials_designer/specific_examples/interface_2d_2d_boron_nitride_graphen ### 5.2. Configure parameters -In cell 1.2, set `ORGANIZATION_NAME` and `CLUSTER_NAME` to the account's organization and cluster. `MATERIALS` already lists the seven names the structure notebook saves; leave it unchanged unless a material was renamed. +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), loads the seven materials and prints their provenance, saves them to the platform, configures one workflow per material, creates the compute configuration, then submits the seven jobs one at a time. Each job blocks the notebook until it finishes, about 2 minutes for a four-atom cell, run on queue D with one core. Once all seven have finished, the notebook retrieves the band structures, total energies and gaps at K, and prints the comparison table. +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 a few minutes on queue D with one core, so the full set of 45 jobs runs for hours. Section 7 retrieves the total energies, gaps and plots, and section 8 prints the comparison with the paper. ### 5.4. Re-run the notebook -Running the notebook again finds the seven jobs already finished by material and workflow name and reuses them rather than resubmitting. +A re-run finds the finished jobs by material and workflow name and reuses them rather than resubmitting. ## 6. Expected results -At d = 3.4 Å, Giovannetti et al. (Fig. 4) give gaps at K of AA ≈ 80 and BA ≈ 30 meV read off Fig. 4 (±5 meV), AB = 46 meV, the paper's value at its 3.40 Å equilibrium, and Fig. 2 gives the energy ordering E(BA) < E(AB) < E(AA), with Fig. 2 read at 3.4 Å as BA ≈ −0.055, AB ≈ −0.045, AA ≈ −0.035 eV per cell. - -| shift | stacking | ΔE vs 0of6 (meV) | gap (meV) | paper gap (meV) | deviation | -|---|---|---|---|---|---| -| 0 | BA | 0.0 | 33.1 | 30 | +10 % | -| 1 | bridge | +11.1 | 65.5 | | | -| 2 | AA | +21.2 | 94.1 | 80 | +18 % | -| 3 | bridge | +16.7 | 77.8 | | | -| 4 | AB | +16.4 | 54.9 | 46 | +19 % | -| 5 | bridge | +9.6 | 33.3 | | | -| 6 | BA | −0.0 | 33.1 | 30 | +10 % | +The paper's values and the values measured by the notebook: -Shift 6 is the same structure as shift 0 one period later and reproduces it to 1 μeV in energy and in gap. +| quantity | paper | this notebook | +|---|---|---| +| equilibrium distance (a) | 3.50 Å | TODO(live run) | +| equilibrium distance (b) | 3.40 Å | TODO(live run) | +| equilibrium distance (c) | 3.22 Å | TODO(live run) | +| gap at K at the equilibrium distance (a) | 56 meV | TODO(live run) | +| gap at K at the equilibrium distance (b) | 46 meV | TODO(live run) | +| gap at K at the equilibrium distance (c) | 53 meV | TODO(live run) | +| h-BN gap at K | 4.7 eV | TODO(live run) | +| effective mass at K (c) | 4.7·10⁻³ mₑ | TODO(live run) | +| E(c) < E(b) < E(a) at every distance | yes | TODO(live run) | -![The seven Gr/h-BN stackings](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/5-jl-result-preview.webp "The seven stackings as built by the structure notebook, shift 0 to 6") - -![Total energy along the sliding path (this notebook)](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/energy-along-sliding-path.webp "Total energy along the sliding path (this notebook)") - -![Direct gap along the sliding path (this notebook)](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/gap-along-sliding-path.webp "Direct gap along the sliding path (this notebook)") - -The paper's gaps at its own equilibrium distances are AA 56 meV at 3.50 Å, AB 46 meV at 3.40 Å and BA 53 meV at 3.22 Å. - -The notebook's final cell prints this table with the measured ΔE, gap and deviation columns, and plots ΔE and the gap along the sliding path. +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 -`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; `SMEARING_SETTINGS["degauss"]` controls the Gaussian smearing width. `MODEL_TAG` is built from these and is part of every workflow's name, so changing any of them creates new jobs rather than reusing the ones already run. - -To add a material, add a name to `MATERIALS` with its shift index and stacking label (`"AA"`, `"AB"`, `"BA"` or `None` for a bridge point); the name must match one saved by the structure notebook. +`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. ## 8. Troubleshooting ### 8.1. Material not found -`ValueError: No material named …` means the structure notebook has not been run, or the name in `MATERIALS` does not match. Run the [structure tutorial](interface-2d-2d-graphene-boron-nitride.md) first; the names must match cell 1.2 exactly. +`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 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 8aa55df00..22009c5ea 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,197 +17,181 @@ 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: - -Miller indices of both materials to `(0,0,1)`, - -Thickness of both materials to `1`, - -Distance between materials to `3.4` angstroms -- mentioned in the publication. - -Default value for `MAX_AREA = 50` should be enough since materials have similar lattice constants. - - -Adjust the "1.1. Set up slab parameters" cell in the notebook according to: +Open the `interface_2d_2d_boron_nitride_graphene.ipynb` notebook. Cell 1.1 sets the parameters: ```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 +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 + +# Registry of graphene on the top h-BN layer, Giovannetti et al. 2007 Fig. 1: one C over B and the other over +# N (a), over N and a hexagon centre (b), over B and a hexagon centre (c). All three run in the paper; +# uncomment to build the others. +STACKINGS = [ + "c", + # "a", + # "b", +] +STACKING_SHIFTS = {"a": 0, "b": 1, "c": -1} # in units of a/√3 along y +# Graphene–h-BN distance, Å. The paper scans 2.5–3.9; three points around (c)'s minimum are active, uncomment +# the rest for the full set. +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, +] ``` -![Notebook setup](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/2-jl-setup-notebook.webp "Notebook setup") +`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. +![Notebook setup](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/2-jl-setup-notebook.webp "Notebook setup") -### 3.3. Run the Notebook - -After setting the parameters, run the notebook to create the interface between h-BN and Graphene. - -![Run All](../../../images/jupyterlite/run-all.webp "Run All") - -### 3.4. View Results +## 3. Create the interfaces between h-BN and graphene -The generation might take some time. -After that, the user can pass the material to the Materials Designer for further analysis. +### 3.1. Strain the materials -Interface between h-BN and Graphene with the specified parameters is shown below. +Both materials are strained in-plane to a = 2.445 Å, and h-BN along c to 3.24 Å between layers: -![Gr/h-BN Interface ](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/3-jl-result-preview.webp "Gr/h-BN Interface") +```python +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]] +) +``` -### 3.5. Set the cell to the standard hexagonal setting +### 3.2. Set the AA' stacking of h-BN -The ZSL interface cell comes out with γ = 60°, but the symbolic K point used by the simulation notebook assumes the standard 120° hexagonal cell. The cell is therefore re-set with a unimodular supercell matrix, and each shifted interface is typed `HEX`: +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: ```python -from mat3ra.made.tools.helpers import create_supercell +from mat3ra.made.tools.analyze.other import get_atom_indices_with_condition_on_coordinates +from mat3ra.made.tools.operations.core.unary import translate_atoms -interface = create_supercell(interface, supercell_matrix=[[1, 0, 0], [-1, 1, 0], [0, 0, 1]]) +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 +) ``` -### 3.6. Shift the layers to generate stacking configurations - -To shift graphene layer along the y-axis, the user can modify the last cell in the notebook to achieve different stacking configurations. - -As mentioned in the publication, the vector to slide the layers between AA, AB and BA configurations is `a/sqrt(3)`. The notebook builds seven interfaces at half-steps of this vector, with `n` running from `2` to `8`. +### 3.3. Create the slabs -The parameters cell sets the names used by the loop below and by the simulation notebook: +The h-BN slab has four layers, two per bulk cell, and the graphene slab one layer: ```python -# One name per shift (n = 2..8); the three symmetric registries carry their Jung 2015 / Giovannetti 2007 label, -# n = 8 repeats n = 2 one period later. -INTERFACE_NAMES = [ - "Gr/hBN d3.4 shift 0of6 BA", - "Gr/hBN d3.4 shift 1of6", - "Gr/hBN d3.4 shift 2of6 AA", - "Gr/hBN d3.4 shift 3of6", - "Gr/hBN d3.4 shift 4of6 AB", - "Gr/hBN d3.4 shift 5of6", - "Gr/hBN d3.4 shift 6of6 BA", -] +from mat3ra.made.tools.build.pristine_structures.two_dimensional.slab import SlabConfiguration, SlabBuilder + +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, +) + +film_slab_config = SlabConfiguration.from_parameters( + material_or_dict=film, + miller_indices=(0, 0, 1), + number_of_layers=1, + vacuum=0.0, +) + +substrate_slab = SlabBuilder().get_material(substrate_slab_config) +film_slab = SlabBuilder().get_material(film_slab_config) ``` -The loop below builds the seven interfaces and names them from `INTERFACE_NAMES`, using the `interface_displace_part()` function from the `mat3ra.made.tools.modify` module. +### 3.4. Create the interface at each distance and stacking + +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 -a = interface.lattice.a -shifted_interfaces = [] -for index, n in enumerate(range(2, 9)): - shifted_interface = interface_displace_part( - interface=interface, - displacement=[0, n * a / np.sqrt(3) / 2, 0], - use_cartesian_coordinates=True) - shifted_interface.name = INTERFACE_NAMES[index] - shifted_interface.lattice.type = "HEX" - shifted_interfaces.append(shifted_interface) - interlayer_distance = get_average_interlayer_distance( - shifted_interface, InterfacePartsEnum.SUBSTRATE.value, InterfacePartsEnum.FILM.value) - print(f"{shifted_interface.name}: {len(shifted_interface.basis.elements.ids)} atoms, " - f"gamma = {shifted_interface.lattice.gamma:.1f}°, interlayer distance = {interlayer_distance:.3f} Å") + +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") + +### 3.5. Run the notebook -Preview of interfaces with different stacking configurations is shown below. +Select *Run* > *Run All*. -![Shifted Interfaces](../../../images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/5-jl-result-preview.webp "Shifted Interfaces") +![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. - -The shift loop names the seven interfaces as follows, and the simulation notebook loads materials by these exact names: - -- `Gr/hBN d3.4 shift 0of6 BA` -- `Gr/hBN d3.4 shift 1of6` -- `Gr/hBN d3.4 shift 2of6 AA` -- `Gr/hBN d3.4 shift 3of6` -- `Gr/hBN d3.4 shift 4of6 AB` -- `Gr/hBN d3.4 shift 5of6` -- `Gr/hBN d3.4 shift 6of6 BA` - -Three of the seven are the symmetric stackings: AA (carbon over both boron and nitrogen), AB (carbon over nitrogen and over a hexagon centre) and BA (carbon over boron and over a hexagon centre); `0of6` and `6of6` are both BA, the same structure one period apart. +Or the user can [save or download]({{ interface_url }}/materials-designer/header-menu/input-output/) the materials in Material JSON format or POSCAR format. -Once the structures exist, the [simulation tutorial](interface-2d-2d-graphene-boron-nitride-simulation.md) loads them by name and reproduces the manuscript's stacking energies and band gaps. +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 From bd46ca460c42e9ba921854dff936a9f0cfc4fc7b Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Wed, 7 Oct 2026 20:50:17 -0700 Subject: [PATCH 15/18] =?UTF-8?q?SOF-8064:=20page=20=E2=80=94=20re-quote?= =?UTF-8?q?=20the=20parameter=20cells=20(eamp=200,=20PPN=202)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- ...ce-2d-2d-graphene-boron-nitride-simulation.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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 index b7c351f08..03914e1d7 100644 --- 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 @@ -70,7 +70,7 @@ APPLICATION_NAME = "espresso" CLUSTER_NAME = "001" # specify full or partial name i.e. "cluster-001" to select QUEUE_NAME = QueueName.D -PPN = 1 +PPN = 2 TIME_LIMIT = "04:00:00" timestamp = datetime.now().strftime("%Y-%m-%d %H:%M") @@ -88,9 +88,11 @@ 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 -DIPOLE_SETTINGS = {"control": {"tefield": True, "dipfield": True}, "system": {"edir": 3, "eopreg": 0.05}} +# 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} tetra dip" +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" @@ -103,6 +105,10 @@ KPATH = [ {"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 | @@ -111,7 +117,7 @@ KPATH = [ | 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`) | +| 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 Å | @@ -133,7 +139,7 @@ In cell 1.2, set `ORGANIZATION_NAME` to the account's organization, and `STACKIN ### 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 a few minutes on queue D with one core, so the full set of 45 jobs runs for hours. Section 7 retrieves the total energies, gaps and plots, and section 8 prints the comparison with the paper. +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 From bb5162f081223cd16015bd942532d18e6db846f3 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Wed, 7 Oct 2026 22:55:37 -0700 Subject: [PATCH 16/18] =?UTF-8?q?SOF-8064:=20page=20=E2=80=94=20stacking?= =?UTF-8?q?=20(c)=20measured?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- ...2d-2d-graphene-boron-nitride-simulation.md | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) 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 index 03914e1d7..c4d320184 100644 --- 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 @@ -149,17 +149,19 @@ A re-run finds the finished jobs by material and workflow name and reuses them r The paper's values and the values measured by the notebook: -| quantity | paper | this notebook | -|---|---|---| -| equilibrium distance (a) | 3.50 Å | TODO(live run) | -| equilibrium distance (b) | 3.40 Å | TODO(live run) | -| equilibrium distance (c) | 3.22 Å | TODO(live run) | -| gap at K at the equilibrium distance (a) | 56 meV | TODO(live run) | -| gap at K at the equilibrium distance (b) | 46 meV | TODO(live run) | -| gap at K at the equilibrium distance (c) | 53 meV | TODO(live run) | -| h-BN gap at K | 4.7 eV | TODO(live run) | -| effective mass at K (c) | 4.7·10⁻³ mₑ | TODO(live run) | -| E(c) < E(b) < E(a) at every distance | yes | TODO(live run) | +| quantity | paper | this notebook | deviation | +|---|---|---|---| +| equilibrium distance (a) | 3.50 Å | TODO(live run) | | +| equilibrium distance (b) | 3.40 Å | TODO(live run) | | +| equilibrium distance (c) | 3.22 Å | 3.232 Å | +0.4 % | +| gap at K at the equilibrium distance (a) | 56 meV | TODO(live run) | | +| gap at K at the equilibrium distance (b) | 46 meV | TODO(live run) | | +| 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 | TODO(live run) | | + +Gap at K at 3.1 / 3.2 / 3.3 Å: 75.2 / 55.0 / 39.8 meV (Fig. 4, curve (c)). 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). From 3dfc52bd47ac4a2fab352a70ae53de3a29bdb791 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Wed, 7 Oct 2026 23:56:35 -0700 Subject: [PATCH 17/18] =?UTF-8?q?SOF-8064:=20page=20=E2=80=94=20the=20defa?= =?UTF-8?q?ult=20run's=20figures;=20the=20rest=20of=20the=20paper's=20set?= =?UTF-8?q?=20by=20uncommenting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- .../bands-around-K.webp | 3 +++ .../fig2-energy-vs-distance.webp | 3 +++ .../fig4-gap-vs-distance.webp | 3 +++ ...2d-2d-graphene-boron-nitride-simulation.md | 20 +++++++++++++------ 4 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/bands-around-K.webp create mode 100644 images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/fig2-energy-vs-distance.webp create mode 100644 images/tutorials/materials/interfaces/interface_2d_2d_graphene_boron_nitride/fig4-gap-vs-distance.webp 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/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 index c4d320184..ca9d5ecb8 100644 --- 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 @@ -34,7 +34,7 @@ This tutorial calculates the total energy and band structure of graphene on four ## 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 Å. Uncommenting the rest of `STACKINGS` and `DISTANCES` in both notebooks builds the paper's set of 3 stackings × 15 distances. +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 @@ -151,24 +151,32 @@ The paper's values and the values measured by the notebook: | quantity | paper | this notebook | deviation | |---|---|---|---| -| equilibrium distance (a) | 3.50 Å | TODO(live run) | | -| equilibrium distance (b) | 3.40 Å | TODO(live run) | | +| 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 | TODO(live run) | | -| gap at K at the equilibrium distance (b) | 46 meV | TODO(live run) | | +| 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 | TODO(live run) | | +| 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 From 5b207b64d861c854b2e7afeb74d9ce97d4a813ee Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Wed, 7 Oct 2026 23:58:21 -0700 Subject: [PATCH 18/18] =?UTF-8?q?SOF-8064:=20pages=20=E2=80=94=20re-quote?= =?UTF-8?q?=20the=20parameter=20cells?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- ...terface-2d-2d-graphene-boron-nitride-simulation.md | 3 +++ .../interface-2d-2d-graphene-boron-nitride.md | 11 +++++------ 2 files changed, 8 insertions(+), 6 deletions(-) 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 index ca9d5ecb8..fd6b25e2b 100644 --- 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 @@ -53,6 +53,9 @@ 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", 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 22009c5ea..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 @@ -49,21 +49,20 @@ H_BN_LAYERS = 4 H_BN_INTERLAYER_DISTANCE = 3.24 # Å, the paper's LDA value VACUUM = 15.0 # Å above graphene -# Registry of graphene on the top h-BN layer, Giovannetti et al. 2007 Fig. 1: one C over B and the other over -# N (a), over N and a hexagon centre (b), over B and a hexagon centre (c). All three run in the paper; -# uncomment to build the others. +# 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", ] -STACKING_SHIFTS = {"a": 0, "b": 1, "c": -1} # in units of a/√3 along y -# Graphene–h-BN distance, Å. The paper scans 2.5–3.9; three points around (c)'s minimum are active, uncomment -# the rest for the full set. 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 ``` `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.