Skip to content

Commit 7b5f97b

Browse files
committed
chore: rename ase -> specific shape
1 parent 5f081a3 commit 7b5f97b

File tree

3 files changed

+18
-28
lines changed

3 files changed

+18
-28
lines changed

other/materials_designer/Introduction.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"### 1.4. 0D Structures.\n",
3030
"#### [1.4.1. Spherical Cluster. Create a spherical cluster from a bulk material.](create_cluster_sphere.ipynb)\n",
3131
"#### [1.4.2. Custom Shape Cluster. Create a cluster by cutting it out of a slab.](create_cluster_custom_shape.ipynb)\n",
32-
"#### [1.4.3. ASE-provided Cluster. Create a cluster by building up a specific shape.](create_cluster_ase.ipynb)\n",
32+
"#### [1.4.3. Specific Shape Cluster. Create a cluster by building up a specific shape.](create_cluster_specific_shape.ipynb)\n",
3333
"#### [1.4.4. Box-cutout. Create a slab with a box cutout](create_cutout_box.ipynb)\n",
3434
"#### [1.4.5. Custom Shape Cutout. Create a slab with a custom shape cutout.](create_cutout_custom_shape.ipynb)\n",
3535
"\n",

other/materials_designer/create_cluster_custom_shape.ipynb

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
" return False\n",
133133
" return True\n",
134134
" \n",
135+
" \n",
135136
"condition = CustomCoordinateCondition(radius=RADIUS).condition"
136137
],
137138
"metadata": {
@@ -167,61 +168,50 @@
167168
{
168169
"cell_type": "markdown",
169170
"source": [
170-
"### 1.4. Create a slab of sufficient size"
171+
"## 2. Create the Target Material\n",
172+
"### 2.1. Set the cluster configuration\n"
171173
],
172174
"metadata": {
173175
"collapsed": false
174176
},
175-
"id": "a132fe0ef8bbf0d0"
177+
"id": "690241d87e7bbbe0"
176178
},
177179
{
178180
"cell_type": "code",
179181
"outputs": [],
180182
"source": [
181-
"from mat3ra.made.tools.build.supercell import create_supercell\n",
182-
"from mat3ra.made.tools.build.slab import create_slab, SlabConfiguration\n",
183-
"from utils.visualize import visualize_materials as visualize\n",
184-
"\n",
185-
"slab_config = SlabConfiguration(\n",
186-
" bulk=materials[0],\n",
187-
" miller_indices=Z_ORIENTATION,\n",
188-
" thickness=SUPERCELL_SIZE,\n",
189-
" vacuum=0,\n",
190-
" use_orthogonal_z=True,\n",
191-
" xy_supercell_matrix=[[SUPERCELL_SIZE, 0], [0, SUPERCELL_SIZE]],\n",
192-
")\n",
183+
"from mat3ra.made.tools.build.nanoparticle import ASEBasedNanoparticleConfiguration\n",
184+
"from mat3ra.made.tools.build.nanoparticle.enums import ASENanoparticleShapesEnum\n",
193185
"\n",
194-
"slab = create_slab(slab_config)\n",
195186
"\n",
196-
"visualize([{\"material\": slab, \"title\": \"Original material\"}])\n",
197-
"visualize([{\"material\": slab, \"title\": \"Original material\"}], rotation=\"-90x\")"
187+
"config = ASEBasedNanoparticleConfiguration(\n",
188+
" material=materials[0],\n",
189+
" supercell_size=SUPERCELL_SIZE,\n",
190+
" vacuum=VACUUM,\n",
191+
" z_orientation=Z_ORIENTATION,\n",
192+
" coordinate_condition=condition\n",
193+
")\n"
198194
],
199195
"metadata": {
200196
"collapsed": false
201197
},
202-
"id": "7fcb1e02e84c5f35",
203-
"execution_count": null
198+
"id": "8fbe260fa14db47a"
204199
},
205200
{
206201
"cell_type": "markdown",
207202
"source": [
208-
"## 2. Create the Target Material\n",
209-
"### 2.1. Create spherical cluster\n"
203+
"#### 2.2. Create the cluster"
210204
],
211205
"metadata": {
212206
"collapsed": false
213207
},
214-
"id": "690241d87e7bbbe0"
208+
"id": "10799f3efede924d"
215209
},
216210
{
217211
"cell_type": "code",
218212
"outputs": [],
219213
"source": [
220-
"from mat3ra.made.tools.modify import add_vacuum, add_vacuum_sides, filter_by_condition_on_coordinates\n",
221-
"\n",
222-
"cluster = filter_by_condition_on_coordinates(slab, condition)\n",
223-
"cluster = add_vacuum(cluster, VACUUM, to_bottom=True, on_top=True)\n",
224-
"cluster = add_vacuum_sides(cluster, VACUUM, on_x=True, on_y=True)"
214+
"from mat3ra.made.tools.build.nanoparticle import ASEBasedNanoparticleBuilder"
225215
],
226216
"metadata": {
227217
"collapsed": false

other/materials_designer/create_cluster_ase.ipynb renamed to other/materials_designer/create_cluster_specific_shape.ipynb

File renamed without changes.

0 commit comments

Comments
 (0)