Skip to content

Commit ed662ac

Browse files
Merge pull request #217 from Exabyte-io/feauture/SOF-7549-1
chore: add wave viewer + other fixes
2 parents 68ada5a + e7bb5fa commit ed662ac

File tree

5 files changed

+10
-32
lines changed

5 files changed

+10
-32
lines changed

other/materials_designer/create_adatom_defect.ipynb

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -205,14 +205,9 @@
205205
{
206206
"cell_type": "code",
207207
"source": [
208-
"import time\n",
209-
"import json\n",
210-
"import ipywidgets\n",
211-
"\n",
212208
"from mat3ra.made.tools.build.defect import create_defects\n",
213209
"\n",
214-
"slab_with_adatom = create_defects(defect_configurations)\n",
215-
"\n"
210+
"slab_with_adatom = create_defects(defect_configurations)"
216211
],
217212
"metadata": {
218213
"collapsed": false
@@ -231,35 +226,15 @@
231226
},
232227
"id": "462549d016073446"
233228
},
234-
{
235-
"metadata": {},
236-
"cell_type": "code",
237-
"source": "",
238-
"id": "5e8e68df02b876cf",
239-
"outputs": [],
240-
"execution_count": null
241-
},
242-
{
243-
"metadata": {},
244-
"cell_type": "code",
245-
"source": [
246-
"visualize(materials=[slab,slab_with_adatom], title=\"Material with adatom defects\", rotation=\"-90x\", viewer=\"wave\"\n",
247-
" )"
248-
],
249-
"id": "2159b0765a0c88c8",
250-
"outputs": [],
251-
"execution_count": null
252-
},
253229
{
254230
"metadata": {},
255231
"cell_type": "code",
256232
"source": [
257233
"from utils.visualize import visualize_materials as visualize\n",
258234
"\n",
259235
"visualize([{\"material\": slab, \"title\": \"Original material\"},\n",
260-
" {\"material\": slab_with_adatom, \"title\": f\"Material with adatom defects\"},\n",
261-
" {\"material\": slab, \"title\": \"Original material\"},\n",
262-
" {\"material\": slab_with_adatom, \"title\": f\"Material with adatom defects\"}], viewer=\"wave\"\n",
236+
" {\"material\": slab_with_adatom, \"title\": f\"Material with adatom defects\"}],\n",
237+
" viewer=\"wave\"\n",
263238
" )"
264239
],
265240
"id": "256b07fb2dd39ae2",

other/materials_designer/custom_transformation.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@
136136
"source": [
137137
"from utils.jupyterlite import set_materials, download_content_to_file\n",
138138
"\n",
139+
"new_material.name = \"Custom Transformed Material\"\n",
139140
"set_materials(new_material)\n",
140141
"# for idx, material in enumerate(new_materials):\n",
141142
"# download_content_to_file(new_materials, f\"new_material_{idx}.json\")"

other/materials_designer/import_materials_from_files.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@
241241
"\n",
242242
"materials = [Material(esse_entry) for esse_entry in esse_entries]\n",
243243
"\n",
244-
"visualize_materials(materials)"
244+
"visualize_materials(materials, viewer=\"wave\")"
245245
],
246246
"outputs": [],
247247
"execution_count": null

other/materials_designer/import_materials_from_standata.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@
3636
"\n",
3737
"if sys.platform == \"emscripten\":\n",
3838
" import micropip\n",
39-
" \n",
39+
"\n",
4040
" await micropip.install('mat3ra-api-examples', deps=False)\n",
4141
" await micropip.install('mat3ra-utils')\n",
4242
" await micropip.install('mat3ra-standata')\n",
43-
" from utils.jupyterlite import install_packages\n",
43+
" from mat3ra.utils.jupyterlite.packages import install_packages\n",
44+
"\n",
4445
" await install_packages(\"\")"
4546
],
4647
"metadata": {
@@ -65,6 +66,7 @@
6566
"cell_type": "code",
6667
"source": [
6768
"from mat3ra.standata.materials import Materials\n",
69+
"\n",
6870
"Materials.get_names()"
6971
],
7072
"metadata": {

other/materials_designer/specific_examples/perturbation_ripple_graphene.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@
277277
},
278278
{
279279
"cell_type": "code",
280-
"source": "visualize(material_with_custom_perturbation, viewer=\"wave\")WW",
280+
"source": "visualize(material_with_custom_perturbation, viewer=\"wave\")",
281281
"metadata": {
282282
"collapsed": false
283283
},

0 commit comments

Comments
 (0)