Author Topic: About the bias loop problem  (Read 2516 times)

0 Members and 1 Guest are viewing this topic.

Offline Jad

  • New QuantumATK user
  • *
  • Posts: 3
  • Country: cn
  • Reputation: 0
    • View Profile
About the bias loop problem
« on: April 11, 2014, 15:38 »
Hello,when I wrote the gate bias loop from -2v~2v codes for my device,the result turned to be only one transmission spectrum at gate bias of 2v,and there was no error while running the loop codes.  and here's the codes
Code
#read in the old configuration
device_configuration = nlread("amos.nc",DeviceConfiguration)[0]
calculator = device_configuration.calculator()
metallic_region0 = device_configuration.metallicRegions()[0]
# Define gate_voltages
gate_voltage_list=numpy.linspace(-2.0,2.0,17)*Volt
for gate_voltage in gate_voltage_list:
device_configuration.setMetallicRegions(
[metallic_region0(value = gate_voltage)] )
# 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)
#Analysis
filename= 'gatescan-amos.nc'
electron_density = ElectronDifferenceDensity(device_configuration)
nlsave(filename, electron_density,object_id='dens'+str(gate_voltage))
electrostatic_potential = ElectrostaticDifferencePotential(device_configuration)
nlsave(filename, electrostatic_potential, object_id='pot'+str(gate_voltage))
transmission_spectrum = TransmissionSpectrum(
configuration=device_configuration,
energies=numpy.linspace(-2,2,200)*eV,
)
nlsave(filename, transmission_spectrum,object_id='trans'+str(gate_voltage))
nlprint(transmission_spectrum)
it seemed that the bias loop code didn't work.So would you kindly please tell me how to fix this problem.Thank you! ps:before running this code, I already made the transmission spectrum in the file "amos.nc".