IVCharacteristics¶

class
IVCharacteristics
(configuration, filename, object_id, gate_regions=None, gate_source_voltages=None, drain_source_voltages=None, energies=None, kpoints=None, kpoints_weights=None, self_energy_calculator=None, energy_zero_parameter=None, infinitesimal=None, log_filename_prefix=None, number_of_processes_per_task=None, device_transmission_method=None, enforce_zero_transmission_in_band_gap=None)¶ Constructor for the IVCharacteristics object.
Parameters:  configuration (
DeviceConfiguration
) – The device configuration with attached calculator for which to perform the study. The configuration must include at least one metallic region acting as the gate.  filename (str) – The full or relative filename path the Study object should be saved to. See
nlsave()
.  object_id (str) – The name of the study that the Study object should be saved to within the file. This
needs to be a unique name in this file. See
nlsave()
.  gate_regions (int  list of int) – An index or list of indices of the metallic regions present in the configuration for
which to apply the gate voltage.
Default: All metallic regions present in the configuration.  gate_source_voltages (PhysicalQuantity of type voltage  sequence of PhysicalQuantity of type voltage) – A list of the gatesource voltages for which the current will be
calculated the next time the object is updated. It is assumed that the
right electrode is the source and is grounded, and that the gatesource voltage is
defined as
V_gs = V_g  V_s
. Therefore, in each transmission calculation, the right electrode voltage will be set to zero and the gate regions voltage toV_gs
.
Default:[0.0] * Volt
 drain_source_voltages (PhysicalQuantity of type voltage  sequence of PhysicalQuantity of type voltage) – A list of the drainsource voltages for which the current will be
calculated the next time the object is updated. It is assumed that the
right electrode is the source, and that the drainsource voltage is
defined as
V_ds = V_d  V_s
. Therefore, in each transmission calculation, the right electrode voltage will be set to zero and the right electrode voltage toV_ds
.
Default:[0.5] * Volt
 energies (list of PhysicalQuantity of type energy) – A list of the energies for which the
TransmissionSpectrum
at each voltage should be calculated.
Default: Energy range that covers the bias window, plus \(30 k_B T\).  kpoints (
MonkhorstPackGrid
RegularKpointGrid
AdaptiveGrid
 list (size n_kpoints) of list (size 3) of float) – The kpoints for which theTransmissionSpectrum
at each voltage should be calculated. Note that the kpoints must be in the same xyplane. Setnc=1
for MonkhorstPackGrid and RegularKpointGrid.
Default:MonkhorstPackGrid(na, nb)
where(na, nb)
is the sampling used for the selfconsistent calculation.  kpoints_weights (list (size n_kpoints) of float) – The weight of each kpoint for which the
TransmissionSpectrum
at each voltage should be calculated.
Default: The weights corresponding to the MonkhorstPackGrid/RegularKpointGrid, or equal weights if the kpoints are specified as a list.  self_energy_calculator (
DirectSelfEnergy
RecursionSelfEnergy
SparseRecursionSelfEnergy
KrylovSelfEnergy
) – The SelfEnergyCalculator to be used for theTransmissionSpectrum
calculation at each voltage.
Default:RecursionSelfEnergy(storage_strategy=NoStorage())
 energy_zero_parameter (
AverageFermiLevel
AbsoluteEnergy
) – The choice for the zero of energy to be used for theTransmissionSpectrum
calculation at each voltage.
Default:AverageFermiLevel
 infinitesimal (PhysicalQuantity of type energy) – Small positive energy, used to move the
TransmissionSpectrum
calculation at each voltage away from the real axis. This is only relevant for recursionstyle selfenergy calculators.
Default:1.0e6 * eV
 log_filename_prefix (str 
LogToStdOut
) – Filename prefix for the logging output of the calculations, each to be stored in a separate file. IfLogToStdOut
, all logging will instead be sent to standard output.
Default:'iv_characteristics_'
 number_of_processes_per_task (int) – The number of processes that will be used to execute each task. If this
