QuantumATK Forum
QuantumATK => General Questions and Answers => Topic started by: rose on March 12, 2015, 22:46
-
Hi
In the short tutorial admittance, i add the path to the system and then run the code (CNT_admittance.py). unfortunetly i got error as follow:
eps = 1e-5*eV
NameError: name 'eV' is not defined
by removing eV from the admittance... the code is running and then error as follow:
TE = boltzmann_constant*T
NameError: global name 'boltzmann_constant' is not defined
and by defining boltzmann_constant in admitance and then running following error appear:
0 = Ef-omega-8*TE
File ".\zipdir\NL\CommonConcepts\PhysicalQuantity.py", line 425, in __sub__
File ".\zipdir\NL\CommonConcepts\PhysicalQuantity.py", line 754, in inUnitsOf
NL.ComputerScienceUtilities.Exceptions.NLValueError: Unable to convert unit value 0.2064 K to an incompatible unit Hartree.
which apper to be happen due to not defining proper unit in previous parts.
How can i correct the CNT_admitance.py or admitance.py
?
thanks
-
I add all two files togeather now a new error:
YD = displacementAdmittance(average_fermi_level, omega, T, N, H, S, Sigma_L, Sigma_R)
File "c:\users\utabco\appdata\local\temp\2897894476902862.py", line 75, in displacementAdmittance
Gamma_L = 1j*(Sigma_L-numpy.conj(Sigma_L.transpose()))
File ".\zipdir\NL\CommonConcepts\PhysicalQuantity.py", line 425, in __sub__
File ".\zipdir\NL\CommonConcepts\PhysicalQuantity.py", line 753, in inUnitsOf
File ".\zipdir\NL\CommonConcepts\PhysicalQuantity.py", line 249, in unit
AttributeError: 'PhysicalQuantity' object has no attribute '_PhysicalQuantity__unit'
now what??
-
If "eV" is undefined the you definitely have a problem. Also boltzmann_constant should be defined (when you defined it yourself you forgot the unit). I'm guessing you just need to add
from NanoLanguage import *
at the top of the script. Try that, and we'll check on updating the tutorial properly!
-
thanks for the response, as i mentioned i overcome that problem by adding up to individual code to single one. Now i can not understand why Gamma_L is asking for unit or something like that???!!!
___________________________________________________________________________________
YD = displacementAdmittance(average_fermi_level, omega, T, N, H, S, Sigma_L, Sigma_R)
File "c:\users\utabco\appdata\local\temp\2897894476902862.py", line 75, in displacementAdmittance
Gamma_L = 1j*(Sigma_L-numpy.conj(Sigma_L.transpose()))
File ".\zipdir\NL\CommonConcepts\PhysicalQuantity.py", line 425, in __sub__
File ".\zipdir\NL\CommonConcepts\PhysicalQuantity.py", line 753, in inUnitsOf
File ".\zipdir\NL\CommonConcepts\PhysicalQuantity.py", line 249, in unit
AttributeError: 'PhysicalQuantity' object has no attribute '_PhysicalQuantity__unit'
___________________________________________________________________________________
what it means? and how can i overcome this error?
thanks,
-
Please check again the Accessing ATK internal variables tutorial and in particular the AC conductance chapter here http://quantumwise.com/documents/tutorials/latest/LowLevelEntities/index.html/chap.acconductance.html
Unfortunately an old version of the tutorial was online.
Now, the entire tutorial, including scripts, has been updated.
note, you may need to clear your browser cache.
-
thanks...i am running it and till now no problem...Nice Work...