Structure Notebooks¶
1. Introduction¶
Structure notebooks create materials of different types: supercells, slabs and monolayers, nanowires, nanoribbons and clusters, interfaces and heterostructures, point and surface defects, grain boundaries, passivated, perturbed and disordered structures. Each notebook builds one type of material from the materials selected in Materials Designer and returns the result to it, where it can be saved and used in calculations. The import notebooks bring materials in from files, Standata and the JARVIS database. The notebooks are open source, in the other/materials_designer folder of the API examples repository.
2. Open a notebook¶
The notebooks are reached through the "Advanced > JupyterLite Transformation" menu item of Materials Designer, or in a browser tab without Materials Designer, as in Accessing JupyterLite. In JupyterLite, the structure notebooks are in the made folder and the simulation notebooks in made/workflows; made/Introduction.ipynb links each structure notebook under its number and title, by M-CODE: Domain, then Dimensionality, then Category.

3. Select the input materials¶
The notebook reads the materials selected in the dialog with get_materials(globals()), as in Data Exchange, or, with none selected, the materials saved in its uploads folder.
MATERIAL_INDEX picks one of them by its position in the list, starting from 0. The notebooks that combine two materials pick them by SUBSTRATE_INDEX and FILM_INDEX; in the twisted interface notebooks, SUBSTRATE_INDEX = None uses the film material for both. A few notebooks take their materials by name from the Standard Materials Dataset (Standata) or from uploads instead, such as the layers of the heterostructure.
Materials are added to Materials Designer from the account's collection by Import, or from Standata by Import from Standata. The notebooks of the Import section bring materials from Standata, from files and from the JARVIS database.
4. Set the parameters¶
The parameters are named constants in the first cells of the notebook, and the default values run as they are. Variables with the prefix FILM_, SUBSTRATE_, PHASE_1_ or PHASE_2_ hold a setting for one of two parts.
4.1. Orientation, thickness and vacuum¶
MILLER_INDICES set the orientation of a surface or of a wire, and THICKNESS or NUMBER_OF_LAYERS its thickness in layers. VACUUM is the empty space added around the structure, in angstroms; the Zur and McGill superlattice (ZSL) and no-strain-matching interface notebooks add INTERFACE_VACUUM over the film. USE_ORTHOGONAL_C = True makes the third lattice vector orthogonal to the surface, and USE_CONVENTIONAL_CELL = True cuts from the conventional cell instead of the primitive one.
In the box cutout, island, custom island, terrace and slab passivation notebooks, DEFAULT_SLAB_PARAMETERS sets the slab cut from a bulk input material; an input that is already a slab is used as it is, except in the box cutout notebook, which always cuts a new slab.
4.2. Supercells and dimensions¶
XY_SUPERCELL_MATRIX repeats a slab in the surface plane, and SUPERCELL_MATRIX repeats a cell in three dimensions. Notebooks that build finite or one-dimensional structures take their size directly, as RADIUS, LENGTH or WIDTH, in angstroms or in unit cells as the comment of each variable states.
4.3. Termination¶
A surface cut in a given orientation can end on several atomic planes, its terminations. TERMINATION_FORMULA and its prefixed variants select a termination by its stoichiometric formula. With None, the notebook takes the first termination, or, in the slab notebook, the one at TERMINATION_INDEX.
4.4. Matching and tolerances¶
The ZSL interface, the two grain boundary and the commensurate twisted interface notebooks search for supercells of two lattices that match. MAX_AREA bounds the area of the search in the ZSL and planar grain boundary notebooks, and MAX_AREA_TOLERANCE, MAX_LENGTH_TOLERANCE and MAX_ANGLE_TOLERANCE in the ZSL notebook, or ANGLE_TOLERANCE in the commensurate twisted interface notebook, set how far areas, lengths and angles may deviate. TARGET_TWIST_ANGLE is the rotation angle between the two parts. RETURN_FIRST_MATCH = True stops the commensurate search at the first match within the tolerance, and MATCH_ID in the planar grain boundary notebook or selected_index in the ZSL notebook picks one of the matches found.
4.5. Placement and coordinates¶
Positions are given in crystal coordinates, fractions of the lattice vectors, unless USE_CARTESIAN_COORDINATES = True sets them in angstroms. CENTER_POSITION, MIN_COORDINATE, MAX_COORDINATE and the shape parameters select the region of a cluster, cutout, island or wire. INTERFACE_DISTANCE, GAPS and the other gap variables are the distances between joined parts, in angstroms, and FILM_XY_SHIFT or TRANSLATION_VECTOR shift one part relative to the other.
4.6. Defects, passivation and perturbations¶
Each entry of DEFECT_CONFIGS is one defect: its type, its position and, for an added or substituted atom, its chemical element. PASSIVANT and BOND_LENGTH set the atom that saturates dangling bonds and its distance to the surface or edge atom. Perturbation and disorder notebooks set the size of the displacements, such as AMPLITUDE or DISORDER_PARAMETER, and RANDOM_SEED or SEED makes a random result repeatable.
4.7. Display and interactive selection¶
SHOW_INTERMEDIATE_STEPS, CELL_REPETITIONS_FOR_VISUALIZATION, VISUALIZE_REPETITIONS and PLOT_SETTINGS change what the notebook shows, not the material it builds. A variable named IS_..._INTERACTIVE set to True makes the notebook ask for a choice while it runs.
5. Pass the result back¶
A notebook that builds materials ends with set_materials, which passes the materials back to Materials Designer, as in Data Exchange, and writes each of them to the uploads folder as a JSON file named after the material, where the simulation notebooks load it by name. NAME, where a notebook has it, goes into the name of the material.