Create a Custom Perturbation in a Material¶
1. Introduction¶
Perturb a supercell of a material with a custom function of the coordinates, written as a SymPy expression.
2. Open the notebook¶
In JupyterLite, the notebook is made/create_perturbation_custom.ipynb, entry 5.2.2 "Perturbation using custom function" of made/Introduction.ipynb.
3. Set the parameters¶
Cell 1.2 holds the parameters:
1 2 3 4 5 6 7 8 | |
PRESERVE_GEODESIC_DISTANCE = True keeps the distances between the atoms along the perturbed surface and scales the cell to match the periodic boundary conditions.
SUPERCELL_MATRIX builds the supercell of the first of the input materials that is perturbed.
The overview explains USE_CARTESIAN_COORDINATES.
Cell 1.3 holds the perturbation function:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
custom_sympy_function is the displacement as a SymPy expression of x, y and z. The default is a product of sine waves along x and y, set by AMPLITUDE, WAVELENGTH and PHASE.
4. Run and read the result¶
Run the notebook with Run > Run All. The notebook shows the perturbed material from the top and from the side and passes it back with set_materials, as in Structure Notebooks.
5. Interactive JupyterLite notebook¶
The interactive JupyterLite notebook for creating a custom perturbation can be accessed below.
6. Related¶
The specific example Ripple Perturbation in Graphene uses this notebook.