qtcad.atoms.rough_surface module

Generator of random rough surfaces to model realistic atomic heterointerfaces.

class qtcad.atoms.rough_surface.RoughSurface(hurst: float = 0.3, mean: float = 0.0, rms: float = 1e-09, lmin: float = 2e-10, lmax: float = 2e-08, m: int = 14, rng_seed: int = None)

Bases: RoughSurface

Random and isotropic rough planar surface with a fractal character used to model rough atomic heterointerfaces.

Attributes:
  • hurst (float) – Hurst exponent \(H\) of the rough surface; the fractal dimension of the rough surface is given by \(3-H\).

  • mean (float) – Mean height of the rough surface.

  • rms (float) – Root-mean-square deviation of the rough surface relative to its mean height.

  • lmin (float) – Minimal sampled wavelength for the elementary waves whose sum defines the rough surface; should be on the order of the interatomic distance.

  • lmax (float) – Maximal sampled wavelength for the elementary waves whose sum defines the rough surface; set by experimental fabrication processes such as chemical-mechanical planarization.

  • k (Numpy.ndarray) – Matrix whose rows are the Cartesian coordinates of the sampled wavevectors.

  • amplit (Numpy.ndarray) – Vector of random amplitudes for each sampled wavevector.

  • phi (Numpy.ndarray) – Vector of random phases for each sampled wavevector.

__init__(hurst: float = 0.3, mean: float = 0.0, rms: float = 1e-09, lmin: float = 2e-10, lmax: float = 2e-08, m: int = 14, rng_seed: int = None) None
Parameters:
  • hurst (float, optional) – Hurst exponent \(H\) of the rough surface; the fractal dimension of the rough surface is given by \(3-H\). Default: 0.3.

  • mean (float, optional) – Mean height of the rough surface. Default: 0.0.

  • rms (float, optional) – Root-mean-square deviation of the rough surface relative to its mean height. Default: 1e-9.

  • lmin (float, optional) – Minimal sampled wavelength for the elementary waves whose sum defines the rough surface; should be on the order of the interatomic distance or less. Default: 2e-10.

  • lmax (float, optional) – Maximal sampled wavelength for the elementary waves whose sum defines the rough surface; set by experimental fabrication processes such as chemical-mechanical planarization. Default: 2e-8.

  • m (int, optional) – Base-2 logarithm of the number of sampled wavevectors. Default: 14.

  • rng_seed (int, optional) – Seed for the random number generator used to construct the random rough surface. If None, the seed is set from fresh, unpredictable entropy from the operating system. Default: None.

plot(x: ndarray, y: ndarray, type: str = '2D', path: str = None, show_figure: bool = True) ndarray

Plot the rough surface.

Parameters:
  • x (Numpy.ndarray) – Vector of \(x\) positions at which the height of the rough surface is to be plotted.

  • y (Numpy.ndarray) – Vector of \(y\) positions at which the height of the rough surface is to be plotted.

  • type (str, optional) – Type of plot to be produced; “2D” for a 2D contour plot and “3D” for a 3D surface plot. Default: “2D”.

  • path (str, optional) – Path in which the plot is saved in .png format. If None, no file is saved. Default: None.

  • show_figure (bool, optional) – Whether the plot is shown. Default: True.

Returns:

Numpy.ndarray – Matrix of the height of the rough surface at the specified positions in the meshgrid format.