|
132 | 132 | " return False\n", |
133 | 133 | " return True\n", |
134 | 134 | " \n", |
| 135 | + " \n", |
135 | 136 | "condition = CustomCoordinateCondition(radius=RADIUS).condition" |
136 | 137 | ], |
137 | 138 | "metadata": { |
|
167 | 168 | { |
168 | 169 | "cell_type": "markdown", |
169 | 170 | "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" |
171 | 173 | ], |
172 | 174 | "metadata": { |
173 | 175 | "collapsed": false |
174 | 176 | }, |
175 | | - "id": "a132fe0ef8bbf0d0" |
| 177 | + "id": "690241d87e7bbbe0" |
176 | 178 | }, |
177 | 179 | { |
178 | 180 | "cell_type": "code", |
179 | 181 | "outputs": [], |
180 | 182 | "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", |
193 | 185 | "\n", |
194 | | - "slab = create_slab(slab_config)\n", |
195 | 186 | "\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" |
198 | 194 | ], |
199 | 195 | "metadata": { |
200 | 196 | "collapsed": false |
201 | 197 | }, |
202 | | - "id": "7fcb1e02e84c5f35", |
203 | | - "execution_count": null |
| 198 | + "id": "8fbe260fa14db47a" |
204 | 199 | }, |
205 | 200 | { |
206 | 201 | "cell_type": "markdown", |
207 | 202 | "source": [ |
208 | | - "## 2. Create the Target Material\n", |
209 | | - "### 2.1. Create spherical cluster\n" |
| 203 | + "#### 2.2. Create the cluster" |
210 | 204 | ], |
211 | 205 | "metadata": { |
212 | 206 | "collapsed": false |
213 | 207 | }, |
214 | | - "id": "690241d87e7bbbe0" |
| 208 | + "id": "10799f3efede924d" |
215 | 209 | }, |
216 | 210 | { |
217 | 211 | "cell_type": "code", |
218 | 212 | "outputs": [], |
219 | 213 | "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" |
225 | 215 | ], |
226 | 216 | "metadata": { |
227 | 217 | "collapsed": false |
|
0 commit comments