Skip to content

Create a Terrace Defect on a Slab

1. Introduction

Create a terrace on a slab: atomic layers added to the part of the slab on one side of a cutting plane.

2. Open the notebook

In JupyterLite, the notebook is made/create_terrace_defect.ipynb, entry 3.1.2 "Terrace Defect on a Slab" 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
# Material selection
MATERIAL_INDEX = 0  # Which material to use from input list

# Terrace parameters
CUT_DIRECTION = [1, 0, 0]  # Normal vector describing a plane that cuts the terrace from added layers (Miller indices)
PIVOT_COORDINATE = [0.5, 0.5, 0.5]  # Point the cutting plane passes through, in crystal coordinates
NUMBER_OF_ADDED_LAYERS = 1  # Height of terrace in atomic layers
USE_CARTESIAN_COORDINATES = False  # Use cartesian instead of crystal coordinates
ROTATE_TO_MATCH_PBC = True  # Rotate to match periodic boundary conditions

# Slab parameters for creating a new slab if provided material is not a slab
DEFAULT_SLAB_PARAMETERS = {
    "miller_indices": (0, 0, 1),
    "thickness": 6,
    "vacuum": 10.0,
    "USE_ORTHOGONAL_C": True,
    "xy_supercell_matrix": [[5, 0], [0, 5]]
}

# Visualization parameters
SHOW_INTERMEDIATE_STEPS = True
CELL_REPETITIONS_FOR_VISUALIZATION = [3, 3, 1]  # Structure repeat in view

MATERIAL_INDEX picks the input material to use. DEFAULT_SLAB_PARAMETERS applies when it is not a slab.

CUT_DIRECTION is the normal of the cutting plane in Miller indices, and PIVOT_COORDINATE a point the plane passes through. NUMBER_OF_ADDED_LAYERS is the height of the terrace in atomic layers. The overview explains USE_CARTESIAN_COORDINATES.

ROTATE_TO_MATCH_PBC = True rotates the slab to match the periodic boundary conditions.

4. Run and read the result

Run the notebook with Run > Run All. The notebook prints the cut direction, the pivot point, the number of added layers and the number of atoms, shows the slab with the terrace from the top and from the side and passes it back with set_materials, as in Structure Notebooks.

5. Interactive JupyterLite notebook

The interactive JupyterLite notebook for creating a terrace defect can be accessed below.

The specific example Step Surface Defect on Pt(111) uses this notebook.