IVCurve

class IVCurve(configuration, biases=None, energies=None, kpoints=None, kpoints_weights=None, self_energy_calculator=None, energy_zero_parameter=None, infinitesimal=None, selfconsistent_configurations_filename_prefix=None, log_filename_prefix='ivcurve_')

Constructor for the IVCurve object.

Parameters:
  • configuration (DeviceConfiguration) – The device configuration with attached calculator for which the IV curve should be calculated.
  • biases (PhysicalQuantity of type Volt.) – A list of the bias voltages for which the current should be calculated.
    Default: [0,1]*Volt
  • energies (PhysicalQuantity of type energy.) –

    A list of the energies for which the IV curve transmission spectra should be calculated.
    Default: Energy range that covers the bias window as

    specified by the ContourParameters.
  • kpoints (MonkhorstPackGrid | RegularKpointGrid | AdaptiveGrid | list(n_kpoints) of list(3) of float.) –

    The k-points for which the IV Curve transmission spectra should be calculated. Note that the k-points must be in the same xy-plane. Set nc=1 for MonkhorstPackGrid and RegularKpointGrid.
    Default: MonkhorstPackGrid(na, nb), where na, nb is the sampling

    used for the self consistent calculation.
  • kpoints_weights (list(n_kpoints) of float.) –

    The weight of each k-point.
    Default: The weights corresponding to the MonkhorstPackGrid/RegularKpointGrid,

    or equal weights if the k-points are specified in a list.
  • self_energy_calculator (DirectSelfEnergy | RecursionSelfEnergy | SparseRecursionSelfEnergy | KrylovSelfEnergy) – The SelfEnergyCalculator to be used for the transmission spectra.
    Default: RecursionSelfEnergy(storage_strategy=NoStorage())
  • energy_zero_parameter (AverageFermiLevel | AbsoluteEnergy) – Specifies the choice for the energy zero.
    Default: AverageFermiLevel
  • infinitesimal (PhysicalQuantity of type energy.) – Small positive energy, used to move the transmission calculation away from the real axis. This is only relevant for recursion-style self-energy calculators.
    Default: 1.0e-6*eV
  • selfconsistent_configurations_filename_prefix (string or NoCheckpointHandler (no file is saved)) – Prefix for the filenames where the individual SCF evaluations at different bias values are stored. The filenames are formed by appending a number and the default file extension (”.hdf5”) to this string.
    Default: "ivcurve_selfconsistent_configuration_"
  • log_filename_prefix (string or None) – Prefix for the filenames where the logging output for each bias-value calculation is stored. The filenames are formed by appending a number and the file extension (”.log”). If a value of None is given then all logging output is done to stdout.
    Default: "ivcurve_"
biases()
Returns:The bias voltages for which the current is calculated.
Return type:PhysicalQuantity of type Volt.
currents()
Returns:The calculated currents at the specified bias voltages.
Return type:PhysicalQuantity of type Ampere.
metatext()
Returns:The metatext of the object or None if no metatext is present.
Return type:str | unicode | None
nlprint(stream=None)

Print a string containing an ASCII table useful for plotting the AnalysisSpin object.

Parameters:stream (python stream) – The stream the table should be written to.
Default: NLPrintLogger()
setMetatext(metatext)

Set a given metatext string on the object.

Parameters:metatext (str | unicode | None) – The metatext string that should be set. A value of “None” can be given to remove the current metatext.
transmissionSpectra()
Returns:The calculated transmission spectra used for the current evaluations.
Return type:list of TransmissionSpectrum.

Usage Example

Calculate the IVCurve for a given DeviceConfiguration:

# -------------------------------------------------------------
# Two-probe Configuration
# -------------------------------------------------------------

# -------------------------------------------------------------
# Left Electrode
# -------------------------------------------------------------

# Set up lattice
vector_a = [5.0, 0.0, 0.0]*Angstrom
vector_b = [0.0, 5.0, 0.0]*Angstrom
vector_c = [0.0, 0.0, 9.0]*Angstrom
left_electrode_lattice = UnitCell(vector_a, vector_b, vector_c)

# Define elements
left_electrode_elements = [Lithium, Lithium, Lithium]

# Define coordinates
left_electrode_coordinates = [[ 2.5,  2.5,  1.5],
                              [ 2.5,  2.5,  4.5],
                              [ 2.5,  2.5,  7.5]]*Angstrom

# Set up configuration
left_electrode = BulkConfiguration(
    bravais_lattice=left_electrode_lattice,
    elements=left_electrode_elements,
    cartesian_coordinates=left_electrode_coordinates
    )

# -------------------------------------------------------------
# Right Electrode
# -------------------------------------------------------------

# Set up lattice
vector_a = [5.0, 0.0, 0.0]*Angstrom
vector_b = [0.0, 5.0, 0.0]*Angstrom
vector_c = [0.0, 0.0, 9.0]*Angstrom
right_electrode_lattice = UnitCell(vector_a, vector_b, vector_c)

