# Mobility¶

class Mobility(configuration, electron_phonon_coupling=None, kpoints=None, method=None, temperature=None, phonon_modes=None, electron_bands=None, fermi_shift=None, energies=None, inverse_relaxation_time=None, mobility_object=None, integration_method=None, refinement=None, relaxation_time_approximation=None, calculate_hall_coefficients=None, energy_broadening=None)

Analysis class for calculating the mobility for a bulk configuration.

Parameters: configuration (BulkConfiguration) – The bulk configuration for which to calculate the mobility. electron_phonon_coupling (ElectronPhononCoupling) – An electron-phonon coupling object used for calculating mobilities. When method=Full, electron_phonon_coupling must be provided. method (Full | Isotropic.) – Keyword specifying if the results should be calculated with the full electron-phonon coupling including angular dependence (Full) or with an isotropic scattering rate (Isotropic). When method=Full, electron_phonon_coupling must be provided. When method=Isotropic, kpoints must be provided together with energies and inverse_relaxation_time. kpoints (MonkhorstPackGrid | RegularKpointGrid | list of list of float) – List of fractional k-points. When method=Isotropic, kpoints must be provided. Default: None. temperature (PhysicalQuantity of type temperature) – The temperature for the thermal smearing of the Bose and Fermi distributions. Default: 300 * Kelvin phonon_modes (list of ints | All) – Phonon modes to include as a list of indices or All. Default: All (Include all phonon modes available in the electron_phonon_coupling) electron_bands (list of int | All) – The band indices of the Bloch states to include. Default: All (Include all bands available in the electron_phonon_coupling) fermi_shift (PhysicalQuantity of type energy) – The Fermi shift. Default: 0.0 * eV energies (PhysicalQuantity of type energy) – List of energies for which to define the scattering rate. This parameter is only used, if method=Isotropic. Default: numpy.linspace(-0.5,0.5,100)*eV inverse_relaxation_time (PhysicalQuantity of type energy) – List of scattering rates corresponding to the provided energies, or a constant scattering rate. If a list is provided the length must be the same as the energies. If a mobility_object is also provided, the inverse_relaxation_time will be added to the scattering rate obtained from the mobility_object. This parameter is only used if method=Isotropic. Default: 0.0/Second mobility_object (Mobility) – A mobility object calculated with the Full method. This can be used to calculate the scattering rate. If a inverse_relaxation_time is also provided, the inverse_relaxation_time will be added to the scattering rate obtained from the mobility_object. integration_method (GaussianBroadening() | TetrahedronMethod) – The method to use for calculating the q-integral. Default: GaussianBroadening(3e-2 * eV) refinement (Positive float) – The number of times the q-grid is refined in each direction. Default: 1 (no interpolation) calculate_hall_coefficients (bool.) – Boolean to determine if the Hall coefficients should be calcuated or not. Default: True energy_broadening (PhysicalQuantity of type energy) – Deprecated since version 2018.0. The width of the Gaussian function approximating the delta-function. Default: 3e-2 * eV relaxation_time_approximation (not used) – Deprecated since version 2017.0: Should no longer be used.
carrierDensities(contribution=None)
Parameters: contribution (All | Sum | Hole | Electron.) – The contribution to the carrier density. This can be either All, Sum, Hole, or Electron. Default: All The calculated carrier density. If ‘contribution’ is Hole or Electron, the hole or electron carrier density is returned. If ‘contribution’ is All, a list is returned with the calculated hole- and electron carrier densities as the first and second element. In case of Sum, the total carrier density is returned. PhysicalQuantity with the unit Meter**-3
conductivity(contribution=None)
Parameters: contribution (All | Sum | Hole | Electron.) – The contribution to the conductivity. This can be either All, Sum, Hole, or Electron. Default: All The calculated conductivity. If ‘contribution’ is Hole or Electron, the hole or electron conductivity is returned. If ‘contribution’ is All, a list is returned with the calculated hole- and electron conductivities as the first and second element. In case of Sum, the total conductivity is returned. PhysicalQuantity with the unit Siemens / Meter
conductivityTensor(contribution=None)
Parameters: contribution (All | Sum | Hole | Electron.) – The contribution to the conductivity tensor. This can be either All, Sum, Hole, or Electron. Default: All The calculated conductivity tensor. If ‘contribution’ is Hole or Electron, the hole or electron conductivity tensor is returned. If ‘contribution’ is All, a list is returned with the calculated hole- and electron conductivity tensors as the first and second element. In case of Sum, the total conductivity tensor is returned. PhysicalQuantity with the unit Siemens / Meter
eigenvaluesK()
Returns: The electron Bloch state energies for each k-point. The shape is (spin, k-points, electron bands). PhysicalQuantity of type energy
electronBands()
Returns: The band indices of the Bloch states included in the electron-phonon coupling calculation. list of non-negative ints
energies()
Returns: The user inputted energies list with shape (n_energies). PhysicalQuantity of type energy.
energyBroadening()
Returns: The width of the Gaussian function approximating the delta-function, if the integration method is GaussianBroadening. If the TetrahedronMethod is used, it returns 0.0*eV. PhysicalQuantity of type energy
energyZero()

