hello, i want to calculate the sweep current using atk11.2. but i donot know how to calculate the sweep current for two probe spin systems. the script have modify according to forum support information. but
when i run it an error occurred. the error message as follows:
Traceback (most recent call last):
'File "c:\users\ysl\appdata\local\temp\9865068142889943.py", line 12, in <module>
[left_electrode_calculator, right_electrode_calculator],
NameError: name 'left_electrode_calculator' is not defined
NanoLanguageScript execution failure'
can you help me to solve this problem, or edit a new script using calculating the spin current for two probe electrode systems(such as i want to calculate the (0,0.1,0.2,0.3,0.4,0.5,0.6)bias).
the iv.py script as follow:
# read in the 0 V configuration
device_configuration=nlread('D:/G/calculate materials/pentence.nc',DeviceConfiguration)[0]
calculator=device_configuration.calculator()
#----------------------------------------
# Device Calculator
#----------------------------------------
calculator = DeviceLCAOCalculator(
electrode_calculators=
[left_electrode_calculator, right_electrode_calculator],
)
########### this is added by guohuazhong for bias loop calculations, begin
for bias in numpy.linspace(0.5,1.2,8)*Volt:
# device_configuration.setCalculator(calculator)
device_configuration.setCalculator(
calculator(electrode_voltages=(0.5*bias,-0.5*bias)),
initial_state=device_configuration
)
nlprint(device_configuration)
device_configuration.update()
# ('D:/G/calculate materials/pentence3iv_scf_%g.nc' % bias.inUnitsOf(Volt), device_configuration)
nlsave('D:/G/calculate materials/pentence3.nc', device_configuration)
# -------------------------------------------------------------
# Transmission spectrum
# -------------------------------------------------------------
transmission_spectrum = TransmissionSpectrum(
configuration=device_configuration,
energies=numpy.linspace(-5,5,401)*eV,
kpoints=MonkhorstPackGrid(3,3),
energy_zero_parameter=AverageFermiLevel,
infinitesimal=1e-06*eV,
self_energy_calculator=KrylovSelfEnergy(),
)
nlsave('D:/G/calculate materials/pentence3-transmission.nc', transmission_spectrum)
nlprint(transmission_spectrum)