Skip to content

Commit aa37e17

Browse files
authored
Merge pull request #173 from Exabyte-io/feature/SOF-7508
Feature/sof 7508
2 parents 2ba468e + 536598d commit aa37e17

File tree

6 files changed

+401
-15
lines changed

6 files changed

+401
-15
lines changed

config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ default:
99
- pandas==1.5.3
1010
- ase==3.22.1
1111
- ipywidgets
12+
- plotly==5.18
1213
packages_python:
1314
- pymatgen==2024.4.13
1415
packages_pyodide:

other/materials_designer/Introduction.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"#### [4.1.1. Slab Passivation](passivate_slab.ipynb) \n",
7373
"\n",
7474
"### 4.2. Edge Passivation\n",
75-
"#### [4.2.1. Nanoribbon Passivation](passivate_nanoribbon.ipynb) (COMING SOON)\n",
75+
"#### [4.2.1. Edge Passivation](passivate_edge.ipynb)\n",
7676
"\n",
7777
"\n",
7878
"## 5. Perturbations.\n",

other/materials_designer/passivate_nanoribbon.ipynb renamed to other/materials_designer/passivate_edge.ipynb

Lines changed: 42 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
{
1212
"cell_type": "markdown",
1313
"source": [
14-
"# Create Nanoribbon Edge Passivation\n",
15-
"Passivate nanoribbon edges by detecting and adding passivants to undercoordinated atoms (atoms with fewer neighbors than bulk).\n",
14+
"# Create Edge Passivation\n",
15+
"Passivate material edges by detecting and adding passivants to undercoordinated atoms (atoms with fewer neighbors than bulk).\n",
1616
"\n",
1717
"<h2 style=\"color:green\">Usage</h2>\n",
1818
"\n",
@@ -60,12 +60,14 @@
6060
"\n",
6161
"# Passivation parameters\n",
6262
"PASSIVANT = \"H\" # Chemical element for passivating atom\n",
63-
"BOND_LENGTH = 1.0 # Distance from atom to passivant, in Angstroms\n",
63+
"BOND_LENGTH = 1.09 # Distance from atom to passivant, in Angstroms\n",
6464
"\n",
6565
"# Undercoordinated atoms search algorithm parameters\n",
66-
"COORDINATION_THRESHOLD = 5 # Coordination threshold, below which passivation is applied to the atom\n",
67-
"COORDINATION_SEARCH_RADIUS = 2.5 # Distance to look for neighbors for coordination, in Angstroms\n",
68-
"SEARCH_DEPTH = 5.0 # How deep to look for surface atoms, in Angstroms. Ignored for 2D materials\n",
66+
"COORDINATION_THRESHOLD = 2 # Coordination threshold, below which passivation is applied to the atom\n",
67+
"COORDINATION_SEARCH_RADIUS = 3.0 # Distance to look for neighbors for coordination, in Angstroms\n",
68+
"MAX_BONDS_TO_PASSIVATE = 1 # Maximum number of bonds to passivate\n",
69+
"\n",
70+
"SYMMETRY_TOLERANCE = 0.1 # Tolerance for symmetry analysis of existing bonds\n",
6971
"\n",
7072
"# Visualization parameters\n",
7173
"SHOW_INTERMEDIATE_STEPS = True\n",
@@ -142,13 +144,38 @@
142144
{
143145
"cell_type": "markdown",
144146
"source": [
145-
"## 2. Analyze Coordination Numbers and Select Threshold\n"
147+
"## 2. Analyze Coordination Numbers and Select Threshold\n",
148+
"### 2.1. Plot RDF to estimate coordination search radius"
146149
],
147150
"metadata": {
148151
"collapsed": false
149152
},
150153
"id": "b5940fc50c11c7b8"
151154
},
155+
{
156+
"cell_type": "code",
157+
"outputs": [],
158+
"source": [
159+
"from utils.plot import plot_rdf\n",
160+
"\n",
161+
"plot_rdf(nanoribbon, cutoff=10.0)"
162+
],
163+
"metadata": {
164+
"collapsed": false
165+
},
166+
"id": "575e8fba623c06e4",
167+
"execution_count": null
168+
},
169+
{
170+
"cell_type": "markdown",
171+
"source": [
172+
"### 2.2. GEt coordination numbers and set coordination threshold"
173+
],
174+
"metadata": {
175+
"collapsed": false
176+
},
177+
"id": "b89dc754926f1ce4"
178+
},
152179
{
153180
"cell_type": "code",
154181
"outputs": [],
@@ -161,15 +188,15 @@
161188
" passivant=PASSIVANT,\n",
162189
" bond_length=BOND_LENGTH\n",
163190
")\n",
164-
"coordination_numbers = sorted(list(get_unique_coordination_numbers(config)))\n",
191+
"coordination_numbers = get_unique_coordination_numbers(config, cutoff=COORDINATION_SEARCH_RADIUS)\n",
165192
"print(f\"Unique coordination numbers: {coordination_numbers}\")\n",
166193
"\n",
167194
"coordination_threshold = COORDINATION_THRESHOLD\n",
168195
"if IS_COORDINATION_SELECTION_INTERACTIVE:\n",
169196
" coordination_threshold = await select_coordination_threshold(\n",
170197
" coordination_numbers, COORDINATION_THRESHOLD\n",
171-
" ) \n",
172-
" \n",
198+
" )\n",
199+
"\n",
173200
"print(f\"\\nSelected coordination threshold: {coordination_threshold}\")\n",
174201
"print(f\"Atoms with coordination < {coordination_threshold} will be passivated\")"
175202
],
@@ -199,8 +226,9 @@
199226
"\n",
200227
"builder_params = CoordinationBasedPassivationBuilderParameters(\n",
201228
" shadowing_radius=COORDINATION_SEARCH_RADIUS,\n",
202-
" depth=SEARCH_DEPTH,\n",
203-
" coordination_threshold=coordination_threshold\n",
229+
" coordination_threshold=coordination_threshold,\n",
230+
" bonds_to_passivate=MAX_BONDS_TO_PASSIVATE,\n",
231+
" symmetry_tolerance=SYMMETRY_TOLERANCE\n",
204232
")\n",
205233
"\n",
206234
"builder = CoordinationBasedPassivationBuilder(build_parameters=builder_params)"
@@ -268,7 +296,7 @@
268296
{
269297
"cell_type": "markdown",
270298
"source": [
271-
"### 5. Pass data to the outside runtime\n"
299+
"## 5. Pass data to the outside runtime\n"
272300
],
273301
"metadata": {
274302
"collapsed": false
@@ -281,6 +309,7 @@
281309
"source": [
282310
"from utils.jupyterlite import set_materials\n",
283311
"\n",
312+
"passivated_nanoribbon.name = f\"{nanoribbon.name} passivated\"\n",
284313
"set_materials(passivated_nanoribbon)"
285314
],
286315
"metadata": {

0 commit comments

Comments
 (0)