# Define elements
right_electrode_elements = [Lithium, Lithium, Lithium]

# Define coordinates
right_electrode_coordinates = [[ 2.5,  2.5,  1.5],
                               [ 2.5,  2.5,  4.5],
                               [ 2.5,  2.5,  7.5]]*Angstrom

# Set up configuration
right_electrode = BulkConfiguration(
    bravais_lattice=right_electrode_lattice,
    elements=right_electrode_elements,
    cartesian_coordinates=right_electrode_coordinates
    )

# -------------------------------------------------------------
# Central Region
# -------------------------------------------------------------

# Set up lattice
vector_a = [5.0, 0.0, 0.0]*Angstrom
vector_b = [0.0, 5.0, 0.0]*Angstrom
vector_c = [0.0, 0.0, 22.0]*Angstrom
central_region_lattice = UnitCell(vector_a, vector_b, vector_c)

# Define elements
central_region_elements = [Lithium, Lithium, Lithium, Hydrogen, Hydrogen, Lithium, Lithium,
                           Lithium]

# Define coordinates
central_region_coordinates = [[  2.5,   2.5,   1.5],
                              [  2.5,   2.5,   4.5],
                              [  2.5,   2.5,   7.5],
                              [  2.5,   2.5,  10.5],
                              [  2.5,   2.5,  11.5],
                              [  2.5,   2.5,  14.5],
                              [  2.5,   2.5,  17.5],
                              [  2.5,   2.5,  20.5]]*Angstrom

# Set up configuration
central_region = BulkConfiguration(
    bravais_lattice=central_region_lattice,
    elements=central_region_elements,
    cartesian_coordinates=central_region_coordinates
    )

device_configuration = DeviceConfiguration(
    central_region,
    [left_electrode, right_electrode]
    )

# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
#----------------------------------------
# Numerical Accuracy Settings
#----------------------------------------
left_electrode_k_point_sampling = MonkhorstPackGrid(
    na=1,
    nb=1,
    nc=100,
    )
left_electrode_numerical_accuracy_parameters = NumericalAccuracyParameters(
    k_point_sampling=left_electrode_k_point_sampling,
    )

right_electrode_k_point_sampling = MonkhorstPackGrid(
    na=1,
    nb=1,
    nc=100,
    )
right_electrode_numerical_accuracy_parameters = NumericalAccuracyParameters(
    k_point_sampling=right_electrode_k_point_sampling,
    )

#----------------------------------------
# Poisson Solver Settings
#----------------------------------------
left_electrode_poisson_solver = FastFourier2DSolver(
    boundary_conditions=[[PeriodicBoundaryCondition(),PeriodicBoundaryCondition()],
                         [PeriodicBoundaryCondition(),PeriodicBoundaryCondition()],
                         [PeriodicBoundaryCondition(),PeriodicBoundaryCondition()]]
    )

right_electrode_poisson_solver = FastFourier2DSolver(
    boundary_conditions=[[PeriodicBoundaryCondition(),PeriodicBoundaryCondition()],
                         [PeriodicBoundaryCondition(),PeriodicBoundaryCondition()],
                         [PeriodicBoundaryCondition(),PeriodicBoundaryCondition()]]
    )

#----------------------------------------
# Electrode Calculators
#----------------------------------------
left_electrode_calculator = HuckelCalculator(
    numerical_accuracy_parameters=left_electrode_numerical_accuracy_parameters,
    poisson_solver=left_electrode_poisson_solver,
    )

right_electrode_calculator = HuckelCalculator(
    numerical_accuracy_parameters=right_electrode_numerical_accuracy_parameters,
    poisson_solver=right_electrode_poisson_solver,
    )

#----------------------------------------
# Device Calculator
#----------------------------------------
calculator = DeviceHuckelCalculator(
    electrode_calculators=
        [left_electrode_calculator, right_electrode_calculator],
    )

device_configuration.setCalculator(calculator)
nlprint(device_configuration)
device_configuration.update()
nlsave('ivcurve.nc', device_configuration)

# -------------------------------------------------------------
# IV Curve
# -------------------------------------------------------------
biases = [0.000000, 0.200000, 0.400000, 0.600000, 0.800000, 1.000000,
          1.200000, 1.400000, 1.600000, 1.800000, 2.000000]*Volt

iv_curve = IVCurve(
    configuration=device_configuration,
    biases=biases,
    energies=numpy.linspace(-2,2,101)*eV,
    kpoints=MonkhorstPackGrid(1,1),
    self_energy_calculator=RecursionSelfEnergy(),
    energy_zero_parameter=AverageFermiLevel,
    infinitesimal=1e-06*eV,
    selfconsistent_configurations_filename_prefix="ivcurve_selfconsistent_configuration_",
    log_filename_prefix="ivcurve_"
    )
nlsave('ivcurve.nc', iv_curve)
nlprint(iv_curve)

ivcurve.py