Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Jad

Pages: [1]
1
General Questions and Answers / 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".

2
General Questions and Answers / About the pylab package
« on: April 8, 2014, 09:13 »
hello,i just encounterd this problem while i was running the code.when i imported the pylab package and runned the program,it said Traceback (most recent call last):
  File "c:\users\admini~1.pc-\appdata\local\temp\9694778724796494.py", line 16, in <module>
    import pylab
  File ".\build\atkpython\lib\site-packages\pylab.py", line 1, in <module>
  File ".\build\atkpython\lib\site-packages\matplotlib\pylab.py", line 264, in <module>
  File ".\build\atkpython\lib\site-packages\matplotlib\pyplot.py", line 95, in <module>
  File ".\build\atkpython\lib\site-packages\matplotlib\backends\__init__.py", line 25, in pylab_setup
  File ".\build\atkpython\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 8, in <module>
  File ".\build\atkpython\lib\lib-tk\Tkinter.py", line 39, in <module>
ImportError: DLL load failed: ÕÒ²»µ½Ö¸¶¨µÄÄ£¿é¡£
The last line of the codes are some unicoded letters
i wonder how can i fix this problem
And I  want to know whether it's ok to import the pylab package in the the Editor of VNL?
Thank you very much!

Pages: [1]