value is greater than or equal to the total number of available processes,
each single task will be executed collaboratively over all processes.
Otherwise, a delegatorworker scheme is used; in this case, one process will
be set aside as the delegator, and the remaining ones will be grouped into
workers and execute tasks concurrently.
Default: All available processes execute each task collaboratively.  device_transmission_method (
GreensFunction
SparseGreensFunction
.) – The method employed in theTransmissionSpectrum
calculation at each voltage. Note thatGreensFunction
is only supported for a maximum of 2 (1)processes_per_contour_point
for Unpolarized, Polarized (Noncollinear, SpinOrbit) calculations.
Default:GreensFunction(processes_per_contour_point=1)
.  enforce_zero_transmission_in_band_gap (bool) – Flag which specifies whether the transmission values are enforced to zero
inside the band gap.
Default: True

addAnalysis
(gate_source_voltages, drain_source_voltages, analysis_type, analysis_arguments=None)¶ Add an analysis object to the IVCharacteristics study for given gatesource and drainsource voltage pair.
This method can be invoked several times; in this case, multiple analysis objects will be added to the same voltage pairs.
Parameters:  gate_source_voltages (PhysicalQuantity of type voltage  sequence of PhysicalQuantity of type voltage) – A list of gatesource voltages for which the analysis should be appended. Each voltage in the list needs to be already present.
 drain_source_voltages (PhysicalQuantity of type voltage  sequence of PhysicalQuantity of type voltage) – A list of drainsource voltages for which the analysis should be appended. Each voltage in the list needs to be already present.
 analysis_type (An
Analysis
type supported by IVCharacteristics.) – The type of the analysis object to be calculated.  analysis_arguments (A dictionary of valid arguments for an analysis object of the type specified in
analysis_type
.) – Dictionary of optional arguments to be passed to the analysis object. The configuration arguments must not be present.
Default: An empty dictionary.

addProjectedLocalDensityOfStates
(gate_source_voltages, drain_source_voltages, energies=None)¶ Add a ProjectedLocalDensityOfStates analysis object to the IVCharacteristics study for a given gatesource and drainsource voltage pair. The input paramenters are taken from the IVCharacteristics study.
Parameters:  gate_source_voltages (PhysicalQuantity of type voltage  sequence of PhysicalQuantity of type voltage) – A list of gatesource voltages for which the analysis should be appended. Each voltage in the list needs to be already present.
 drain_source_voltages (PhysicalQuantity of type voltage  sequence of PhysicalQuantity of type voltage) – A list of drainsource voltages for which the analysis should be appended. Each voltage in the list needs to be already present.
 energies (list of PhysicalQuantity of type energy) – The energies for which the density of states should be calculated.
Default: The value given in the constructor of the study object, if notNone
;numpy.linspace(2.0, 2.0, 200) * eV
otherwise.

addVoltages
(gate_source_voltages=None, drain_source_voltages=None)¶ Add a list of gatesource and/or drainsource voltage points to the IVCharacteristics study. These will be calculated the next time the object is updated.
Parameters:  gate_source_voltages (PhysicalQuantity of type voltage  sequence of PhysicalQuantity of type voltage) – The list of gatesource voltages to add.
 drain_source_voltages (PhysicalQuantity of type voltage  sequence of PhysicalQuantity of type voltage) – The list of drainsource voltages to add.

calculatedVoltages
()¶ Returns: The list of gatesource and drainsource voltage pairs for which a transmission spectrum has been calculated. Return type: list of PhysicalQuantity of type voltage

configuration
(gate_source_voltage, drain_source_voltage)¶ Retrieve the updated configuration for the given gatesource and drainsource voltages.
This result will only be available after the calculation ran successfully.
Parameters:  gate_source_voltage (PhysicalQuantity of type voltage) – The gatesource voltage.
 drain_source_voltage (PhysicalQuantity of type voltage) – The drainsource voltage.
Returns: The configuration associated with this voltage pair. If not available, returns None.
Return type: DeviceConfiguration  None

configurationCalculator
(gate_source_voltage, drain_source_voltage)¶ Retrieve the updated configuration’s calculator for the given gatesource and drainsource voltages.
This result will only be available after the calculation ran successfully.
Parameters:  gate_source_voltage (PhysicalQuantity of type voltage) – The gatesource voltage.
 drain_source_voltage (PhysicalQuantity of type voltage) – The drainsource voltage.
