Skip to content

Create a Grain Boundary in a 2D Material

1. Introduction

Create a grain boundary in a 2D material: two orientations of the material, commensurate and rotated relative to each other by an angle close to a target, placed next to each other along x with a gap between them.

2. Open the notebook

In JupyterLite, the notebook is made/create_grain_boundary_film.ipynb, entry 3.2.1 "Grain Boundary Linear" 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
# Material selection
MATERIAL_INDEX = 0  # Index in the list of materials

# Grain boundary parameters
TARGET_TWIST_ANGLE = 17.9  # in degrees
BOUNDARY_GAP = 2.0  # Gap between two orientations in X direction, in Angstroms
XY_SUPERCELL_MATRIX = [[1, 0], [0, 1]] # Supercell matrix to be applied to each of the orientations before matching
MILLER_INDICES = (0, 0, 1)  # Miller indices for the supercell matching
VACUUM = 10.0  # Vacuum thickness in Angstroms, added to the top and bottom of the grain boundary

# Search algorithm parameters
MAX_REPETITION = 6  # Maximum supercell matrix element value
ANGLE_TOLERANCE = 2.5  # in degrees
RETURN_FIRST_MATCH = True  # If True, returns first solution within tolerance

# Distance tolerance for two atoms to be considered too close.
# Used when merging two orientations to remove the atoms of the first one.
# Should be less than the expected bond length
DISTANCE_TOLERANCE = 1.2  # in Angstroms

# How much to expand inclusion of the edge atoms for both orientations and fill in the gap region.
# A fine-tuning parameter
EDGE_INCLUSION_TOLERANCE = 0.5  # in Angstroms

# Visualization parameters
SHOW_INTERMEDIATE_STEPS = True
CELL_REPETITIONS_FOR_VISUALIZATION = [3, 3, 1]

MATERIAL_INDEX picks the input material to use.

BOUNDARY_GAP is the gap between the two orientations along x, in angstroms, and MILLER_INDICES the plane of the matching. The overview explains TARGET_TWIST_ANGLE and VACUUM.

MAX_REPETITION is the largest element of the supercell matrices the search tries.

4. Run and read the result

Run the notebook with Run > Run All. The notebook prints the target angle, the angle found and the number of atoms, shows the grain boundary 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 linear grain boundary can be accessed below.