QuantumATK Forum
QuantumATK => General Questions and Answers => Topic started by: sathyajit on June 17, 2015, 16:48
-
Hi,
I used the script MoS2_FET_Mo_test-3-gatescan-test-3.py to loop over gate bias to get to Vg=0.5V
Now to run Id Vd I am using MoS2_FET_Mo_iv-test-1.py
But it gives the following error
File "MoS2_FET_Mo_iv-test-1.py", line 10
device_configuration = nlread("/home/sathya/.vnl/MoS2_FET/MoS2_FET_Mo_test-3.nc",DeviceConfiguration,trans0.5)[0]
^
SyntaxError: invalid syntax
File "MoS2_FET_Mo_iv-test-1.py", line 10
device_configuration = nlread("/home/sathya/.vnl/MoS2_FET/MoS2_FET_Mo_test-3.nc",DeviceConfiguration,trans0.5)[0]
^
SyntaxError: invalid syntax
+------------------------------------------------------------------------------+
| |
| Atomistix ToolKit 2014.2 [Build 811a2e4] |
| |
+------------------------------------------------------------------------------+
File "MoS2_FET_Mo_iv-test-1.py", line 10
device_configuration = nlread("/home/sathya/.vnl/MoS2_FET/MoS2_FET_Mo_test-3.nc",DeviceConfiguration,trans0.5)[0]
^
SyntaxError: invalid syntax
File "MoS2_FET_Mo_iv-test-1.py", line 10
device_configuration = nlread("/home/sathya/.vnl/MoS2_FET/MoS2_FET_Mo_test-3.nc",DeviceConfiguration,trans0.5)[0]
^
SyntaxError: invalid syntax
File "MoS2_FET_Mo_iv-test-1.py", line 10
device_configuration = nlread("/home/sathya/.vnl/MoS2_FET/MoS2_FET_Mo_test-3.nc",DeviceConfiguration,trans0.5)[0]
^
SyntaxError: invalid syntax
File "MoS2_FET_Mo_iv-test-1.py", line 10
device_configuration = nlread("/home/sathya/.vnl/MoS2_FET/MoS2_FET_Mo_test-3.nc",DeviceConfiguration,trans0.5)[0]
^
SyntaxError: invalid syntax
File "MoS2_FET_Mo_iv-test-1.py", line 10
device_configuration = nlread("/home/sathya/.vnl/MoS2_FET/MoS2_FET_Mo_test-3.nc",DeviceConfiguration,trans0.5)[0]
^
SyntaxError: invalid syntax
File "MoS2_FET_Mo_iv-test-1.py", line 10
device_configuration = nlread("/home/sathya/.vnl/MoS2_FET/MoS2_FET_Mo_test-3.nc",DeviceConfiguration,trans0.5)[0]
How to resolve the issue ?
Regards
Sathyajit
-
This is a syntax error. The correct syntax for nlread is
device_configuration = nlread("ncfile.nc", DeviceConfiguration, "object_id")[0]
where "object_id" should be a string (and may often be left out).
Therefore,
device_configuration = nlread("/home/sathya/.vnl/MoS2_FET/MoS2_FET_Mo_test-3.nc",DeviceConfiguration,trans0.5)[0]
should be
device_configuration = nlread("/home/sathya/.vnl/MoS2_FET/MoS2_FET_Mo_test-3.nc", DeviceConfiguration, "trans0.5")[0]
-
Hi Jess,
I changed it to "trans0.5" but now the error is :
Traceback (most recent call last):
File "MoS2_FET_Mo_iv-test-1.py", line 10, in <module>
device_configuration = nlread("/home/sathya/.vnl/MoS2_FET/MoS2_FET_Mo_test-3.nc",DeviceConfiguration,"trans0.5")[0]
IndexError: list index out of range
Traceback (most recent call last):
File "MoS2_FET_Mo_iv-test-1.py", line 10, in <module>
device_configuration = nlread("/home/sathya/.vnl/MoS2_FET/MoS2_FET_Mo_test-3.nc",DeviceConfiguration,"trans0.5")[0]
IndexError: list index out of range
Traceback (most recent call last):
File "MoS2_FET_Mo_iv-test-1.py", line 10, in <module>
device_configuration = nlread("/home/sathya/.vnl/MoS2_FET/MoS2_FET_Mo_test-3.nc",DeviceConfiguration,"trans0.5")[0]
IndexError: list index out of range
Traceback (most recent call last):
File "MoS2_FET_Mo_iv-test-1.py", line 10, in <module>
device_configuration = nlread("/home/sathya/.vnl/MoS2_FET/MoS2_FET_Mo_test-3.nc",DeviceConfiguration,"trans0.5")[0]
IndexError: list index out of range
+------------------------------------------------------------------------------+
| |
| Atomistix ToolKit 2014.2 [Build 811a2e4] |
| |
+------------------------------------------------------------------------------+
Traceback (most recent call last):
File "MoS2_FET_Mo_iv-test-1.py", line 10, in <module>
device_configuration = nlread("/home/sathya/.vnl/MoS2_FET/MoS2_FET_Mo_test-3.nc",DeviceConfiguration,"trans0.5")[0]
IndexError: list index out of range
Traceback (most recent call last):
File "MoS2_FET_Mo_iv-test-1.py", line 10, in <module>
device_configuration = nlread("/home/sathya/.vnl/MoS2_FET/MoS2_FET_Mo_test-3.nc",DeviceConfiguration,"trans0.5")[0]
IndexError: list index out of range
Traceback (most recent call last):
File "MoS2_FET_Mo_iv-test-1.py", line 10, in <module>
device_configuration = nlread("/home/sathya/.vnl/MoS2_FET/MoS2_FET_Mo_test-3.nc",DeviceConfiguration,"trans0.5")[0]
IndexError: list index out of range
Traceback (most recent call last):
File "MoS2_FET_Mo_iv-test-1.py", line 10, in <module>
device_configuration = nlread("/home/sathya/.vnl/MoS2_FET/MoS2_FET_Mo_test-3.nc",DeviceConfiguration,"trans0.5")[0]
IndexError: list index out of range
I am now attaching a snapshot of my lab floor for the .nc file.
-
OK, is see the problem. The issue is that you did not name the object_id "trans0.5". Instead, you have used "trans0.5 V". The strings used for nlread must exactly match what you used for nlsave:
device_configuration = nlread("/home/sathya/.vnl/MoS2_FET/MoS2_FET_Mo_test-3.nc", DeviceConfiguration, "trans0.5 V")[0]
-
Hi,
I tried using "trans 0.5 V" and "trans0.5V" and "trans0.5" , but still I face the same issue. Kindly help me out.
Regards
Sathyajit
-
You need to use the exact same string (whatever it is) for reading the nc file as you used for writing the nc file.