Skip to content

Create Point Defects in a Bulk Material

1. Introduction

Create vacancies, substitutions and interstitials in a supercell of a bulk material.

2. Open the notebook

In JupyterLite, the notebook is made/create_point_defect.ipynb, entry 3.3.1 "Point Defects: vacancy, substitution, interstitial" of made/Introduction.ipynb.

3. Set the parameters

Cell 1.1 holds the parameters:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from types import SimpleNamespace

# Selected material will be used as a unit cell to create a supercell first.
SUPERCELL_MATRIX = [[3, 0, 0], [0, 3, 0], [0, 0, 3]]

DEFECT_CONFIGS = [
    {
        "type": "substitution",
        "coordinate": [0.0, 0.0, 0.0],  # Crystal coordinates
        "element": "C",
        "placement_method": "closest_site",
    },

    {
        "type": "vacancy",
        "coordinate": [0.25, 0.25, 0.25],  # Crystal coordinates
        "placement_method": "closest_site",
    },

    {
        "type": "interstitial",
        "coordinate": [0.75, 0.75, 0.75],  # Crystal coordinates
        "element": "N",
        "placement_method": "voronoi_site",
    },
]

DEFECT_CONFIGS = [SimpleNamespace(**defect_config) for defect_config in DEFECT_CONFIGS]

SUPERCELL_MATRIX builds the supercell from the first of the input materials.

Each entry of DEFECT_CONFIGS is one defect, of type "vacancy", "substitution" or "interstitial". placement_method resolves the position: "closest_site" for a vacancy or a substitution, "exact_coordinate" or "voronoi_site" for an interstitial.

4. Run and read the result

Run the notebook with Run > Run All. The notebook prints each defect and the number of atoms before and after, shows the supercell before and after the defects are created, names the result <material> with <N> defects and passes it back with set_materials, as in Structure Notebooks.

5. Interactive JupyterLite notebook

The interactive JupyterLite notebook for creating point defects can be accessed below.

The following specific examples use this notebook: Interstitial Defect in SnO, Substitutional Defects in Graphene, Vacancy Defect in h-BN and Island Surface Defect in TiN.