QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: Sabyasachi Sen on December 22, 2012, 08:56

Title: the script is not working
Post by: Sabyasachi Sen on December 22, 2012, 08:56
if I write a script with following lines for getting spin polarized current for a series of bias(using single .nc file,

t_list = nlread('myfile.nc', TransmissionSpectrum)
for t in t_list:
     print t.bias(), t.current(Spin.Up), t.current(Spin.Down)

then we are getting the following errors.

Traceback (most recent call last):
  File "/tmp/2852876685689547.py", line 5, in <module>
    print t.bias(),t.current(Spin.Up),t.current(Spin.Down)
  File "./zipdir/NL/Analysis/TransmissionSpectrum.py", line 368, in current
  File "./zipdir/NL/Analysis/TransmissionSpectrum.py", line 816, in checkElectrodeVoltages
NL.ComputerScienceUtilities.Exceptions.NLValueError: The electrode voltages must be given as two physical quantities with the unit Volt.

Please help us resolve the issue.
Title: Re: the script is not working
Post by: kstokbro on December 23, 2012, 00:23
should be:

t_list = nlread('myfile.nc', TransmissionSpectrum)
for t in t_list:
     print t.bias(), t.current(spin=Spin.Up), t.current(spin=Spin.Down)