The energy zero is equal to the Fermi level. For fixed spin moment calculations it is the average of the Fermi level for spin up and spin down.

Returns: The energy zero. PhysicalQuantity of type energy
evaluate()
Returns: The calculated hole- and electron mobilities as the first and second element, respectively. PhysicalQuantity with the unit Meter**2 / (Volt * Second)
fermiLevel(spin=None)
fermiShift()
Returns: The Fermi shift. PhysicalQuantity of type energy
firstMomentTensor(contribution=None)
Parameters: contribution (All | Sum | Hole | Electron.) – The contribution to the first moment tensor. This can be either All, Sum, Hole, or Electron. Default: All The calculated first moment tensor. If ‘contribution’ is Hole or Electron, the hole or electron first moment tensor is returned. If ‘contribution’ is All, a list is returned with the calculated hole- and electron first moment tensors as the first and second element. In case of Sum, the total first moment tensor is returned. PhysicalQuantity with the unit Volt * Siemens / (Meter * Kelvin)
generateEnergyDependentInverseRelaxationTime(energies, energy_broadening=None)

Generator method for the inverse relaxation time as a function of energy.

Parameters: energies (PhysicalQuantity of type energy) – The energies to calculate the scattering rate for, given as an energy list. energy_broadening (PhysicalQuantity of type energy) – The energy broadening of delta-fuctions. Default: 3.0e-2*eV The inverse relaxation time. The length is len(energies). PhysicalQuantity of type inverse time.
hallCoefficientTensor()
Returns: The calculated hole- and electron Hall-coefficient tensors as the first and second element of the first entry, respectively. The shape is (carrier type, induced electric field direction, applied charge current density direction, applied magnetic field direction). PhysicalQuantity with the unit Meter**3 / Coulomb
hallConductivityTensor()
Returns: The calculated hole- and electron Hall-conductivity tensors as the first and second element of the first entry, respectively. The shape is (carrier type, charge current density direction, electric field direction, magnetic field direction). PhysicalQuantity with the unit Meter / Coulomb * Siemens**2
integrationMethod()

:returns:The method to use for calculating the q-integral. :rtype GaussianBroadening() | TetrahedronMethod

inverseLifeTime()
Returns: The calculated inverse life time with the shape (spin, phonon modes, k-points, electron bands). PhysicalQuantity of type inverse time
inverseRelaxationTime()
Returns: The calculated inverse relaxation time with the shape (spin, phonon modes, k-points, electron bands). PhysicalQuantity of type inverse time
inverseRelaxationTimeEnergyDependent()
Returns: The calculated or user inputted inverse relaxation time with the shape (n_energies). PhysicalQuantity of type inverse time
kpoints()
Returns: The unreduced fractional k-points. The shape is (k-points, 3). list of lists of floats
metatext()
Returns: The metatext of the object or None if no metatext is present. str | unicode | None
method()
Returns: The method used for the calculation. Either Full or Isotropic. NLFlag
mobility(contribution=None)
Parameters: contribution (All | Sum | Hole | Electron.) – The contribution to the mobility. This can be either All, Sum, Hole, or Electron. Default: All The calculated mobility. If ‘contribution’ is Hole or Electron, the hole or electron mobility is returned. If ‘contribution’ is All, a list is returned with the calculated hole- and electron mobilities as the first and second element. In case of Sum, the total mobility is returned. Notice that the summed mobility is not necessarily equal to the sum of Hole and Electron contributions. PhysicalQuantity with the unit Meter**2 / (Volt * Second)
mobilityTensor(contribution=None)
Parameters: contribution (All | Sum | Hole | Electron.) – The contribution to the mobility tensor. This can be either All, Sum, Hole, or Electron. Default: All The calculated mobility tensors. If ‘contribution’ is Hole or Electron, the hole or electron mobility tensor is returned. If ‘contribution’ is All, a list is returned with the calculated hole- and electron mobility tensors as the first and second element. In case of Sum, the total mobility tensor is returned. Notice that the summed mobility tensor is not necessarily equal to the sum of Hole and Electron contributions. PhysicalQuantity with the unit Meter**2 / (Volt * Second)
nlprint(stream=<open file '<stdout>', mode 'w'>)

