Skip to content

Add Maxwell-Boltzmann Thermal Disorder to a Material

1. Introduction

Add Maxwell-Boltzmann thermal disorder to a material: each atom is displaced at random, with a variance proportional to kT/m, where T is a temperature-like parameter and m the atomic mass.

2. Open the notebook

In JupyterLite, the notebook is made/create_maxwell_disorder.ipynb, entry 5.1.1 "Maxwell-Boltzmann thermal disorder" 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
MATERIAL_INDEX = 0

# Temperature-like disorder parameter, close to temperature in eV.
DISORDER_PARAMETER = 3.0

# Random seed for reproducibility (set to None for random behavior)
RANDOM_SEED = 0

# Whether to use mass-dependent displacement (kT/m) or mass-independent (kT)
USE_MASS_DEPENDENT_DISPLACEMENT = True

# Optional: Create a supercell before applying disorder
CREATE_SUPERCELL = False
SUPERCELL_MATRIX = [[3, 0, 0], [0, 3, 0], [0, 0, 3]]

MATERIAL_INDEX picks the input material to use.

DISORDER_PARAMETER is the temperature-like parameter T. USE_MASS_DEPENDENT_DISPLACEMENT = False makes the variance independent of the atomic mass. RANDOM_SEED fixes the displacements; with None, each run draws new ones.

CREATE_SUPERCELL = True builds the supercell SUPERCELL_MATRIX before the atoms are displaced.

4. Run and read the result

Run the notebook with Run > Run All. The notebook prints the number of atoms, shows the displaced material, names it <material> + Maxwell Disorder (T=<DISORDER_PARAMETER>) and passes it back with set_materials, as in Structure Notebooks.

5. Interactive JupyterLite notebook

The interactive JupyterLite notebook for adding thermal disorder can be accessed below.