I am facing problems in estimating iv curve for certain values of applied by ruining the calculation over a loop. In the script I added following lines at the end of zero bias calculation but the program does not run at a loop.
The program does not run at all kindly hep me in sorting out this problem.
The script is
# -------------------------------------------------------------
# Transmission spectrum
# -------------------------------------------------------------
def transmission(configuration):
# Calculate the transmission spectrum and save it in a file
transmission_spectrum = TransmissionSpectrum(
configuration=device_configuration,
energies=numpy.linspace(-3,3,50)*eV,
)
nlsave('/home/swapanchem/Desktop/lih2-loop/li-h2_iv.nc', transmission_spectrum)
# Read in the converged zero-bias calculation
device_configuration = nlread('/home/swapanchem/Desktop/lih2-loop/lih2-loop1.nc', device_configuration)[0]
calculator = device_configuration.calculator()
# Calculate and save the transmission spectrum for zero bias
transmission(device_configuration)
# Define the bias voltages for the I-V curve
voltage_list=[0.5,1.0]*Volt
# Loop over the bias voltages
for voltage in voltage_list:
# Set electrode voltages and use the self-consistent state
# of the previous calculation as starting guess
device_configuration.setCalculator(
calculator(electrode_voltages=(voltage, 0.0)),
initial_state=device_configuration)
# Calculate and save the transmission spectrum for each bias
transmission(device_configuration)
.