Simulation Notebooks¶
1. Introduction¶
Simulation notebooks calculate the properties of a material: total energy, relaxed structure, band gap and band structure, phonons, surface, interfacial, formation and defect energies, reaction paths, band offsets and dielectric properties. Most of them run the calculation on the Mat3ra platform: the notebook loads the material, builds the workflow, submits the job and shows the results when it finishes. The notebooks are open source, in the other/materials_designer/workflows folder of the API examples repository.
2. Open a notebook¶
The notebooks open in JupyterLite in the same way as the structure notebooks. In JupyterLite, they are in the made/workflows folder, and made/workflows/Introduction.ipynb links each of them under its number and title, by category.

3. Set the parameters¶
The parameters are named constants in the first cells of the notebook, and the default values run as they are.
3.1. Account¶
A notebook that uses the platform logs in when it runs: opened in JupyterLite inside the platform, it receives the platform's access token; otherwise it shows an OpenID Connect (OIDC) device login, confirmed in the browser, as in Authentication in JupyterLite.
ORGANIZATION_NAME selects the account that owns the materials, workflows and jobs: the personal account with None, or the account of the organization with that name. Jobs go to the default project of the selected account.
3.2. Material and its source¶
FOLDER is the uploads folder where the structure notebooks save their results. The material is selected by its name or a part of it: MATERIAL_NAME, or a variable named after its role, such as INTERFACE_NAME, SLAB_NAME or PRISTINE_NAME. Most notebooks look the name up in FOLDER, then in the Standard Materials Dataset (Standata). The defect formation energy, phonon, Schottky barrier and valence band offset notebooks use load_material, which searches FOLDER and the account's materials collection, then Standata; a part of a name has to match one material only. The charged defect formation energy notebook takes a matching Standata material first and uses load_material only when there is none. The surface energy, interfacial energy, HOMO-LUMO and MLFF relaxation notebooks search FOLDER, then the account's materials.
A notebook that submits a job saves the material to the account first, reusing a material with the same structure if the account already has one. Notebooks that work on several materials take them as a materials set, by MATERIAL_SET, or as a list of names.
3.3. Workflow and application¶
APPLICATION_NAME is the simulation engine, such as "espresso" (Quantum ESPRESSO) or "nwchem", and WORKFLOW_SEARCH_TERM the file name of the workflow in Standata. Where a notebook offers variants of its workflow, CALCULATION_TYPE or RELAXATION_TYPE selects one.
ADD_RELAXATION = True adds a structural relaxation before the calculation, as in Structural Relaxation.
The surface energy, interfacial energy and formation energy notebooks take their reference energies from total energies already calculated on the platform, the one with the highest precision. BULK_TOTAL_ENERGY_SOURCE and ELEMENTAL_TE_SOURCE select whose: "public" from any owner and "curators" from the curators; "my_account" takes the user's own account in the surface and interfacial energy notebooks, and the selected account or the curators in the formation energy notebook.
3.4. Method and model¶
MODEL_SUBTYPE and FUNCTIONAL set the Density Functional Theory (DFT) model, such as "gga" with "pbe", and PSEUDOPOTENTIAL_TYPE the pseudopotentials: ultrasoft ("us"), norm-conserving ("nc") or projector augmented wave ("paw"). A notebook without these variables keeps the model of its workflow.
The notebooks in the local subfolder use a machine-learned force field instead: MACE_MODEL_FAMILY and MACE_MODEL select the model, and MACE_DEVICE the device, "cpu" or "cuda".
3.5. K-points and paths¶
The *_KGRID variables set the k-point grid of one step of the workflow: RELAXATION_KGRID the relaxation, SCF_KGRID the self-consistent step, NSCF_KGRID the non-self-consistent step. With None, a grid is the workflow's default, set by the number of k-points per reciprocal atom (KPPRA); the defect formation energy notebooks take the grid of the reference job instead, and analyze_convex_hull.ipynb reads the finished job with the highest precision. K-point Convergence shows how to choose a grid.
KPATH is the path of a band structure through the Brillouin zone, as a list of points with the number of steps to each. The phonon notebooks set their q-point grids and path the same way, with PHONON_QGRID, DOS_QGRID and QPATH.
3.6. Cutoffs and engine input¶
ECUTWFC and ECUTRHO are the plane-wave cutoffs of the wavefunctions and of the charge density, in Ry. ADDITIONAL_PARAMETERS adds Quantum ESPRESSO input values, in the format of its comment. The custom calculation notebooks take a whole script instead, USER_SCRIPT.
3.7. Method-specific options¶
Some notebooks have options of their own, explained on each notebook's page:
- magnetism:
STARTING_MAGNETIZATIONper species; - Hubbard U:
USE_DFT_UandHUBBARD_Uper species; - convergence: the converged parameter, its start and step, and
TOLERANCE; - defects:
DEFECT_CONFIGS, supercell sizes,CHARGESandCHEMICAL_POTENTIALS; - interfaces: the labeled part of each side, such as
LEFT_SIDE_PARTorSEMICONDUCTOR_PART; - reaction paths: the number of images
N_IMAGES, or the atom pairs and forces of the artificial force; - scans and spectra:
SCALE_FACTORSof the equation of state, the energy grid of the dielectric function, the post-processed properties.
3.8. Compute resources¶
With CLUSTER_NAME = None, the job goes to the first cluster that client.clusters.list() returns; a full or partial hostname selects another. QUEUE_NAME is one of the queues, and PPN the number of cores, as in Compute Parameters. TIME_LIMIT, where a notebook has it, is the wall-time limit of the job as "hh:mm:ss".
3.9. Job and polling¶
MY_WORKFLOW_NAME names the workflow and starts the name of the job; most notebooks add the material's formula and timestamp, the time of the run. POLL_INTERVAL is the time in seconds between two checks of the job status.
4. Run the job and read the results¶
A notebook that submits a job creates it from the material, the workflow and the compute configuration, submits it, and checks its status until it finishes. The job is listed in the Jobs Explorer as well.
The last section of the notebook reads the properties of the finished job and plots or prints them. The same results are on the job's Results tab.