Print a string containing an ASCII table with mobility data.

Parameters: stream (A stream that supports strings being written to using 'write'.) – The stream the mobility should be written to. Default: sys.stdout
phononEnergies()
Returns: The phonon energies. The shape is (phonon modes in electron-phonon coupling, q-points). PhysicalQuantity of type energy
phononModes()
Returns: The phonon modes included in the mobility calculation. list of non-negative ints
qpoints()
Returns: The unreduced fractional q-points. The shape is (q-points, 3). list of lists of floats
refinement()
Returns: The number of times the q-grid is refined in each direction. Positive float
resistivityTensor(contribution=None)
Parameters: contribution (All | Sum | Hole | Electron.) – The contribution to the resistivity tensor. This can be either All, Sum, Hole, or Electron. Default: All The calculated resistivity tensor. If ‘contribution’ is Hole or Electron, the hole or electron resistivity tensor is returned. If ‘contribution’ is All, a list is returned with the calculated hole- and electron resistivity tensors as the first and second element. In case of Sum, the total resistivity tensor is returned. PhysicalQuantity with the unit Meter / Siemens
seebeckCoefficient(contribution=None)
Parameters: contribution (All | Sum | Hole | Electron.) – The contribution to the Seebeck coefficient. This can be either All, Sum, Hole, or Electron. Default: All The calculated Seebeck coefficient. If ‘contribution’ is Hole or Electron, the hole or electron Seebeck coefficient is returned. If ‘contribution’ is All, a list is returned with the calculated hole- and electron Seebeck coefficient as the first and second element. In case of Sum, the total Seebeck coefficient is returned. PhysicalQuantity with the unit Volt / Kelvin
seebeckCoefficientTensor(contribution=None)
Parameters: contribution (All | Sum | Hole | Electron.) – The contribution to the Seebeck coefficient tensor. This can be either All, Sum, Hole, or Electron. Default: All The calculated Seebeck coefficient tensor. If ‘contribution’ is Hole or Electron, the hole or electron Seebeck coefficient tensor is returned. If ‘contribution’ is All, a list is returned with the calculated hole- and electron Seebeck coefficient tensor as the first and second element. In case of Sum, the total Seebeck coefficient tensor is returned. PhysicalQuantity with the unit Volt / Kelvin
setMetatext(metatext)

Set a given metatext string on the object.

Parameters: metatext (str | unicode | None) – The metatext string that should be set. A value of “None” can be given to remove the current metatext.
temperature()
Returns: The temperature for the thermal smearing of the Bose and Fermi distributions. PhysicalQuantity of type temperature
thermalConductivity(contribution=None)
Parameters: contribution (All | Sum | Hole | Electron.) – The contribution to the electronic thermal conductivity. This can be either All, Sum, Hole, or Electron. Default: All The calculated electronic thermal conductivity. If ‘contribution’ is Hole or Electron, the hole or electron thermal conductivity is returned. If ‘contribution’ is All, a list is returned with the calculated hole- and electron thermal conductivities as the first and second element. In case of Sum, the total thermal conductivity is returned. PhysicalQuantity with the unit J / (Second * Meter * Kelvin)
thermalConductivityTensor(contribution=None)
Parameters: contribution (All | Sum | Hole | Electron.) – The contribution to the electronic thermal conductivity tensor. This can be either All, Sum, Hole, or Electron. Default: All The calculated electronic thermal conductivity tensor. If ‘contribution’ is Hole or Electron, the hole or electron thermal conductivity tensor is returned. If ‘contribution’ is All, a list is returned with the calculated hole- and electron thermal conductivity tensors as the first and second element. In case of Sum, the total thermal conductivity tensor is returned. PhysicalQuantity with the unit J / (Second * Meter * Kelvin)
updateTransportCoefficients(energies=None, inverse_relaxation_time=None, mobility_object=None, temperature=None, fermi_shift=None, energy_broadening=None)