Returns: The calculator associated with this voltage pair. If not available, returns None.
Return type:

current
(gate_source_voltage, drain_source_voltage, electrode_temperatures=None)¶ The current calculated from the
TransmissionSpectrum
analysis.Parameters:  gate_source_voltage (PhysicalQuantity of type voltage) – The gatesource voltage.
 drain_source_voltage (PhysicalQuantity of type voltage) – The drainsource voltage.
 electrode_temperatures (list (size 2) of PhysicalQuantity of type temperature) – The electrode temperatures to be used in the current calculation.
Default: The temperatures from the calculator.
Returns: The calculated current for the required gatesource and drainsource voltages. If not available, returns None.
Return type: PhysicalQuantity of type current  None

deviceTransmissionMethod
()¶ Returns: The method used for the TransmissionSpectrum
calculation at each voltage.Return type: GreensFunction
SparseGreensFunction

drainInducedBarrierLowering
(threshold_current, high_drain_source_voltage, low_drain_source_voltage, min_subthreshold_current=None, max_subthreshold_current=None, range_min=None, range_max=None, converged_only=None, electrode_temperatures=None)¶ Calculate drain induced barrier lowering (DIBL). The threshold voltage is defined as the gatesource voltage for which the current has a userdefined value, evaluated at a high and a low sourcedrain voltage value.
The DIBL is calculated as the unitless ratio
\(DIBL = \frac{V_{TH}^{low}  V_{TH}^{high}}{V_{DS}^{high}  V_{DS}^{low}}\)In order to obtain meaningful results, a current in the subthreshold regime must be specified.
Parameters:  threshold_current (PhysicalQuantity of type current) – The current for which the device is considered to be at the gatesource threshold.
 high_drain_source_voltage (PhysicalQuantity of type voltage) – The drainsource voltage at the working point (i.e., the supply voltage).
 low_drain_source_voltage (PhysicalQuantity of type voltage) – The low drain voltage used as reference. It needs to be a finite value close to 0.
 min_subthreshold_current (PhysicalQuantity of type current) – The minimum value of current used to extract the subthreshold regime model.
Default: threshold_current / 10  max_subthreshold_current (PhysicalQuantity of type current) – The minimum value of current used to extract the subthreshold regime model.
Default: threshold_current * 10  range_min (PhysicalQuantity of type voltage) – The minimum gatesource voltage used for the processing. This parameter can be
used to select the nmoslike or pmoslike section of the IV curve in bipolar devices.
Default: No restriction.  range_max (bool) – The maximum gatesource voltage in the required range. This parameter can be
used to select the nmoslike or pmoslike section of the IV curve in bipolar devices.
Default: No restriction.  converged_only – Whether to only include data points which have converged.
Default: True  electrode_temperatures (list (size 2) of PhysicalQuantity of type temperature) – The electrode temperatures to be used in the current calculation.
Default: The temperatures from the calculator.
Returns: The calculated drain induced barrier lowering.
Return type: float

drainSourceSaturationVoltage
(gate_source_voltage, range_min=None, range_max=None, converged_only=None, electrode_temperatures=None)¶ Calculate the drainsource saturation voltage for a given gatesource voltage. It is assumed that a transition to saturation regime occurs in the interval specified by range_min and range_max. The value is estimated by fitting the data to a SchichmanHodges model (SPICE Mosfet model 1).
Parameters:  gate_source_voltage (PhysicalQuantity of type voltage) – The gatesource voltage, for which the drainsource saturation voltage will be calculated.
 range_min (PhysicalQuantity of type voltage) – The minimum drainsource voltage in the required range.
Default: No restriction.  range_max (bool) – The maximum drainsource voltage in the required range.
Default: No restriction.  converged_only – Whether to only include data points which have converged.
Default: True  electrode_temperatures (list (size 2) of PhysicalQuantity of type temperature) – The electrode temperatures to be used in the current calculation.
Default: The temperatures from the calculator.
Returns: The calculated drainsource saturation voltage, fitted in the required range.
Return type: PhysicalQuantity of type voltage

