Author Topic: I-V curve tutorial problem  (Read 14482 times)

0 Members and 1 Guest are viewing this topic.

Offline hasanahmad

  • Regular QuantumATK user
  • **
  • Posts: 5
  • Reputation: 0
    • View Profile
I-V curve tutorial problem
« on: January 8, 2012, 21:34 »
I am using the mini-tutorial for I-V curve
http://www.quantumwise.com/publications/tutorials/mini-tutorials/98-i-v-curve-and-voltage-drop#appendix

and have downloaded the 'lih2li_iv_scf.nc' file and using the 'lih2li_iv_analysis.py' file to run it, and I am getting the error:

Traceback (most recent call last):
  File "c:\users\hasan~1\appdata\local\temp\1399686007874424.py", line 14, in <module>
    calculator = configuration.calculator() 
AttributeError: 'list' object has no attribute 'calculator'


I have even tried with the absolute path-name of the files.

What could possibly have gone wrong?

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5416
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: I-V curve tutorial problem
« Reply #1 on: January 9, 2012, 00:38 »
Apologies, a small typo in the script, which was updated recently, caused this. Try again - should be fine now.   When downloading the script again, make sure you don't get a local cached version. The mistake was on line 8, which should have been
Code: python
configurations = [configurations[j] for j in numpy.argsort(biases)]

Offline hasanahmad

  • Regular QuantumATK user
  • **
  • Posts: 5
  • Reputation: 0
    • View Profile
Re: I-V curve tutorial problem
« Reply #2 on: January 9, 2012, 03:08 »
Thank you. It solved the problem.

Offline dhurba

  • Heavy QuantumATK user
  • ***
  • Posts: 48
  • Country: in
  • Reputation: 0
    • View Profile
Re: I-V curve tutorial problem
« Reply #3 on: January 9, 2012, 06:07 »
I am getting this Error after the above step . ...Is it not possible with EHT ?

+------------------------------------------------------------------------------+
| NanoLanguageScript execution started                                         |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|                                                                              |
| Atomistix ToolKit 11.8.0 [Build 308f600]                                     |
|                                                                              |
+------------------------------------------------------------------------------+
Traceback (most recent call last):
  File "/tmp/1360052463028704.py", line 18, in <module>
    zero_bias_potential = EffectivePotential(configuration)
  File "./zipdir/NL/Analysis/EffectivePotential.py", line 37, in __init__
  File "./zipdir/NL/Analysis/Analysis.py", line 74, in __init__
  File "./zipdir/NL/Analysis/Analysis.py", line 66, in _supportConfigurationWithCalculator
  File "./zipdir/NL/Analysis/Analysis.py", line 52, in _supportCalculator
NL.ComputerScienceUtilities.Exceptions.NLTypeError: The DeviceHuckelCalculator does not support calculation of EffectivePotential.
+------------------------------------------------------------------------------+
| NanoLanguageScript execution finished                                        |
+------------------------------------------------------------------------------+
« Last Edit: January 9, 2012, 07:12 by dhurba »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5416
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: I-V curve tutorial problem
« Reply #4 on: January 9, 2012, 14:50 »
For Huckel you can use the ElectrostaticDifferencePotential instead, this is perhaps an even better choice, in fact, also for DFT (although the qualitative picture tends to be very similar for EffectivePotential).

Offline dhurba

  • Heavy QuantumATK user
  • ***
  • Posts: 48
  • Country: in
  • Reputation: 0
    • View Profile
Re: I-V curve tutorial problem
« Reply #5 on: January 30, 2012, 06:30 »
For Huckel you can use the ElectrostaticDifferencePotential instead, this is perhaps an even better choice, in fact, also for DFT (although the qualitative picture tends to be very similar for EffectivePotential).


So i should add TransmissonSpectrum Also when adding ElectrostaticDifferencePotential in the script generator  ?

What is the meaning of the line "  calculator(electrode_voltages=(0.5*bias,-0.5*bias)), " ?


Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5416
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: I-V curve tutorial problem
« Reply #6 on: January 30, 2012, 10:58 »
1) If you want to calculate it, yes.

2) This sets the bias.


Offline baizq

  • QuantumATK Guru
  • ****
  • Posts: 100
  • Country: us
  • Reputation: 3
    • View Profile
Re: I-V curve tutorial problem
« Reply #7 on: May 7, 2012, 12:34 »
Apologies, a small typo in the script, which was updated recently, caused this. Try again - should be fine now.   When downloading the script again, make sure you don't get a local cached version. The mistake was on line 8, which should have been
Code: python
configurations = [configurations[j] for j in numpy.argsort(biases)]
Yes, I have also encountered the same error and this modification solves the problem. Why not changing the iv-curve and voltage-drop tutorial as well... Besides...just for kidding, why my account level drops from heavy ATK user to regular ATK user...
« Last Edit: May 7, 2012, 12:36 by baizq »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5416
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: I-V curve tutorial problem
« Reply #8 on: May 7, 2012, 15:47 »
Yes of course - I was certain I did already...? But now it is fixed, for sure!

Edit: Ah, I had changed it in the downloadable script, but not on the page. The danger of having the same source in two places...

Sorry for dropping your rating, we adjusted the levels a bit to better reflect the intensity with which people interact with the Forum. In the beginning we were a bit generous with how many posts you needed to get a higher status, but then we got a top-heavy distribution of profiles.

Offline baizq

  • QuantumATK Guru
  • ****
  • Posts: 100
  • Country: us
  • Reputation: 3
    • View Profile
Re: I-V curve tutorial problem
« Reply #9 on: May 8, 2012, 04:51 »
And there might still be some mistakes within the script if we divided the previously converged scf run for each voltage into separate .nc files. I have substituted the first 6 lines in the script with
Code
# Define input and output NetCDF files here   
scf_filename = "CMS-Ag-p_scf_%g.nc.nc" 
analysis_filename = "CMS-Ag-p_analysis.nc"   
  
biases = [0, 0.1, 0.2, 0.3] 
# Read configurations from NetCDF files 
configurations = [] 
for bias in biases: 
     configurations.append(nlread(scf_filename % bias, DeviceConfiguration)[0])
And the program still returns error message when the running nearly ends.
Code
Traceback (most recent call last):
  File "iv-voltage_drop.py", line 48, in <module>
    geometry = nlread(scf_filename, DeviceConfiguration, read_state = False)[0]  
  File "./zipdir/NL/IO/NLSaveUtilities.py", line 244, in nlread
NL.ComputerScienceUtilities.Exceptions.NLValueError: The filename, CMS-Ag-p_scf_%g.nc, was not found - please check correct path and name.
The error might comes from the fact that the nlread command has not been incorporated into the loop over %g... so it seems not sufficient to only subsitute the first six lines...then how should we modify the script...

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5416
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: I-V curve tutorial problem
« Reply #10 on: May 8, 2012, 05:16 »
Yes, I see. You should also modify line 45 in the original script to be
Code
geometry = nlread(scf_filename % 0, DeviceConfiguration, read_state = False)[0] 
(Do you mean to have .nc.nc in the scf_filename?)