Skip to content

Commit 5081375

Browse files
committed
chore: adjsut to see
1 parent 721dd68 commit 5081375

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

other/materials_designer/create_point_defect_pair.ipynb

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,17 @@
4747
"\n",
4848
"# List of dictionaries with defect parameters\n",
4949
"PRIMARY_DEFECT_CONFIG = SimpleNamespace(\n",
50-
" defect_type= \"vacancy\",\n",
51-
" coordinate= [0.5, 0.5, 0.5], # Approx. coord that will be resolved to the closest site\n",
52-
" use_cartesian_coordinates = False, # Use cartesian or crystal coordinates\n",
50+
" defect_type=\"vacancy\",\n",
51+
" coordinate=[0.5, 0.5, 0.5], # Approx. coord that will be resolved to the closest site\n",
52+
" use_cartesian_coordinates=False, # Use cartesian or crystal coordinates\n",
5353
" # \"site_id\": 0, # Index of the atom in the host material\n",
5454
" # \"coordinate\": None, # Exact position (override the approximate coordinate)\n",
5555
")\n",
5656
"\n",
5757
"SECONDARY_DEFECT_CONFIG = SimpleNamespace(\n",
58-
" defect_type= \"substitution\",\n",
59-
" approximate_coordinate= [0.55, 0.55, 0.55], # Approx. coord that will be resolved to the closest site\n",
60-
" chemical_element= \"C\", # Element to substitute\n",
58+
" defect_type=\"substitution\",\n",
59+
" approximate_coordinate=[0.15, 0.15, 0.15], # Approx. coord that will be resolved to the closest site\n",
60+
" chemical_element=\"C\", # Element to substitute\n",
6161
" # \"site_id\": 0, # Index of the atom in the host material\n",
6262
" # \"coordinate\": None, # Exact position (override the approximate coordinate)\n",
6363
")"
@@ -162,16 +162,20 @@
162162
"cell_type": "code",
163163
"source": [
164164
"from mat3ra.made.tools.build.defect.pair_defect.helpers import create_pair_defect\n",
165+
"\n",
165166
"material_with_defect = create_pair_defect(\n",
166167
" material=supercell,\n",
167-
" defect_type_1 = PRIMARY_DEFECT_CONFIG.defect_type,\n",
168-
" coordinate_1 = PRIMARY_DEFECT_CONFIG.coordinate,\n",
169-
" element_1= PRIMARY_DEFECT_CONFIG.chemical_element if hasattr(PRIMARY_DEFECT_CONFIG, \"chemical_element\") else None,\n",
170-
" placement_method_1= PRIMARY_DEFECT_CONFIG.placement_method if hasattr(PRIMARY_DEFECT_CONFIG, 'placement_method') else None,\n",
171-
" defect_type_2= SECONDARY_DEFECT_CONFIG.defect_type,\n",
172-
" coordinate_2= SECONDARY_DEFECT_CONFIG.approximate_coordinate,\n",
173-
" element_2= SECONDARY_DEFECT_CONFIG.chemical_element if hasattr(SECONDARY_DEFECT_CONFIG, \"chemical_element\") else None,\n",
174-
" placement_method_2= SECONDARY_DEFECT_CONFIG.placement_method if hasattr(SECONDARY_DEFECT_CONFIG, 'placement_method') else None,\n",
168+
" defect_type_1=PRIMARY_DEFECT_CONFIG.defect_type,\n",
169+
" coordinate_1=PRIMARY_DEFECT_CONFIG.coordinate,\n",
170+
" element_1=PRIMARY_DEFECT_CONFIG.chemical_element if hasattr(PRIMARY_DEFECT_CONFIG, \"chemical_element\") else None,\n",
171+
" placement_method_1=PRIMARY_DEFECT_CONFIG.placement_method if hasattr(PRIMARY_DEFECT_CONFIG,\n",
172+
" 'placement_method') else None,\n",
173+
" defect_type_2=SECONDARY_DEFECT_CONFIG.defect_type,\n",
174+
" coordinate_2=SECONDARY_DEFECT_CONFIG.approximate_coordinate,\n",
175+
" element_2=SECONDARY_DEFECT_CONFIG.chemical_element if hasattr(SECONDARY_DEFECT_CONFIG,\n",
176+
" \"chemical_element\") else None,\n",
177+
" placement_method_2=SECONDARY_DEFECT_CONFIG.placement_method if hasattr(SECONDARY_DEFECT_CONFIG,\n",
178+
" 'placement_method') else None,\n",
175179
")"
176180
],
177181
"id": "c4f50fb621da6474",

0 commit comments

Comments
 (0)