Skip to content

Create a Supercell

1. Introduction

Create a supercell of a material, set either by a supercell matrix or by the number of repetitions along each lattice vector.

2. Open the notebook

In JupyterLite, the notebook is made/create_supercell.ipynb, entry 1.1.1 "Supercells. Create supercells from 3D crystals" of made/Introduction.ipynb.

3. Set the parameters

The notebook takes the first of the input materials.

Cell 1.1 holds the parameters:

1
2
3
4
5
6
7
8
SUPERCELL_MATRIX = [
    [3, 0, 0],
    [0, 3, 0],
    [0, 0, 1]
]

# or use the scaling factor
SCALING_FACTOR = None # [3, 3, 1]

With SUPERCELL_MATRIX set to None, SCALING_FACTOR repeats the cell the given number of times along each lattice vector.

4. Run and read the result

Run the notebook with Run > Run All. The notebook shows the supercell 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 supercell can be accessed below.

The specific example H-Passivated Silicon (100) Surface uses this notebook.