Function for updating the transport coefficients (mobility, conductivity, resistivity, Seebeck coefficien, Hall conductivity). This function can only be used if method=Isotropic.

Note that by calling this function you will change variables on the object it-self.

Parameters: energies (PhysicalQuantity of type energy) – List of energies for which to define the scattering rate. inverse_relaxation_time (PhysicalQuantity of type energy) – List of scattering rates corrresponding to the provided energies, or a constant scattering rate. If a list is provided the length must be the same as the energies. If a mobility_object is also provided, the inverse_relaxation_time will be added to the scattering rate obtained from the mobility_object. mobility_object (Mobility) – A mobility object calculated with the Full method. This can be used to calculate the scattering rate. If a inverse_relaxation_time is also provided, the inverse_relaxation_time will be added to the scattering rate obtained from the mobility_object. temperature (PhysicalQuantity of type temperature) – The temperature to use. fermi_shift (PhysicalQuantity of type energy) – The Fermi shift. energy_broadening (PhysicalQuantity of type energy.) – The energy broadening of delta-fuctions to use Dictionary with all the updated transport coefficients. dict.
velocitiesK()
Returns: The electron Bloch velocities for each k-point. The shape is (spin, k-points, electron bands, velocity components). PhysicalQuantity with the unit Meter / Second.

## Usage Examples¶

Calculate the mobility of graphene including the full angular dependence of the scattering rates and with the electron-phonon coupling and relaxation time calculated from first-principles:

# -------------------------------------------------------------
# Bulk configuration
# -------------------------------------------------------------
lattice = Hexagonal(2.4612*Angstrom, 6.709*Angstrom)

elements = [Carbon, Carbon]

fractional_coordinates = [[0.0           , 0.0           , 0.5],
[0.333333333333, 0.666666666667, 0.5]]

bulk_configuration = BulkConfiguration(
bravais_lattice=lattice,
elements=elements,
fractional_coordinates=fractional_coordinates
)

# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
numerical_accuracy_parameters = NumericalAccuracyParameters(
k_point_sampling=(5, 5, 1),
)

calculator = LCAOCalculator(
numerical_accuracy_parameters=numerical_accuracy_parameters,
)

bulk_configuration.setCalculator(calculator)
bulk_configuration.update()

# -------------------------------------------------------------
# Hamiltonian derivatives
# -------------------------------------------------------------
hamiltonian_derivatives = HamiltonianDerivatives(
bulk_configuration,
repetitions=(5, 5, 1),
)

# -------------------------------------------------------------
# Dynamical matrix
# -------------------------------------------------------------
dynamical_matrix = DynamicalMatrix(
bulk_configuration,
repetitions=(5, 5, 1),
max_interaction_range=10*Angstrom,
)

# -------------------------------------------------------------
# Electron Phonon Coupling
# -------------------------------------------------------------
k_a = numpy.linspace(0.323333, 0.343333, 11)
k_b = numpy.linspace(0.323333, 0.343333, 11)
k_c = numpy.linspace(0, 0, 1)
kpoints = [[a, b, c] for a in k_a for b in k_b for c in k_c]

q_a = numpy.linspace(-0.02, 0.02, 11)
q_b = numpy.linspace(-0.02, 0.02, 11)
q_c = numpy.linspace(0, 0, 1)
qpoints = [[a, b, c] for a in q_a for b in q_b for c in q_c]

electron_phonon_coupling = ElectronPhononCoupling(
configuration=bulk_configuration,
dynamical_matrix=dynamical_matrix,
hamiltonian_derivatives=hamiltonian_derivatives,
kpoints_fractional=kpoints,
qpoints_fractional=qpoints,
electron_bands=[3, 4],
phonon_modes=All,
energy_tolerance=0.03*eV,
initial_state_energy_range=[-100,100]*eV,
store_dense_coupling_matrices=False,
)

