qimpy.transport.material.Material

class Material(*, wk, nk, n_bands, n_dim, process_grid, checkpoint_in=(None, ''))

Bases: TreeNode

Base class / interface for material specifications.

Parameters:
  • wk (float) –

  • nk (int) –

  • n_bands (int) –

  • n_dim (int) –

  • process_grid (ProcessGrid) –

  • checkpoint_in (CheckpointPath) –

__init__(*, wk, nk, n_bands, n_dim, process_grid, checkpoint_in=(None, ''))

Initialize material parameters, typically used from a derived class.

Parameters:
  • wk (float) –

  • nk (int) –

  • n_bands (int) –

  • n_dim (int) –

  • process_grid (ProcessGrid) –

  • checkpoint_in (CheckpointPath) –

Methods

__init__

Initialize material parameters, typically used from a derived class.

add_child

Construct child object self.`attr_name` of type cls.

add_child_one_of

Invoke add_child on one of several child options in args.

get_contactor

Return a function (or callable object) to calculate the distribution function at a contact with orientation n and specified keyword arguments.

get_observable_names

Return string of observables, comma seperated, specific to each material.

get_observables

Return tensor of complex conjugates of all observables specific to each material.

get_reflector

Return a function (or callable object) to calculate reflections for a sequence of surface points with unit normals (Nsurf x 2).

measure_observables

Retrun density and flux of observables, (Nx x Ny x No) for density and (Nx x Ny x No x 2) for flux.

rho_dot

Return material contribution to drho/dt.

save_checkpoint

Save self and all children in hierarchy to cp_path.

Attributes

transport_velocity

Effective velocity for each density-matrix component.

comm

Communicator for reciprocal-space split over k

k_division

Division of k-points over MPI

k_mine

slice of k on current process

n_bands

number of bands at each k

n_dim

dimensionality of material (2 or 3)

wk

Brillouin zone integration weight

k

nk x n_dim wave vectors

E

nk x n_bands energies

v

nk x n_bands x n_dim velocities in plane

rho0

nk x n_bands x n_bands initial density matrix

child_names

Names of attributes with child objects.

abstract get_contactor(n, **kwargs)

Return a function (or callable object) to calculate the distribution function at a contact with orientation n and specified keyword arguments. For an Nsurf x 2 tensor n, the function should take time t as an input and return the corresponding Nsurf x Nkbb_mine distribution function.

Parameters:

n (Tensor) –

Return type:

Callable[[float], Tensor]

abstract get_observable_names()

Return string of observables, comma seperated, specific to each material.

Return type:

list[str]

abstract get_observables(Nkbb, t)

Return tensor of complex conjugates of all observables specific to each material. (No x Nkbb_mine) where No is number of observables.

Parameters:
  • Nkbb (int) –

  • t (float) –

Return type:

Tensor

abstract get_reflector(n)

Return a function (or callable object) to calculate reflections for a sequence of surface points with unit normals (Nsurf x 2). This function will be called with a Nghost x Nsurf x Nkbb_mine tensor, and the reflection should be calculated pointwise in real-space with output of the same dimensions.

Parameters:

n (Tensor) –

Return type:

Callable[[Tensor], Tensor]

measure_observables(rho, t)

Retrun density and flux of observables, (Nx x Ny x No) for density and (Nx x Ny x No x 2) for flux.

Parameters:
  • rho (Tensor) –

  • t (float) –

Return type:

tuple[Tensor, Tensor]

abstract rho_dot(rho, t)

Return material contribution to drho/dt. This should include scattering and any coherent evolution in band space.

Parameters:
  • rho (Tensor) –

  • t (float) –

Return type:

Tensor

E: Tensor

nk x n_bands energies

comm: Comm

Communicator for reciprocal-space split over k

k: Tensor

nk x n_dim wave vectors

k_division: TaskDivision

Division of k-points over MPI

k_mine: slice

slice of k on current process

n_bands: int

number of bands at each k

n_dim: int

dimensionality of material (2 or 3)

rho0: Tensor

nk x n_bands x n_bands initial density matrix

property transport_velocity: Tensor

Effective velocity for each density-matrix component. This always has dimensions (nk_mine * (n_bands**2)) x 2.

v: Tensor

nk x n_bands x n_dim velocities in plane

wk: float

Brillouin zone integration weight