QuantumATK Forum
QuantumATK => General Questions and Answers => Topic started by: tara95 on December 16, 2017, 19:40
-
Hi,
I want to plot Id-Vg curve for my transistors but I do not know how to write python code for drain current vs gate voltage.please help me
-
Take a look at this tutorial, https://docs.quantumwise.com/tutorials/inas_p-i-n_junction/inas_p-i-n_junction.html.
-
Do you mean following file؟
# Define names of output files
filenamec = 'gatescan_conf.nc'
filenamea = 'gatescan.nc'
# Read the zero bias calculation
device_configuration = nlread('InAs_5nm_pin.nc', DeviceConfiguration)[0]
# Get the calculator
calculator = device_configuration.calculator()
# Set the source-drain voltage of the calculator
calculator=calculator(electrode_voltages=(0*Volt, 0.5*Volt))
# Get the metallic regions
metallic_regions = device_configuration.metallicRegions()
# Define positive bias voltages
gate_voltage_list=numpy.arange(10)*0.1*Volt
#make loop
for gate_voltage in gate_voltage_list:
# Change the gate voltages
new_regions = [m(value = gate_voltage) for m in metallic_regions]
device_configuration.setMetallicRegions(new_regions)
# Set new calculator with modified electrode voltages on the configuration
# use the self consistent state of the old calculation as starting input.
device_configuration.setCalculator(
calculator(),
initial_state=device_configuration)
device_configuration.update()
nlsave(filenamec, device_configuration)
electrostatic_difference_potential = ElectrostaticDifferencePotential(device_configuration)
nlsave(filenamea, electrostatic_difference_potential)
-
Regarding just plotting example, I refer to the python script plot´-iv-curve.py enclosed to that tutorial.
-
thanks.
please can you guide me?
I attach two python scripts to get I-Vg curve at drain bais 0.5 v. Is the python scripts correct?
-
Did you try running them? Do you get the result you have expected for this system?
-
Thank you for your attention. I received the desired result from the first program (related to transmission calculations), but the second one (related to current calculations) doesn't work properly.
-
Please describe in detail what you mean by "not working properly".
-
It does not seem to use from the first program data to plot a I-Vg curve, so the program needs to be corrected and I need to guide you. please help me
thanks
-
The reason for that is that you have removed the essential part in the original script where the current is actually computed from the transmission spectra in a post-processing manner. So, I suggest that you use the original script as a starting point, doing modifications in that script, if needed.