Author Topic: GATE SCAN ATTACHMENT  (Read 6885 times)

0 Members and 1 Guest are viewing this topic.

Offline venkata reddy mallidi

  • Regular QuantumATK user
  • **
  • Posts: 6
  • Country: in
  • Reputation: 0
    • View Profile
GATE SCAN ATTACHMENT
« on: June 20, 2014, 10:40 »
I am using the tutorial of si nanowire fet to analyse for InAs nanowire. but gatescan script im using here is not running plz help me to analyse gate scan for InAs nanowire and the error is

File “c:\users\mamta\appdata\local\temp\5203870735644037.py”,line16
New_region = [m(value = gate_voltage) for m in metallic_region]
                     ^
IndentationError: expected an indented block

Offline kstokbro

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 392
  • Reputation: 13
    • View Profile
    • QuantumWise
Re: GATE SCAN ATTACHMENT
« Reply #1 on: June 20, 2014, 15:37 »
This is a python syntax error,
The syntax of the script is not correct, there is an indentation error.
Please attach the full script for us to pinpoint what is wrong in the script

Offline venkata reddy mallidi

  • Regular QuantumATK user
  • **
  • Posts: 6
  • Country: in
  • Reputation: 0
    • View Profile
Re: GATE SCAN ATTACHMENT
« Reply #2 on: June 23, 2014, 08:55 »
# Read in the old configuration
device_configuration = nlread("nanodevice_huckel.nc",DeviceConfiguration)[0]
calculator = device_configuration.calculator()
metallic_regions = device_configuration.metallicRegions()
# Define gate_voltages
gate_voltage_list=[1.0, 2.0, 3.0, 4.0, 5.0]*Volt
# Define output file name
filename= "nanodevice_huckel.nc"
# Perform loop over gate voltages
for gate_voltage in gate_voltage_list:
    # Set the gate voltages to the new values
    new_regions = [m(value = gate_voltage) for m in metallic_regions]
    device_configuration.setMetallicRegions(new_regions)
    # Make a copy of the calculator and attach it to the configuration
    # Restart from the previous scf state
    device_configuration.setCalculator(calculator(),
         initial_state=device_configuration)
    device_configuration.update()
    nlsave(filename, device_configuration)
# Calculate analysis objects
electron_density = ElectronDifferenceDensity(device_configuration)
nlsave(filename, electron_density)
electrostatic_potential = ElectrostaticDifferencePotential(device_configuration)
nlsave(filename, electrostatic_potential)
transmission_spectrum = TransmissionSpectrum(
    configuration=device_configuration,
    energies=numpy.linspace(-3,3,101)*eV,
    self_energy_calculator=DirectSelfEnergy(),
    )
nlsave(filename, transmission_spectrum)
nlprint(transmission_spectrum)

Offline Umberto Martinez

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 479
  • Country: dk
  • Reputation: 26
    • View Profile
Re: GATE SCAN ATTACHMENT
« Reply #3 on: June 23, 2014, 12:48 »
The script looks fine to me. Maybe something has been modified during the copy and paste operations. try one more time to download the script directly from here http://quantumwise.com/documents/tutorials/latest/NanowireDevice/index.html/examples/nanodevice-gatescan.py just check that the filename here
Code
device_configuration = nlread("nanodevice_huckel.nc",DeviceConfiguration)[0]
is correct.

Offline venkata reddy mallidi

  • Regular QuantumATK user
  • **
  • Posts: 6
  • Country: in
  • Reputation: 0
    • View Profile
Re: GATE SCAN ATTACHMENT
« Reply #4 on: June 23, 2014, 13:35 »
i have saved the nc file of silicon nanowire fet in the name of si_nanowirefet.nc
so in the very first line of gate scan script:
device_configuration = nlread("nanodevice_huckel.nc",DeviceConfiguration)[0]

should i need to write si_nanowirefet.nc instead of nanodevice_huckel.nc
   
Thanks

Offline Umberto Martinez

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 479
  • Country: dk
  • Reputation: 26
    • View Profile
Re: GATE SCAN ATTACHMENT
« Reply #5 on: June 23, 2014, 13:51 »
yes, of course.
at that point you should not even have a file named nanodevice_huckel.nc which instead will be created by the nanodevice-gatescan.py script.

that should be pretty much straightforward. We will modify the script though.
hope you solved the problem now.

Offline venkata reddy mallidi

  • Regular QuantumATK user
  • **
  • Posts: 6
  • Country: in
  • Reputation: 0
    • View Profile
Re: GATE SCAN ATTACHMENT
« Reply #6 on: June 24, 2014, 10:26 »
There may be some error in this line of script of gate scan
new_regions = [m(value = gate_voltage) for m in metallic_regions],
bcoz many times I have run the script but it is showing the same error
\


new_regions = [m(value = gate_voltage) for m in metallic_regions]
              ^
IndentationError: expected an indented block


what is the meaning of m(value = gate_voltage),
please check the script

please help me in this regard.....I am trying for last many days

Offline Umberto Martinez

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 479
  • Country: dk
  • Reputation: 26
    • View Profile
Re: GATE SCAN ATTACHMENT
« Reply #7 on: June 24, 2014, 10:48 »
can you attach the script to the post?
not copy and paste. attach it directly.

Offline venkata reddy mallidi

  • Regular QuantumATK user
  • **
  • Posts: 6
  • Country: in
  • Reputation: 0
    • View Profile
Re: GATE SCAN ATTACHMENT
« Reply #8 on: June 25, 2014, 09:49 »
sure

Offline Umberto Martinez

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 479
  • Country: dk
  • Reputation: 26
    • View Profile
Re: GATE SCAN ATTACHMENT
« Reply #9 on: June 25, 2014, 10:05 »
As expected indentation is missing giving the syntax error.

please open the file and check again and download the file http://quantumwise.com/documents/tutorials/latest/NanowireDevice/index.html/examples/nanodevice-gatescan.py which is formatted correctly.
the script you copied below was correct, though.

Offline venkata reddy mallidi

  • Regular QuantumATK user
  • **
  • Posts: 6
  • Country: in
  • Reputation: 0
    • View Profile
Re: GATE SCAN ATTACHMENT
« Reply #10 on: June 27, 2014, 11:16 »
its ahowing like this help me in solvig this