QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: malay srivastava on March 12, 2021, 22:12

Title: Mobility Isotropic scattering
Post by: malay srivastava on March 12, 2021, 22:12
sir,

I was trying to run the example script given in mobility isotropic scattering, but it gives the following error. Please suggest.
NL.ComputerScienceUtilities.Exceptions.NLValueError: The length of 'inverse_relaxation_time' does not match the length of 'energies'.
Title: Re: Mobility Isotropic scattering
Post by: Tue Gunst on April 27, 2021, 13:28
Dear Maley,
I assume that you refer to the script "mobility_isotropic_scattering_rate.py" in the manual.
Specifically last shared script here:
https://docs.quantumatk.com/manual/Types/Mobility/Mobility.html

This script runs (takes a few seconds) correctly as far as I can see so I assume that you modified it?
The requirement on the isotropic scattering rate if you want to modify the script is that it is either the same length as the energies list or a constant.
In the example
energies=numpy.linspace(-0.05, 0.05, 100)*eV
so the scattering rate needs to be 100 points long. The intended use case is where you have an analytical expression for the scattering rate as a function of energy - then you evaluate that expression in the chosen energies and use the result in the Mobility object.
Alternatively you can set the scattering rate to a constant - then the scattering rate is assumed constant as a function of energy.