Skip to content

Commit 685995a

Browse files
committed
chore: use material create 2
1 parent 29f9331 commit 685995a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

other/materials_designer/import_material_from_jarvis_db_entry.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@
202202
"# Uncomment to see the JSON\n",
203203
"# print(json.dumps(data, indent=4))\n",
204204
"\n",
205-
"materials = [Material(from_poscar(poscar)) for poscar in poscars]\n",
205+
"materials = [Material.create(from_poscar(poscar)) for poscar in poscars]\n",
206206
"\n",
207207
"visualize_materials(materials)"
208208
],

other/materials_designer/import_materials_from_standata.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@
9595
"\n",
9696
"# use colloquial name, formula, dimensionality to select a material\n",
9797
"# returned material is a JSON object and needs to be converted to Material object\n",
98-
"material_by_name = Material(Materials.get_by_name(\"Graphene\")[0])\n",
99-
"material_by_name_first_match = Material(Materials.get_by_name_first_match(\"Graphene\"))\n",
98+
"material_by_name = Material.create(Materials.get_by_name(\"Graphene\")[0])\n",
99+
"material_by_name_first_match = Material.create(Materials.get_by_name_first_match(\"Graphene\"))\n",
100100
"visualize_materials([material_by_name, material_by_name_first_match], viewer=\"wave\")"
101101
],
102102
"metadata": {
@@ -120,10 +120,10 @@
120120
"cell_type": "code",
121121
"source": [
122122
"materials_2d_jsons = Materials.get_by_categories(\"2D\")\n",
123-
"materials_2d = [Material(material_json) for material_json in materials_2d_jsons]\n",
123+
"materials_2d = [Material.create(material_json) for material_json in materials_2d_jsons]\n",
124124
"\n",
125125
"materials_3d_insulator_jsons = Materials.get_by_categories(\"3D\", \"Insulator\")\n",
126-
"materials_3d_insulator = [Material(material_json) for material_json in materials_3d_insulator_jsons]\n",
126+
"materials_3d_insulator = [Material.create(material_json) for material_json in materials_3d_insulator_jsons]\n",
127127
"\n",
128128
"visualize_materials(materials_2d)\n",
129129
"visualize_materials(materials_3d_insulator)"

0 commit comments

Comments
 (0)