drainSourceVoltages
()¶ Returns: The list of all calculated and not calculated drainsource voltages. Any drainsource voltage which has not yet been calculated will be calculated the next time the object is updated. Return type: list of PhysicalQuantity of type voltage

energies
()¶ Returns: The list of energies used for the TransmissionSpectrum
calculation at each voltage.Return type: list of PhysicalQuantity of type energy

energyZeroParameter
()¶ Returns: The choice for the zero of energy used for the TransmissionSpectrum
calculation at each voltage.Return type: AverageFermiLevel
AbsoluteEnergy

enforceZeroTransmissionInBandGap
()¶ Returns: Whether the transmission values are enforced to zero inside the band gap. Return type: bool

filename
()¶ Returns: The filename where the study object is stored. Return type: str

gateRegions
()¶ Returns: The list of indices of the metallic regions present in the configuration which the gate voltage is applied to. Return type: list of int

gateSourceVoltages
()¶ Returns: The list of all calculated and not calculated gatesource voltages. Any gatesource voltage which has not yet been calculated will be calculated the next time the object is updated. Return type: list of PhysicalQuantity of type voltage

infinitesimal
()¶ Returns: The small positive energy used to move the TransmissionSpectrum
calculation at each voltage away from the real axis for the case of a recursionstyle selfenergy calculator.Return type: PhysicalQuantity of type energy

isConverged
(gate_source_voltage, drain_source_voltage)¶ Parameters:  gate_source_voltage (PhysicalQuantity of type voltage) – The gatesource voltage.
 drain_source_voltage (PhysicalQuantity of type voltage) – The drainsource voltage.
Returns: Whether the calculator for the required gatesource and drainsource voltages has been converged. If not available, returns None.
Return type: bool  None

kpoints
()¶ Returns: The kpoints used for the TransmissionSpectrum
calculation at each voltage.Return type: MonkhorstPackGrid
RegularKpointGrid
AdaptiveGrid
 list (size n_kpoints) of list (size 3) of float

kpointsWeights
()¶ Returns: The weight of each kpoint used for the TransmissionSpectrum
calculation at each voltage.Return type: list (size n_kpoints) of float

logFilenamePrefix
()¶ Returns: The filename prefix for the logging output of the study. Return type: str  LogToStdOut

nlprint
(stream=None)¶ Print a string containing an ASCII table useful for plotting the Study object.
Parameters: stream (python stream) – The stream the table should be written to.
Default:NLPrintLogger()

numberOfProcessesPerTask
()¶ Returns: The number of processes to be used to execute each task. If None, all available processes should execute each task collaboratively. Return type: int  None

objectId
()¶ Returns: The name of the study object in the file. Return type: str

onOffRatio
(drain_source_voltage, off_gate_source_voltage, on_gate_source_voltage, converged_only=None, electrode_temperatures=None)¶ Calculate the on/off ratio for the available data points at a given drainsource voltage.
Parameters:  drain_source_voltage (PhysicalQuantity of type voltage) – The drainsource voltage which determines the gatesource voltage/current
data set from which the on/off ratio will be calculated.
Default: The first drainsource voltage in the IVCharacteristics study.  off_gate_source_voltage (PhysicalQuantity of type voltage) – The gatesource voltage corresponding to the off state.
 on_gate_source_voltage (PhysicalQuantity of type voltage) – The gatesource voltage corresponding to the on state.
 converged_only – Whether to only include data points which have converged.
Default: True  electrode_temperatures (list (size 2) of PhysicalQuantity of type temperature) – The electrode temperatures to be used in the current calculation.
Default: The temperatures from the calculator.
Returns: The calculated on/off ratio in the required range.
Return type: float
 drain_source_voltage (PhysicalQuantity of type voltage) – The drainsource voltage which determines the gatesource voltage/current
data set from which the on/off ratio will be calculated.

