Create a Cluster of Custom Shape¶
1. Introduction¶
Create a cluster of any shape from a bulk material, with the shape given as a condition on the atomic coordinates and a chosen crystal orientation along the z axis.
2. Open the notebook¶
In JupyterLite, the notebook is made/create_cluster_custom_shape.ipynb, entry 1.4.3 "Custom Shape Cluster. Create a cluster by cutting it out of a slab" of made/Introduction.ipynb.
3. Set the parameters¶
The notebook takes the first of the input materials.
Cell 1.2 holds the parameters:
1 2 3 4 5 | |
RADIUS is the size of the shape in angstroms, and Z_ORIENTATION the Miller indices of the crystal planes normal to z. NAME is appended to the material's name. The overview explains VACUUM and USE_CARTESIAN_COORDINATES.
Cell 1.3 holds the condition on the coordinates:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | |
CustomCoordinateCondition.condition returns whether the atom at a coordinate is kept. The default keeps the atoms inside a regular icosahedron of radius RADIUS; another shape is set by editing the method.
4. Run and read the result¶
Run the notebook with Run > Run All. The notebook shows the cluster from the top and from the side, names it <material> <NAME> and passes it back with set_materials, as in Structure Notebooks.
5. Interactive JupyterLite notebook¶
The interactive JupyterLite notebook for creating a cluster of custom shape can be accessed below.