There is a good recipe for I-V curve here: http://quantumwise.com/documents/tutorials/GrapheneJunctionDevice/XHTML/chap.current.html. For reference I include it below, in a bit adapted form:
# Starting guess, in our case an existing calculation (let's say zero bias)
device_configuration = nlread("zerobias.nc",DeviceConfiguration)[0]
calculator = device_configuration.calculator()
# Define bias voltages, 9 points from 0 V to 2 V
# (zero bias will converge trivially, but this script also computes the transmission)
voltage_list=numpy.linspace(0.0,2.0,9)*Volt
for voltage in voltage_list:
# 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(electrode_voltages=(-0.5*voltage,0.5*voltage)),
initial_state=device_configuration)
# Analysis
filename = 'ivscan.nc'
# Potential, so we can do voltage drop later
electrostatic_potential = ElectrostaticDifferencePotential(device_configuration)
nlsave(filename, electrostatic_potential, object_id='pot'+str(voltage))
# Transmission, so we can compute the current later
transmission_spectrum = TransmissionSpectrum(
configuration=device_configuration,
energies=numpy.linspace(-2,2,200)*eV,
)
nlsave(filename, transmission_spectrum,object_id='trans'+str(voltage))
Hope this helps!
To add relaxation should be obvious, I hope.