removeAnalysis
(gate_source_voltages, drain_source_voltages, analysis_type)¶ Remove an analysis object from the IVCharacteristics study for given gatesource and drainsource voltage pairs.
Note that if multiple analysis objects of the same type exist, they will all be removed.
Parameters:  gate_source_voltages (PhysicalQuantity of type voltage  sequence of PhysicalQuantity of type voltage) – A list of gatesource voltages for which the analysis object should be removed.
 drain_source_voltages (PhysicalQuantity of type voltage  sequence of PhysicalQuantity of type voltage) – A list of drainsource voltages for which the analysis object should be removed.
 analysis_type (An
Analysis
type supported by IVCharacteristics.) – The type of the analysis object to be removed.

removeDrainSourceVoltage
(drain_source_voltage)¶ Remove a drainsource voltage from the IVCharacteristics study. All analysis objects corresponding to the given drainsource voltage will be removed.
Parameters: drain_source_voltage (PhysicalQuantity of type voltage) – The drainsource voltage which should be removed from the IVCharacteristics study.

removeGateSourceVoltage
(gate_source_voltage)¶ Remove a gatesource voltage from the IVCharacteristics study. All analysis objects corresponding to the given gatesource voltage will be removed.
Parameters: gate_source_voltage (PhysicalQuantity of type voltage) – The gatesource voltage which should be removed from the IVCharacteristics study.

results
(gate_source_voltage, drain_source_voltage, result_types=None)¶ Retrieve all results of the specified types for the given gatesource and drainsource voltages.
Only the results of calculations that ran successfully are available.
Parameters:  gate_source_voltage (PhysicalQuantity of type voltage) – The gatesource voltage.
 drain_source_voltage (PhysicalQuantity of type voltage) – The drainsource voltage.
 result_types (list) – A list of types which should be included in the returned quantity. For example, result_types=[DeviceConfiguration] will only return instances of DeviceConfiguration. If not specified, all results are returned.
Returns: The available results from calculations associated with this voltage pair. If none available, it returns an empty list.
Return type: list

selfEnergyCalculator
()¶ Returns: The SelfEnergyCalculator used for the TransmissionSpectrum
calculation at each voltage.Return type: DirectSelfEnergy
RecursionSelfEnergy
SparseRecursionSelfEnergy
KrylovSelfEnergy

setCalculator
(gate_source_voltage, drain_source_voltage, calculator, initial_state=None)¶ Set a new calculator and initial state for an existing gatesource and drainsource voltage pair.
The next call to update() will recalculate the configuration, transmission spectrum and any additional Analysis objects for this gatesource and drainsource voltage pair.
Parameters:  gate_source_voltage (PhysicalQuantity of type voltage) – The gatesource voltage.
 drain_source_voltage (PhysicalQuantity of type voltage) – The drainsource voltage.
 calculator (
DeviceLCAOCalculator
DeviceSemiEmpiricalCalculator
) – The new calculator to be set on the configuration.  initial_state (
DeviceConfiguration
) – The initial state to be used for the configuration.
Default: The initial state is automatically chosen from the already run tasks.

setTransmissionSpectrumArguments
(gate_source_voltage, drain_source_voltage, transmission_arguments=None)¶ Set new arguments for the TransmissionSpectrum object for an existing gatesource and drainsource voltage pair.
The next call to update() will recalculate the transmission spectrum for this gatesource and drainsource voltage pair.
Parameters:  gate_source_voltage (PhysicalQuantity of type voltage) – The gatesource voltage.
 drain_source_voltage (PhysicalQuantity of type voltage) – The drainsource voltage.
 transmission_arguments (A dictionary of valid arguments for a TransmissionSpectrum object.) – Dictionary of arguments to be passed to the TransmissionSpectrum object.
The configuration argument must not be present.
Default: An empty dictionary.

subthresholdSlope
(drain_source_voltage=None, range_min=None, range_max=None, converged_only=None, electrode_temperatures=None)¶ Calculate the subthreshold slope for the available data points at a given drainsource voltage.
Note that by default the entire range is used for the fitting, which might give an unphysical result. It is strongly recommended for the user to define a physical range in which to perform the fitting.
Parameters:  drain_source_voltage (PhysicalQuantity of type voltage) – The drainsource voltage which determines the gatesource voltage/current data set from which the subthreshold slope will be calculated.
 range_min (PhysicalQuantity of type voltage) – The minimum gatesource voltage in the required range.
