Skip to content

Commit febd93b

Browse files
committed
update: restructure nb
1 parent c1de5ed commit febd93b

File tree

1 file changed

+50
-36
lines changed

1 file changed

+50
-36
lines changed

other/materials_designer/specific_examples/grain_boundary_3d_fcc_metal.ipynb

Lines changed: 50 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
11
{
22
"cells": [
33
{
4-
"cell_type": "code",
5-
"outputs": [],
6-
"source": [],
4+
"cell_type": "markdown",
5+
"source": [
6+
"# Grain Boundary 3D FCC Metal\n",
7+
"\n",
8+
"## 0. Introduction\n",
9+
"\n",
10+
"This notebook demonstrates how to create a grain boundary structure for a 3D FCC metal, Cu in particular. The grain boundary is created by combining two slabs with different orientations. \n",
11+
"\n",
12+
"Aiming to reproduce the structure from the publication:\n",
13+
"> **Timofey Frolov, David L. Olmsted, Mark Asta & Yuri Mishin**\n",
14+
"> \"Structural phase transformations in metallic grain boundaries\"\n",
15+
"> Nature Communications, volume 4, Article number: 1899 (2013)\n",
16+
"> DOI: [10.1038/ncomms2919](https://www.nature.com/articles/ncomms2919) \n",
17+
"\n",
18+
"Focusing on reproducing the structures from Figure 1. b:\n",
19+
"\n",
20+
"<img src=\"https://i.imgur.com/SdIaZRD.png\" alt=\"Figure 1.\" width=\"400\"/>"
21+
],
722
"metadata": {
823
"collapsed": false
924
},
10-
"id": "initial_id",
11-
"execution_count": 0
25+
"id": "aa0a426af23f6def"
1226
},
1327
{
1428
"cell_type": "markdown",
@@ -29,14 +43,15 @@
2943
"source": [
3044
"# Enable interactive selection of terminations via UI prompt\n",
3145
"IS_TERMINATIONS_SELECTION_INTERACTIVE = False \n",
46+
"MATERIAL_NAME = \"Cu\"\n",
3247
"\n",
3348
"# Parameters for Phase 1\n",
34-
"PHASE_1_MILLER_INDICES = (1, 1, 1)\n",
35-
"PHASE_1_THICKNESS = 6 # in atomic layers\n",
49+
"PHASE_1_MILLER_INDICES = (3,1,0)\n",
50+
"PHASE_1_THICKNESS = 4 # in atomic layers\n",
3651
"PHASE_1_USE_ORTHOGONAL_Z = True\n",
3752
"\n",
3853
"# Parameters for Phase 2\n",
39-
"PHASE_2_MILLER_INDICES = (0, 0, 1)\n",
54+
"PHASE_2_MILLER_INDICES = (-3, -1, 0)\n",
4055
"PHASE_2_THICKNESS = 4 # in atomic layers\n",
4156
"PHASE_2_USE_ORTHOGONAL_Z = True\n",
4257
"\n",
@@ -58,7 +73,7 @@
5873
"collapsed": false
5974
},
6075
"id": "45730b0f5384262b",
61-
"execution_count": 0
76+
"execution_count": null
6277
},
6378
{
6479
"cell_type": "markdown",
@@ -82,13 +97,13 @@
8297
" \n",
8398
" await micropip.install('mat3ra-api-examples', deps=False)\n",
8499
" from utils.jupyterlite import install_packages\n",
85-
" await install_packages(\"create_grain_boundary.ipynb\")\n"
100+
" await install_packages(\"specific_examples|create_grain_boundary.ipynb\")\n"
86101
],
87102
"metadata": {
88103
"collapsed": false
89104
},
90105
"id": "bae18ae87d3cc5ba",
91-
"execution_count": 0
106+
"execution_count": null
92107
},
93108
{
94109
"cell_type": "markdown",
@@ -104,16 +119,16 @@
104119
"cell_type": "code",
105120
"outputs": [],
106121
"source": [
107-
"from utils.jupyterlite import get_materials\n",
122+
"from mat3ra.standata.materials import Materials\n",
123+
"from mat3ra.made.material import Material\n",
108124
"\n",
109-
"materials = get_materials(globals())\n",
110-
"material = materials[0]"
125+
"material = Material(Materials.get_by_name_first_match(MATERIAL_NAME))"
111126
],
112127
"metadata": {
113128
"collapsed": false
114129
},
115130
"id": "950e5bef61bbd84a",
116-
"execution_count": 0
131+
"execution_count": null
117132
},
118133
{
119134
"cell_type": "markdown",
@@ -136,12 +151,12 @@
136151
"collapsed": false
137152
},
138153
"id": "4ebde830102b0b94",
139-
"execution_count": 0
154+
"execution_count": null
140155
},
141156
{
142157
"cell_type": "markdown",
143158
"source": [
144-
"## 2. Configure slabs and select termination pair\n",
159+
"## 2. Create grain boundary for (310) surface\n",
145160
"\n",
146161
"### 2.1. Create Phase 1 and Phase 2 Slabs\n",
147162
"Slab Configuration lets define the slab thickness, vacuum, and the Miller indices of the interfacial plane and get the slabs with possible terminations."
@@ -175,7 +190,7 @@
175190
"collapsed": false
176191
},
177192
"id": "b7cc3daa852d868d",
178-
"execution_count": 0
193+
"execution_count": null
179194
},
180195
{
181196
"cell_type": "markdown",
@@ -198,7 +213,7 @@
198213
"collapsed": false
199214
},
200215
"id": "5bdc0e37e3ec9891",
201-
"execution_count": 0
216+
"execution_count": null
202217
},
203218
{
204219
"cell_type": "markdown",
@@ -224,7 +239,7 @@
224239
"collapsed": false
225240
},
226241
"id": "f75092312b399f84",
227-
"execution_count": 0
242+
"execution_count": null
228243
},
229244
{
230245
"cell_type": "markdown",
@@ -251,7 +266,7 @@
251266
"collapsed": false
252267
},
253268
"id": "40b4ba55613d9658",
254-
"execution_count": 0
269+
"execution_count": null
255270
},
256271
{
257272
"cell_type": "markdown",
@@ -282,14 +297,12 @@
282297
"collapsed": false
283298
},
284299
"id": "8dfc5893f510bae4",
285-
"execution_count": 0
300+
"execution_count": null
286301
},
287302
{
288303
"cell_type": "markdown",
289304
"source": [
290-
"## 3. Create grain boundary\n",
291-
"\n",
292-
"### 3.1. Initialize the Grain Boundary Configuration"
305+
"### 2.6. Initialize the Grain Boundary Configuration"
293306
],
294307
"metadata": {
295308
"collapsed": false
@@ -325,12 +338,12 @@
325338
"collapsed": false
326339
},
327340
"id": "40b6c8662d071f18",
328-
"execution_count": 0
341+
"execution_count": null
329342
},
330343
{
331344
"cell_type": "markdown",
332345
"source": [
333-
"### 3.2. Set Strain Matching Algorithm Parameters"
346+
"### 2.7. Set Strain Matching Algorithm Parameters"
334347
],
335348
"metadata": {
336349
"collapsed": false
@@ -356,12 +369,12 @@
356369
"collapsed": false
357370
},
358371
"id": "44015c5407563d4e",
359-
"execution_count": 0
372+
"execution_count": null
360373
},
361374
{
362375
"cell_type": "markdown",
363376
"source": [
364-
"### 3.3. Generate grain boundary with strain matcher"
377+
"### 2.8. Generate grain boundary with strain matcher"
365378
],
366379
"metadata": {
367380
"collapsed": false
@@ -381,12 +394,12 @@
381394
"collapsed": false
382395
},
383396
"id": "884b458236270a29",
384-
"execution_count": 0
397+
"execution_count": null
385398
},
386399
{
387400
"cell_type": "markdown",
388401
"source": [
389-
"## 4. Preview the grain boundary"
402+
"## 2.9. Preview the grain boundary"
390403
],
391404
"metadata": {
392405
"collapsed": false
@@ -404,12 +417,12 @@
404417
"collapsed": false
405418
},
406419
"id": "892c0e7c932cd725",
407-
"execution_count": 0
420+
"execution_count": null
408421
},
409422
{
410423
"cell_type": "markdown",
411424
"source": [
412-
"## 5. Pass data to the outside runtime"
425+
"## 3. Save the final material"
413426
],
414427
"metadata": {
415428
"collapsed": false
@@ -420,14 +433,15 @@
420433
"cell_type": "code",
421434
"outputs": [],
422435
"source": [
423-
"from utils.jupyterlite import set_materials\n",
424-
"set_materials(grain_boundary)"
436+
"from utils.jupyterlite import download_content_to_file\n",
437+
"\n",
438+
"download_content_to_file(grain_boundary, f\"{MATERIAL_NAME}-{PHASE_1_MILLER_INDICES}-{PHASE_2_MILLER_INDICES}_grain_boundary.json\")"
425439
],
426440
"metadata": {
427441
"collapsed": false
428442
},
429443
"id": "503eff0dd5c1a160",
430-
"execution_count": 0
444+
"execution_count": null
431445
}
432446
],
433447
"metadata": {

0 commit comments

Comments
 (0)