From e2b0ebc3f5e272dd59c821ffc6ade5c6b3a3a3f6 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Mon, 26 Oct 2026 15:38:04 -0700 Subject: [PATCH 1/2] SOF-8075: review (TB) - a description above every code cell Structure notebook: section 3 split into 3.1 (formula of a plane) and 3.2 (cleaved slab per orientation, with the even-planes sentence moved there); section 4 into 4.1 (cut and remove) and 4.2 (report). Simulation notebook: a sentence above the account selection; section 6 split into 6.1 (find or create a job), 6.2 (one Total Energy job per material) and 6.3 (submit and wait). Markdown only. Co-Authored-By: Claude Opus 5.5 --- .../slab_strontium_titanate.ipynb | 34 +++++--- .../slab_strontium_titanate_SIMULATION.ipynb | 85 ++++++++++++------- 2 files changed, 80 insertions(+), 39 deletions(-) diff --git a/other/materials_designer/specific_examples/slab_strontium_titanate.ipynb b/other/materials_designer/specific_examples/slab_strontium_titanate.ipynb index b535b478e..63897ddf8 100644 --- a/other/materials_designer/specific_examples/slab_strontium_titanate.ipynb +++ b/other/materials_designer/specific_examples/slab_strontium_titanate.ipynb @@ -156,8 +156,9 @@ "metadata": {}, "source": [ "## 3. Create the cleaved slabs\n", + "### 3.1. Formula of a plane\n", "\n", - "A slab of whole unit cells holds an even number of planes, alternating SrTiO and O2 on (011) and SrO and TiO2 on (001), so its two faces differ." + "A plane's formula reads like made's termination labels, such as SrTiO and O2." ] }, { @@ -179,10 +180,20 @@ " return \"\".join(f\"{element}{count if count > 1 else ''}\" for element, count in counts.items())" ] }, + { + "cell_type": "markdown", + "id": "13", + "metadata": {}, + "source": [ + "### 3.2. Create a cleaved slab per orientation\n", + "\n", + "A slab of whole unit cells holds an even number of planes, alternating SrTiO and O2 on (011) and SrO and TiO2 on (001), so its two faces differ." + ] + }, { "cell_type": "code", "execution_count": null, - "id": "13", + "id": "14", "metadata": {}, "outputs": [], "source": [ @@ -206,10 +217,11 @@ }, { "cell_type": "markdown", - "id": "14", + "id": "15", "metadata": {}, "source": [ "## 4. Cut the seven-plane slabs and remove atoms from each surface\n", + "### 4.1. Cut the slabs and remove atoms\n", "\n", "Each slab keeps `NUMBER_OF_PLANES` consecutive planes with the given formula at both ends. A nonpolar termination removes its atoms at the same in-plane site on both surfaces." ] @@ -217,7 +229,7 @@ { "cell_type": "code", "execution_count": null, - "id": "15", + "id": "16", "metadata": {}, "outputs": [], "source": [ @@ -251,16 +263,18 @@ }, { "cell_type": "markdown", - "id": "16", + "id": "17", "metadata": {}, "source": [ + "### 4.2. Report the slabs\n", + "\n", "Each slab is printed with its formula, atom count, nominal charge, face equivalence, vacuum and planes from bottom to top. The nominal charge (Sr +2, Ti +4, O -2) shows why the manuscript removes atoms from the cleaved (011) slabs: they carry ±4 e, the nonpolar ones none." ] }, { "cell_type": "code", "execution_count": null, - "id": "17", + "id": "18", "metadata": {}, "outputs": [], "source": [ @@ -286,7 +300,7 @@ }, { "cell_type": "markdown", - "id": "18", + "id": "19", "metadata": {}, "source": [ "## 5. Visualize the slabs" @@ -295,7 +309,7 @@ { "cell_type": "code", "execution_count": null, - "id": "19", + "id": "20", "metadata": {}, "outputs": [], "source": [ @@ -304,7 +318,7 @@ }, { "cell_type": "markdown", - "id": "20", + "id": "21", "metadata": {}, "source": [ "## 6. Download materials" @@ -313,7 +327,7 @@ { "cell_type": "code", "execution_count": null, - "id": "21", + "id": "22", "metadata": {}, "outputs": [], "source": [ diff --git a/other/materials_designer/specific_examples/slab_strontium_titanate_SIMULATION.ipynb b/other/materials_designer/specific_examples/slab_strontium_titanate_SIMULATION.ipynb index de9f72aea..7329687fe 100644 --- a/other/materials_designer/specific_examples/slab_strontium_titanate_SIMULATION.ipynb +++ b/other/materials_designer/specific_examples/slab_strontium_titanate_SIMULATION.ipynb @@ -212,10 +212,18 @@ "client.list_accounts()\n" ] }, + { + "cell_type": "markdown", + "id": "15", + "metadata": {}, + "source": [ + "The account is your own, or the organization named in `ORGANIZATION_NAME` when it is set." + ] + }, { "cell_type": "code", "execution_count": null, - "id": "15", + "id": "16", "metadata": {}, "outputs": [], "source": [ @@ -230,7 +238,7 @@ }, { "cell_type": "markdown", - "id": "16", + "id": "17", "metadata": {}, "source": [ "### 2.4. Select project" @@ -239,7 +247,7 @@ { "cell_type": "code", "execution_count": null, - "id": "17", + "id": "18", "metadata": {}, "outputs": [], "source": [ @@ -250,7 +258,7 @@ }, { "cell_type": "markdown", - "id": "18", + "id": "19", "metadata": {}, "source": [ "## 3. Load the materials\n", @@ -260,7 +268,7 @@ { "cell_type": "code", "execution_count": null, - "id": "19", + "id": "20", "metadata": {}, "outputs": [], "source": [ @@ -278,7 +286,7 @@ }, { "cell_type": "markdown", - "id": "20", + "id": "21", "metadata": {}, "source": [ "### 3.2. Save the materials to the platform" @@ -287,7 +295,7 @@ { "cell_type": "code", "execution_count": null, - "id": "21", + "id": "22", "metadata": {}, "outputs": [], "source": [ @@ -299,7 +307,7 @@ }, { "cell_type": "markdown", - "id": "22", + "id": "23", "metadata": {}, "source": [ "## 4. Configure the shared DFT model and k-grid\n", @@ -309,7 +317,7 @@ { "cell_type": "code", "execution_count": null, - "id": "23", + "id": "24", "metadata": {}, "outputs": [], "source": [ @@ -329,7 +337,7 @@ }, { "cell_type": "markdown", - "id": "24", + "id": "25", "metadata": {}, "source": [ "### 4.2. k-grid per material" @@ -338,7 +346,7 @@ { "cell_type": "code", "execution_count": null, - "id": "25", + "id": "26", "metadata": {}, "outputs": [], "source": [ @@ -352,7 +360,7 @@ }, { "cell_type": "markdown", - "id": "26", + "id": "27", "metadata": {}, "source": [ "## 5. Create the compute configuration\n", @@ -362,7 +370,7 @@ { "cell_type": "code", "execution_count": null, - "id": "27", + "id": "28", "metadata": {}, "outputs": [], "source": [ @@ -372,7 +380,7 @@ }, { "cell_type": "markdown", - "id": "28", + "id": "29", "metadata": {}, "source": [ "### 5.2. Create the compute configuration for the jobs" @@ -381,7 +389,7 @@ { "cell_type": "code", "execution_count": null, - "id": "29", + "id": "30", "metadata": {}, "outputs": [], "source": [ @@ -401,16 +409,19 @@ }, { "cell_type": "markdown", - "id": "30", + "id": "31", "metadata": {}, "source": [ - "## 6. Total energy of every cell as cut" + "## 6. Total energy of every cell as cut\n", + "### 6.1. Find or create a job\n", + "\n", + "A job is reused when the material has one in progress or finished under the same workflow name." ] }, { "cell_type": "code", "execution_count": null, - "id": "31", + "id": "32", "metadata": {}, "outputs": [], "source": [ @@ -441,10 +452,18 @@ " return job[\"_id\"], True" ] }, + { + "cell_type": "markdown", + "id": "33", + "metadata": {}, + "source": [ + "### 6.2. One Total Energy job per material" + ] + }, { "cell_type": "code", "execution_count": null, - "id": "32", + "id": "34", "metadata": {}, "outputs": [], "source": [ @@ -459,10 +478,18 @@ " new_job_ids.append(energy_job_ids[name])" ] }, + { + "cell_type": "markdown", + "id": "35", + "metadata": {}, + "source": [ + "### 6.3. Submit the new jobs and wait for all to finish" + ] + }, { "cell_type": "code", "execution_count": null, - "id": "33", + "id": "36", "metadata": {}, "outputs": [], "source": [ @@ -476,7 +503,7 @@ }, { "cell_type": "markdown", - "id": "34", + "id": "37", "metadata": {}, "source": [ "## 7. Relax the slabs (optional)\n", @@ -487,7 +514,7 @@ { "cell_type": "code", "execution_count": null, - "id": "35", + "id": "38", "metadata": {}, "outputs": [], "source": [ @@ -513,7 +540,7 @@ }, { "cell_type": "markdown", - "id": "36", + "id": "39", "metadata": {}, "source": [ "## 8. Retrieve the results\n", @@ -523,7 +550,7 @@ { "cell_type": "code", "execution_count": null, - "id": "37", + "id": "40", "metadata": {}, "outputs": [], "source": [ @@ -544,7 +571,7 @@ }, { "cell_type": "markdown", - "id": "38", + "id": "41", "metadata": {}, "source": [ "### 8.2. Cleavage, relaxation and surface energies\n", @@ -564,7 +591,7 @@ { "cell_type": "code", "execution_count": null, - "id": "39", + "id": "42", "metadata": {}, "outputs": [], "source": [ @@ -591,7 +618,7 @@ }, { "cell_type": "markdown", - "id": "40", + "id": "43", "metadata": {}, "source": [ "## 9. Comparison with Eglitis & Vanderbilt (2008)\n", @@ -602,7 +629,7 @@ { "cell_type": "code", "execution_count": null, - "id": "41", + "id": "44", "metadata": {}, "outputs": [], "source": [ @@ -627,7 +654,7 @@ }, { "cell_type": "markdown", - "id": "42", + "id": "45", "metadata": {}, "source": [ "## References\n", From 948400ea3f0e0189be858a527193b7d32124c3c4 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Mon, 26 Oct 2026 15:47:33 -0700 Subject: [PATCH 2/2] SOF-8075: review (TB) - description wording: no reuse mechanics, terms of the notebook, section 4 as before Co-Authored-By: Claude Opus 5.5 --- .../specific_examples/slab_strontium_titanate.ipynb | 9 +++------ .../slab_strontium_titanate_SIMULATION.ipynb | 6 ++---- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/other/materials_designer/specific_examples/slab_strontium_titanate.ipynb b/other/materials_designer/specific_examples/slab_strontium_titanate.ipynb index 63897ddf8..f5b7334b2 100644 --- a/other/materials_designer/specific_examples/slab_strontium_titanate.ipynb +++ b/other/materials_designer/specific_examples/slab_strontium_titanate.ipynb @@ -156,9 +156,9 @@ "metadata": {}, "source": [ "## 3. Create the cleaved slabs\n", - "### 3.1. Formula of a plane\n", + "### 3.1. Get the formula of a plane\n", "\n", - "A plane's formula reads like made's termination labels, such as SrTiO and O2." + "A plane's formula is written as in `TERMINATIONS_BY_MILLER_INDICES`, such as SrTiO and O2." ] }, { @@ -185,7 +185,7 @@ "id": "13", "metadata": {}, "source": [ - "### 3.2. Create a cleaved slab per orientation\n", + "### 3.2. Create a cleaved slab per Miller indices\n", "\n", "A slab of whole unit cells holds an even number of planes, alternating SrTiO and O2 on (011) and SrO and TiO2 on (001), so its two faces differ." ] @@ -221,7 +221,6 @@ "metadata": {}, "source": [ "## 4. Cut the seven-plane slabs and remove atoms from each surface\n", - "### 4.1. Cut the slabs and remove atoms\n", "\n", "Each slab keeps `NUMBER_OF_PLANES` consecutive planes with the given formula at both ends. A nonpolar termination removes its atoms at the same in-plane site on both surfaces." ] @@ -266,8 +265,6 @@ "id": "17", "metadata": {}, "source": [ - "### 4.2. Report the slabs\n", - "\n", "Each slab is printed with its formula, atom count, nominal charge, face equivalence, vacuum and planes from bottom to top. The nominal charge (Sr +2, Ti +4, O -2) shows why the manuscript removes atoms from the cleaved (011) slabs: they carry ±4 e, the nonpolar ones none." ] }, diff --git a/other/materials_designer/specific_examples/slab_strontium_titanate_SIMULATION.ipynb b/other/materials_designer/specific_examples/slab_strontium_titanate_SIMULATION.ipynb index 7329687fe..3dbdfe3d5 100644 --- a/other/materials_designer/specific_examples/slab_strontium_titanate_SIMULATION.ipynb +++ b/other/materials_designer/specific_examples/slab_strontium_titanate_SIMULATION.ipynb @@ -217,7 +217,7 @@ "id": "15", "metadata": {}, "source": [ - "The account is your own, or the organization named in `ORGANIZATION_NAME` when it is set." + "The materials, jobs and project below belong to this account." ] }, { @@ -413,9 +413,7 @@ "metadata": {}, "source": [ "## 6. Total energy of every cell as cut\n", - "### 6.1. Find or create a job\n", - "\n", - "A job is reused when the material has one in progress or finished under the same workflow name." + "### 6.1. Find or create a job" ] }, {