Default: No restriction.  range_max (bool) – The maximum gatesource voltage in the required range.
Default: No restriction.  converged_only – Whether to only include data points which have converged.
Default: True  electrode_temperatures (list (size 2) of PhysicalQuantity of type temperature) – The electrode temperatures to be used in the current calculation.
Default: The temperatures from the calculator.
Returns: The calculated subthreshold slope, fitted in the required range. Units are mV/dec.
Return type: float

transconductance
(drain_source_voltage, gate_source_voltage, converged_only=None, electrode_temperatures=None)¶ Calculate the transconductance, defined as:
\(g_m = \partial I_{D} / \partial V_{GS}\)at a given drainsource voltage, where \(I_{D}\) is the drain current and \(V_{GS}\) the gatesource voltage. The transconductance is evaluated around the gatesource voltage specified in input. The derivative is calculated by finite difference, using the available currents.
Parameters:  drain_source_voltage (PhysicalQuantity of type voltage) – The drainsource voltage at which the transconductance is calculated,
 gate_source_voltage (PhysicalQuantity of type voltage) – The gatesource voltage at which the transconductance is evaluated.
 converged_only – Whether to only include data points which have converged.
Default: True  electrode_temperatures (list (size 2) of PhysicalQuantity of type temperature) – The electrode temperatures to be used in the current calculation.
Default: The temperatures from the calculator.
Returns: The value of transconductance at the given gatesource and drainsource voltage.
Return type: PhysicalQuantity of type current / voltage.

transmissionSpectrum
(gate_source_voltage, drain_source_voltage)¶ Retrieve the TransmissionSpectrum for the updated configuration for the given gatesource and drainsource voltages.
This result will only be available after the transmission spectrum calculation ran successfully.
Additional TransmissionSpectrum analysis objects added with addAnalysis will be ignored.
Parameters:  gate_source_voltage (PhysicalQuantity of type voltage) – The gatesource voltage.
 drain_source_voltage (PhysicalQuantity of type voltage) – The drainsource voltage.
Returns: The transmission spectrum associated with this voltage pair. If not available, returns None.
Return type: TransmissionSpectrum  None

