######################################################################
# Initialize self-consistent field calculation
######################################################################
# Restore self consistent calculation from check point file
scf = restoreSelfConsistentCalculation(
filename = 'G:/theme1/parallel/ivcurve/4Ni-scf3.nc'
)
for voltage in numpy.arange(0.0, 5.01, 0.1):
two_probe_method = TwoProbeMethod(
electrode_parameters = (left_electrode_parameters,right_electrode_parameters),
exchange_correlation_type = exchange_correlation_type,
iteration_mixing_parameters = iteration_mixing_parameters,
electron_density_parameters = electron_density_parameters,
basis_set_parameters = basis_set_parameters,
iteration_control_parameters = iteration_control_parameters,
energy_contour_integral_parameters = energy_contour_integral_parameters,
two_center_integral_parameters = two_center_integral_parameters,
electrode_voltages = (voltage, 0)*Volt,
algorithm_parameters = two_probe_algorithm_parameters
)
if processIsMaster(): nlPrint(two_probe_method)
runtime_parameters = runtimeParameters(
verbosity_level = 1,
checkpoint_filename = '4Ni-bias-%.1f.nc' % voltage
)
scf = executeSelfConsistentCalculation(
twoprobe_configuration,
two_probe_method,
runtime_parameters = runtime_parameters,
initial_calculation=scf
)
######################################################################
# Calculate physical properties
######################################################################
current = calculateCurrent(
self_consistent_calculation = scf,
brillouin_zone_integration_parameters = brillouinZoneIntegrationParameters((1, 1)),
spin = Spin.Up,
green_function_infinitesimal = 1.0e-5*electronVolt,
number_of_points = 100
)
if processIsMaster(): nlPrint(current)
if processIsMaster(): file.addToSample(current, 'twoprobe_configuration', 'Current')
current_1 = calculateCurrent(
self_consistent_calculation = scf,
brillouin_zone_integration_parameters = brillouinZoneIntegrationParameters((1, 1)),
spin = Spin.Down,
green_function_infinitesimal = 1.0e-5*electronVolt,
number_of_points = 100
)
if processIsMaster(): nlPrint(current_1)
if processIsMaster(): file.addToSample(current_1, 'twoprobe_configuration', 'Current 1')