|
47 | 47 | "\n",
|
48 | 48 | "# List of dictionaries with defect parameters\n",
|
49 | 49 | "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", |
53 | 53 | " # \"site_id\": 0, # Index of the atom in the host material\n",
|
54 | 54 | " # \"coordinate\": None, # Exact position (override the approximate coordinate)\n",
|
55 | 55 | ")\n",
|
56 | 56 | "\n",
|
57 | 57 | "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", |
61 | 61 | " # \"site_id\": 0, # Index of the atom in the host material\n",
|
62 | 62 | " # \"coordinate\": None, # Exact position (override the approximate coordinate)\n",
|
63 | 63 | ")"
|
|
162 | 162 | "cell_type": "code",
|
163 | 163 | "source": [
|
164 | 164 | "from mat3ra.made.tools.build.defect.pair_defect.helpers import create_pair_defect\n",
|
| 165 | + "\n", |
165 | 166 | "material_with_defect = create_pair_defect(\n",
|
166 | 167 | " 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", |
175 | 179 | ")"
|
176 | 180 | ],
|
177 | 181 | "id": "c4f50fb621da6474",
|
|
0 commit comments