update
()¶ Run the calculations for the study.
 configuration (
Notes¶
Note
Study objects behave differently from analysis objects. See the Study object overview for more details.
The IVCharacteristics object can be used to perform a detailed study on a device. The object is initialized by specifying the DeviceConfiguration to study, a list of gatesource and drainsource voltages over which to scan, and the parameters needed to perform a TransmissionSpectrum calculation for each voltage.
The IVCharacteristics object supports configurations with an
arbitrary number of gates, defined as metallic regions in the
DeviceConfiguration. During the calculation the gate voltage
is set equally on the gate regions specified by the
gate_regions
parameter; other metallic regions
present in the configuration will not be affected. It is also possible to
use IVCharacteristics for a DeviceConfiguration without
any gate. In this case, gate_regions
and gate_source_voltages
can be left unspecified. A dummy value gate_source_voltages=0.0*Volt
is
then assumed.
After performing the calculation, the results can be retrieved by calling a number of methods:
calculatedVoltages
configuration
configurationCalculator
current
isConverged
results
transmissionSpectrum
There are also a number of postprocessing methods available, which will perform their analysis on the available results:
onOffRatio
subthresholdSlope
drainSourceSaturationVoltage
drainInducedBarrierLowering
transconductance
The user is free to add gatesource and drainsource voltage points to the study
by calling addVoltages
. It is also possible to specify additional
Analysis objects to be calculated on the configuration
alongside the TransmissionSpectrum for each voltage point (or only
selected points); this can be done by calling addAnalysis
. The results for
these additional Analysis calculations can be retrieved by calling the
results
method.
Finally, existing gate voltage points can be modified by calling a number of methods:
setCalculator
setTransmissionSpectrumArguments
Calling update
after one of these methods will recalculate any point which
is no longer up to date, including any additional Analysis
objects present.
Tip
See the tutotial Electrical characteristics of devices using the IVCharacteristics study object for an example of usage of IVCharacteristics study on a realistic device and a demonstration of the graphical user interface.
Usage Example¶
This example shows how to perform a simple study of a gated carbon nanotube system and display a summary of results.
First, we define the device system with metallic regions to act as the gate. This is given in the following file (for clarity, we split this from the IVCharacteristics study itself):
iv_characteristics_device_setup.py
We can now proceed with the study. Note that this example is only intended to give an overview of the capabilities of IVCharacteristics.
# Setup the device configuration.
device_configuration = nlread('iv_characteristics_device_setup.py', DeviceConfiguration)[0]
# 
# IVCharacteristics study
# 
# Initialize the IV characteristics study with 11 gatesource
# and a single drainsource voltage points.
iv_characteristics = IVCharacteristics(
configuration=device_configuration,
filename='ivcharacteristics.hdf5',
object_id='graphene_ribbon',
gate_regions=[0, 1],
gate_source_voltages=numpy.linspace(1, 1, 11)*Volt,
drain_source_voltages=0.1*Volt,
log_filename_prefix='ivcharacteristics_',
)
# Run update to calculate the initial points.
iv_characteristics.update()
# Print the iv_characteristics report.
nlprint(iv_characteristics)
# Add a new gatesource voltage point.
iv_characteristics.addVoltages(gate_source_voltages=1.5 * Volt)
# Call update again to calculate the new point.
iv_characteristics.update()
# Calculate the on/off ratio at Vds=0.1*Volt and print it out.
on_off_ratio = iv_characteristics.onOffRatio(
0.1 * Volt,
1.0 * Volt,
1.0 * Volt)
print("On/off ratio:", on_off_ratio)
# Add an additional DeviceDensityOfStates calculation to two of the gate voltage
# points. We also specify custom arguments for this object.
analysis_arguments = {'energies': numpy.arange(1.0, 1.0, 0.01) * eV}
iv_characteristics.addAnalysis(
[0.2, 0.4] * Volt,
0.1 * Volt,
DeviceDensityOfStates,
analysis_arguments
)
# Update again.
iv_characteristics.update()
# Get the calculated objects for a particular voltage value.
gate_source_voltage = 0.2 * Volt
drain_source_voltage = 0.1 * Volt
configuration = iv_characteristics.configuration(
gate_source_voltage,
drain_source_voltage)
calculator = iv_characteristics.configurationCalculator(
gate_source_voltage,
drain_source_voltage)
transmission_spectrum = iv_characteristics.transmissionSpectrum(
gate_source_voltage,
drain_source_voltage)
device_dos = iv_characteristics.results(
gate_source_voltage,
drain_source_voltage,
[DeviceDensityOfStates])[0]
# Set a new initial state for this gate voltage value.
restart_gate_voltage = 0.2 * Volt
restart_configuration = iv_characteristics.configuration(
restart_gate_voltage,
drain_source_voltage)
iv_characteristics.setCalculator(
gate_source_voltage,
drain_source_voltage,
calculator,
restart_configuration)
# Also set some new arguments for the transmission spectrum.
new_arguments = {'energies': numpy.linspace(2, 2, 21)*eV}
iv_characteristics.setTransmissionSpectrumArguments(
gate_source_voltage,
drain_source_voltage,
new_arguments)
# Running update will calculate this gate voltage point again.
iv_characteristics.update()
# Print again the iv_characteristics report.
nlprint(iv_characteristics)
Here is the resulting output from the last nlprint
command:
++
 IVCharacteristics Report 
++
 Gatesource Drainsource Drainsource 
 voltage (V) voltage (V) current (A) 
++
 1.000000 0.100000 1.432517e13 
 0.800000 0.100000 7.487856e13 
 0.600000 0.100000 7.141447e12 
 0.400000 0.100000 1.520051e10 
 0.200000 0.100000 7.014625e09 
 0.000000 0.100000 1.632069e07 
 0.200000 0.100000 5.286407e07 
 0.400000 0.100000 1.376396e07 
 0.600000 0.100000 1.431255e07 
 0.800000 0.100000 1.121649e07 
 1.000000 0.100000 1.175979e07 
 1.500000 0.100000 9.040193e08 
++