# -------------------------------------------------------------
# Mobility
# -------------------------------------------------------------
mobility = Mobility(
configuration=bulk_configuration,
method=Full,
electron_phonon_coupling=electron_phonon_coupling,
)

nlsave('graphene_method_full.nc', mobility)


mobility.py

Note that the above script only shows the principal work flow for calculating the mobility. For converged calculations, one will often need to use more k-points and q-points in the ElectronPhononCoupling object - see the paper [GMSB16] for details. In order to perform a mobility calculation using the Full method, one needs to input an ElectronPhononCoupling object. While this will result in accurate calculations including the full angular dependece of the scattering rates and relaxation time, it is also a numerically challenging task because the ElectronPhononCoupling object needs to be calculated with many k- and q-points and in addition one needs the DynamicalMatrix and HamiltonianDerivatives objects.

An alternative approach to mobility calculations is available in QuantumATK. By specifying the method keyword to Isotropic and providing an inverse relaxation time like:

mobility = Mobility(
bulk_configuration,
method=Isotropic,
kpoints=MonkhorstPackGrid(10, 10, 10),
energies=numpy.linspace(-0.5, 0.5, 100)*eV,
inverse_relaxation_time=1e10*Second**-1)


it is possible to perform much faster calculations, since it is not required to have an ElectronPhononCoupling. Using the Isotropic method the calculation of both the DynamicalMatrix and HamiltonianDerivatives objects can also be avoided.

Using the Isotropic method will require knowledge of the inverse relaxation time (or scattering rate). This can either be specified as a constant inverse_relaxation_time=1e10 * Second**-1 or as an array with the same length as the provided energies inverse_relaxation_time=numpy.linspace(0, 1e12, 100) * Second**-1. Knowledge of the inverse relaxation time can be obtained from the literature or it can be approximated from a previous Mobility calculation using the Full method, i.e. calculated from an ElectronPhononCoupling object. This can be obtained as:

# Load a mobility object calculated with the Full method.

# Define an energy range.
energies=numpy.linspace(-0.5, 0.5, 100)*eV

# Calculate the inverse relaxation time.
inverse_relaxation_time = mobility.generateEnergyDependentInverseRelaxationTime(energies=energies)


The obtained inverse relaxation time can be input directly to a new Mobility calculation with the Isotropic method. Alternatively, the old Mobility object can be provided as input to a new Mobility calculation:

# Load a mobility object calculated with the Full method.

# Perform and new mobility calculation with the Isotropic method.
mobility = Mobility(
bulk_configuration,
method=Isotropic,
energies=numpy.linspace(-0.5,0.5,100)*eV,
mobility_object=mobility_full)


If both the inverse_relaxation_time and mobility_object are provided, the resulting inverse relaxation time will be the sum of the provided and the one generated from the mobility_object.

A full script for a Mobility calculation using the Isotropic method is provided below using the constant inverse relaxation time approximation:

# -------------------------------------------------------------
# Bulk configuration
# -------------------------------------------------------------
lattice = Hexagonal(2.4612*Angstrom, 6.709*Angstrom)

elements = [Carbon, Carbon]

fractional_coordinates = [[0.0           , 0.0           , 0.5],
[0.333333333333, 0.666666666667, 0.5]]

bulk_configuration = BulkConfiguration(
bravais_lattice=lattice,
elements=elements,
fractional_coordinates=fractional_coordinates
)

# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
numerical_accuracy_parameters = NumericalAccuracyParameters(
k_point_sampling=(5, 5, 1),
)

calculator = LCAOCalculator(
numerical_accuracy_parameters=numerical_accuracy_parameters,
)

bulk_configuration.setCalculator(calculator)
bulk_configuration.update()

# -------------------------------------------------------------
# Mobility
# -------------------------------------------------------------
kpoint_grid = RegularKpointGrid(
ka_range=[0.32, 0.34],
kb_range=[0.32, 0.34],
kc_range=[0.0, 0.0],
na=15,
nb=15,
nc=1,
)

