Skip to content

Commit 20ebb48

Browse files
committed
chore: small adjustments
1 parent 330c6e2 commit 20ebb48

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

other/materials_designer/Introduction.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"\n",
3636
"#### [1.6. Slab Perturbation](create_perturbation.ipynb)\n",
3737
"\n",
38-
"This notebook lets user create a slab and perturb it by moving atoms according to a specified function. [Click here to open the notebook](create_perturbation.ipynb).\n",
38+
"This notebook lets user add a perturbation to a slab by moving atoms according to a specified function. [Click here to open the notebook](create_perturbation.ipynb).\n",
3939
"\n",
4040
"### 2. Data Import\n",
4141
"\n",

other/materials_designer/create_perturbation.ipynb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"source": [
66
"# Create a Perturbation in a Material\n",
77
"\n",
8-
"Create a perturbation in a material with a specified smooth function. \n",
8+
"Create a perturbation in a material with a specified smooth function or a custom function described with [SymPy](https://docs.sympy.org/latest/tutorials/intro-tutorial/intro.html) expressions. \n",
99
"\n",
1010
"<h2 style=\"color:green\">Usage</h2>\n",
1111
"\n",
@@ -34,7 +34,7 @@
3434
"cell_type": "markdown",
3535
"source": [
3636
"## 1. Prepare the Environment\n",
37-
"### 1.1. Set up defect parameters "
37+
"### 1.1. Set up supercell parameters "
3838
],
3939
"metadata": {
4040
"collapsed": false
@@ -127,7 +127,7 @@
127127
"from utils.visualize import visualize_materials as visualize\n",
128128
"from mat3ra.made.tools.build.supercell import create_supercell\n",
129129
"\n",
130-
"unit_cell = materials[1]\n",
130+
"unit_cell = materials[0]\n",
131131
"supercell = create_supercell(unit_cell, supercell_matrix=SUPERCELL_MATRIX)\n",
132132
"visualize(supercell, repetitions=[1, 1, 1], rotation=\"0x\")"
133133
],
@@ -248,8 +248,7 @@
248248
"from mat3ra.made.tools.build.perturbation import CellMatchingDistancePreservingSlabPerturbationBuilder\n",
249249
"from mat3ra.made.tools.utils.perturbation import PerturbationFunctionHolder\n",
250250
"\n",
251-
"x = sp.Symbol(\"x\")\n",
252-
"y = sp.Symbol(\"y\")\n",
251+
"x,y = sp.symbols('x y')\n",
253252
"function = amplitude * sp.sin(2 * sp.pi * x / wavelength + phase) * sp.sin(2 * sp.pi * y / wavelength)\n",
254253
"\n",
255254
"custom_perturbation_function = PerturbationFunctionHolder(function=function, variables=[\"x\", \"y\"])\n",

0 commit comments

Comments
 (0)