Thanks for your kind reply , i whill check it tonight .I have already solved it in another way ,the code is :
# -------------------------------------------------------------
# IV Curve
# -------------------------------------------------------------
calculator=device_configuration.calculator()
biases = [0.000000, 0.100000, 0.200000, 0.300000, 0.400000, 0.500000,
0.600000, 0.700000, 0.800000, 0.900000, 1.000000]*Volt
for bias in biases:
calculator=calculator(
electrode_voltages=(bias/2, -bias/2))
device_configuration.setCalculator(
calculator(),
initial_state=device_configuration)
device_configuration.update()
nlsave("ivcurve_selfconsistent_configurations_bias_%g.nc" % bias.inUnitsOf(Volt), device_configuration)
#----------------------------------------
# Transmission spectrum
#----------------------------------------
for bias in biases:
configurations = nlread('ivcurve_selfconsistent_configurations_bias_%g.nc' % bias.inUnitsOf(Volt), DeviceConfiguration)
for device_configuration in configurations:
transmission_spectrum = TransmissionSpectrum(
configuration=device_configuration,
energies=numpy.linspace(-2,2,201)*eV,
kpoints=MonkhorstPackGrid(4, 4),
energy_zero_parameter=AverageFermiLevel,
infinitesimal=1e-06*eV,
self_energy_calculator=RecursionSelfEnergy(),
)
nlsave("TS_analysis.nc", transmission_spectrum)
nlprint(transmission_spectrum)
This way to save the checkpoint is very helpful and it's easy to restart from the I-V converged state .Hope it could help the new learnrers.