mobility_constant_relaxation_time = Mobility(
configuration=bulk_configuration,
method=Isotropic,
energies=numpy.linspace(-0.05, 0.05, 100)*eV,
inverse_relaxation_time=1e12*Second**-1,
electron_bands=[3,4],
kpoints=kpoint_grid,
temperature=300*Kelvin,
)

nlsave('graphene_constant_relaxation_time.nc', mobility_constant_relaxation_time)


mobility_isotropic_scattering_rate.py

The script below shows an example of how to calculate the mobility with an energy dependent inverse relaxation time:

# -------------------------------------------------------------
# Bulk configuration
# -------------------------------------------------------------
lattice = Hexagonal(2.4612*Angstrom, 6.709*Angstrom)

elements = [Carbon, Carbon]

fractional_coordinates = [[0.0           , 0.0           , 0.5],
[0.333333333333, 0.666666666667, 0.5]]

bulk_configuration = BulkConfiguration(
bravais_lattice=lattice,
elements=elements,
fractional_coordinates=fractional_coordinates
)

# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
numerical_accuracy_parameters = NumericalAccuracyParameters(
k_point_sampling=(5, 5, 1),
)

calculator = LCAOCalculator(
numerical_accuracy_parameters=numerical_accuracy_parameters,
)

bulk_configuration.setCalculator(calculator)
bulk_configuration.update()

# -------------------------------------------------------------
# Mobility
# -------------------------------------------------------------
kpoint_grid = RegularKpointGrid(
ka_range=[0.32, 0.34],
kb_range=[0.32, 0.34],
kc_range=[0.0, 0.0],
na=15,
nb=15,
nc=1,
)

# Setup energy list.
energies = numpy.linspace(-0.05, 0.05, 100)*eV,

# Setup inverse relaxation time as an array with the same length as the energies.
inverse_relaxation_time = abs(numpy.linspace(-1e12, 1e+12, 100))*Second**-1

mobility_linear_relaxation_time = Mobility(
configuration=bulk_configuration,
method=Isotropic,
energies=energies,
inverse_relaxation_time=inverse_relaxation_time,
electron_bands=[3,4],
kpoints=kpoint_grid,
temperature=300*Kelvin,
)

nlsave('graphene_linear_relaxation_time.nc', mobility_linear_relaxation_time)


mobility_isotropic_scattering_rate2.py

## Notes¶

The mobility module in QuantumATK enables you to calculate the phonon-limited mobility using the semi-classical Boltzmann transport equation (BTE). There are two principle methods to use:

• In order to calculate the mobility from first-principles including the full angular dependence of the electron-phonon scattering, you must use the Full method. In that case you need a BulkConfiguration and a ElectronPhononCoupling object. See Ref. [GMSB16] to get a description of the background theory and results obtained with the Mobility object.

• Assuming an isotropic inverse relaxation time, one can avoid integrations over k,q-space and instead integrate over energy. This leads to much faster mobility calculations since the ElectronPhononCoupling object is no longer needed. Instead you need to provide an inverse relaxation time to the Mobility calculation. The implementation in QuantumATK of the isotropic scattering rate method essentially follows BoltzTrap, Ref. [MS06]. Major differences to the description in Ref. [MS06] are:

1. QuantumATK allows for an energy dependent inverse relaxation time.
2. The band velocities in QuantumATK are calculated using first order pertubation theory and are thus exact and without any problems at band crossings.
3. The energy integrations are performed using the tetrahedron method [BJA94].

 [BJA94] P. E. Blöchl, O. Jepsen, and O. K. Andersen. Improved tetrahedron method for brillouin-zone integrations. Phys. Rev. B, 49:16223–16233, Jun 1994. doi:10.1103/PhysRevB.49.16223.
 [GMSB16] (1, 2) T. Gunst, T. Markussen, K. Stokbro, and M. Brandbyge. First-principles method for electron-phonon coupling and electron mobility: Applications to two-dimensional materials. Phys. Rev. B, 93:035414, Jan 2016. doi:10.1103/PhysRevB.93.035414.
 [MS06] (1, 2) Georg K.H. Madsen and David J. Singh. Boltztrap. a code for calculating band-structure dependent quantities. Computer Physics Communications, 175(1):67 – 71, 2006. doi:http://dx.doi.org/10.1016/j.cpc.2006.03.007.