I have attached the ivscript.py and the script.
In Linux the script makes only one checkpoint file.
from ATK.TwoProbe import *
from ATK.MPI import processIsMaster
import ivcurve
# Generate time stamp
if processIsMaster():
import platform, time
print '#',time.ctime()
print '#',platform.node(),platform.platform()+'\n'
# Opening vnlfile
if processIsMaster(): file = VNLFile('/home/hellboy/Desktop/NanoLab simulations/SWCNT 44 Two probe/SWCNT44twoprobe.vnl')
# Scattering elements
left_surface_elements = [Carbon, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon]
central_atom_elements = [Carbon, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon]
right_surface_elements = [Carbon, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon]
scattering_elements = left_surface_elements + central_atom_elements + right_surface_elements
# Scattering coordinates
left_surface_coordinates = [[ 10.32234097, 7.60652113, 2.46297622],
[ 7.60652113, 10.32234097, 2.46297622],
[ 4.89070082, 7.60652113, 2.46297622],
[ 7.60652113, 4.89070082, 2.46297622],
[ 9.95849037, 8.96443081, 2.46297622],
[ 6.24861097, 9.95849037, 2.46297622],
[ 5.25455189, 6.24861097, 2.46297622],
[ 8.96443081, 5.25455189, 2.46297622],
[ 9.52689552, 9.52689552, 3.69446445],
[ 5.68614626, 9.52689552, 3.69446445],
[ 5.68614626, 5.68614626, 3.69446445],
[ 9.52689552, 5.68614626, 3.69446445],
[ 8.30942726, 10.22980118, 3.69446445],
[ 4.98324013, 8.30942726, 3.69446445],
[ 6.903615 , 4.98324013, 3.69446445],
[ 10.22980118, 6.903615 , 3.69446445]]*Angstrom
central_atom_coordinates = [[ 10.32234097, 7.60652113, 4.92602378],
[ 9.52689552, 9.52689552, 6.15751189],
[ 7.60652113, 10.32234097, 4.92602378],
[ 5.68614626, 9.52689552, 6.15751189],
[ 4.89070082, 7.60652113, 4.92602378],
[ 5.68614626, 5.68614626, 6.15751189],
[ 7.60652113, 4.89070082, 4.92602378],
[ 9.52689552, 5.68614626, 6.15751189],
[ 9.95849037, 8.96443081, 4.92602378],
[ 8.30942726, 10.22980118, 6.15751189],
[ 6.24861097, 9.95849037, 4.92602378],
[ 4.98324013, 8.30942726, 6.15751189],
[ 5.25455189, 6.24861097, 4.92602378],
[ 6.903615 , 4.98324013, 6.15751189],
[ 8.96443081, 5.25455189, 4.92602378],
[ 10.22980118, 6.903615 , 6.15751189],
[ 10.32234097, 7.60652113, 7.389 ],
[ 9.52689552, 9.52689552, 8.62048811],
[ 7.60652113, 10.32234097, 7.389 ],
[ 5.68614626, 9.52689552, 8.62048811],
[ 4.89070082, 7.60652113, 7.389 ],
[ 5.68614626, 5.68614626, 8.62048811],
[ 7.60652113, 4.89070082, 7.389 ],
[ 9.52689552, 5.68614626, 8.62048811],
[ 9.95849037, 8.96443081, 7.389 ],
[ 8.30942726, 10.22980118, 8.62048811],
[ 6.24861097, 9.95849037, 7.389 ],
[ 4.98324013, 8.30942726, 8.62048811],
[ 5.25455189, 6.24861097, 7.389 ],
[ 6.903615 , 4.98324013, 8.62048811],
[ 8.96443081, 5.25455189, 7.389 ],
[ 10.22980118, 6.903615 , 8.62048811]]*Angstrom
right_surface_coordinates = [[ 10.32234097, 7.60652113, 9.85146421],
[ 7.60652113, 10.32234097, 9.85146421],
[ 4.89070082, 7.60652113, 9.85146421],
[ 7.60652113, 4.89070082, 9.85146421],
[ 9.95849037, 8.96443081, 9.85146421],
[ 6.24861097, 9.95849037, 9.85146421],
[ 5.25455189, 6.24861097, 9.85146421],
[ 8.96443081, 5.25455189, 9.85146421],
[ 9.52689552, 9.52689552, 11.08295232],
[ 5.68614626, 9.52689552, 11.08295232],
[ 5.68614626, 5.68614626, 11.08295232],
[ 9.52689552, 5.68614626, 11.08295232],
[ 8.30942726, 10.22980118, 11.08295232],
[ 4.98324013, 8.30942726, 11.08295232],
[ 6.903615 , 4.98324013, 11.08295232],
[ 10.22980118, 6.903615 , 11.08295232]]*Angstrom
scattering_coordinates = left_surface_coordinates + central_atom_coordinates + right_surface_coordinates
electrode_elements = [Carbon, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon]
electrode_coordinates = [[ 10.32234097, 7.60652113, 0. ],
[ 9.52689552, 9.52689552, 1.23148811],
[ 7.60652113, 10.32234097, 0. ],
[ 5.68614626, 9.52689552, 1.23148811],
[ 4.89070082, 7.60652113, 0. ],
[ 5.68614626, 5.68614626, 1.23148811],
[ 7.60652113, 4.89070082, 0. ],
[ 9.52689552, 5.68614626, 1.23148811],
[ 9.95849037, 8.96443081, 0. ],
[ 8.30942726, 10.22980118, 1.23148811],
[ 6.24861097, 9.95849037, 0. ],
[ 4.98324013, 8.30942726, 1.23148811],
[ 5.25455189, 6.24861097, 0. ],
[ 6.903615 , 4.98324013, 1.23148811],
[ 8.96443081, 5.25455189, 0. ],
[ 10.22980118, 6.903615 , 1.23148811]]*Angstrom
electrode_cell = [[ 15.2130418 , 0. , 0. ],
[ 0. , 15.2130418 , 0. ],
[ 0. , 0. , 2.46297625]]*Angstrom
# Set up electrodes
electrode_configuration = PeriodicAtomConfiguration(
electrode_cell,
electrode_elements,
electrode_coordinates
)
# Set up two-probe configuration
twoprobe_configuration = TwoProbeConfiguration(
(electrode_configuration,electrode_configuration),
scattering_elements,
scattering_coordinates,
electrode_repetitions=[[1,1],[1,1]],
equivalent_atoms=([0,0],[1,56])
)
if processIsMaster(): nlPrint(twoprobe_configuration)
if processIsMaster(): file.addToSample(twoprobe_configuration, 'twoprobe_configuration')
######################################################################
# Central region parameters
######################################################################
exchange_correlation_type = LDA.PZ
iteration_mixing_parameters = iterationMixingParameters(
algorithm = IterationMixing.Pulay,
diagonal_mixing_parameter = 0.1,
quantity = IterationMixing.Hamiltonian,
history_steps = 6
)
electron_density_parameters = electronDensityParameters(
mesh_cutoff = 400.0*Rydberg
)
basis_set_parameters = basisSetParameters(
type = DoubleZetaPolarized,
radial_sampling_dr = 0.001*Bohr,
energy_shift = 0.01*Rydberg,
delta_rinn = 0.8,
v0 = 40.0*Rydberg,
charge = 0.0,
split_norm = 0.15
)
iteration_control_parameters = iterationControlParameters(
tolerance = 1e-005,
criterion = IterationControl.TotalEnergy,
max_steps = 100
)
electrode_voltages = (0.0,0.0)*Volt
two_probe_algorithm_parameters = twoProbeAlgorithmParameters(
electrode_constraint = ElectrodeConstraints.Off,
initial_density_type = InitialDensityType.EquivalentBulk
)
energy_contour_integral_parameters = energyContourIntegralParameters(
circle_points = 30,
integral_lower_bound = 3.0*Rydberg,
fermi_line_points = 10,
fermi_function_poles = 4,
real_axis_infinitesimal = 0.01*electronVolt,
real_axis_point_density = 0.02*electronVolt
)
two_center_integral_parameters = twoCenterIntegralParameters(
cutoff = 2500.0*Rydberg,
points = 1024
)
######################################################################
# Left electrode parameters
######################################################################
left_electrode_electron_density_parameters = electronDensityParameters(
mesh_cutoff = 400.0*Rydberg
)
left_electrode_iteration_control_parameters = iterationControlParameters(
tolerance = 1e-005,
criterion = IterationControl.TotalEnergy,
max_steps = 100
)
left_electrode_brillouin_zone_integration_parameters = brillouinZoneIntegrationParameters(
monkhorst_pack_parameters = (1, 1, 500)
)
left_electrode_iteration_mixing_parameters = iterationMixingParameters(
algorithm = IterationMixing.Pulay,
diagonal_mixing_parameter = 0.1,
quantity = IterationMixing.Hamiltonian,
history_steps = 6
)
left_electrode_eigenstate_occupation_parameters = eigenstateOccupationParameters(
temperature = 300.0*Kelvin
)
######################################################################
# Collect left electrode parameters
######################################################################
left_electrode_parameters = ElectrodeParameters(
brillouin_zone_integration_parameters = left_electrode_brillouin_zone_integration_parameters,
electron_density_parameters = left_electrode_electron_density_parameters,
eigenstate_occupation_parameters = left_electrode_eigenstate_occupation_parameters,
iteration_mixing_parameters = left_electrode_iteration_mixing_parameters,
iteration_control_parameters = left_electrode_iteration_control_parameters
)
######################################################################
# Right electrode parameters
######################################################################
right_electrode_electron_density_parameters = electronDensityParameters(
mesh_cutoff = 400.0*Rydberg
)
right_electrode_iteration_control_parameters = iterationControlParameters(
tolerance = 1e-005,
criterion = IterationControl.TotalEnergy,
max_steps = 100
)
right_electrode_brillouin_zone_integration_parameters = brillouinZoneIntegrationParameters(
monkhorst_pack_parameters = (1, 1, 500)
)
right_electrode_iteration_mixing_parameters = iterationMixingParameters(
algorithm = IterationMixing.Pulay,
diagonal_mixing_parameter = 0.1,
quantity = IterationMixing.Hamiltonian,
history_steps = 6
)
right_electrode_eigenstate_occupation_parameters = eigenstateOccupationParameters(
temperature = 300.0*Kelvin
)
######################################################################
# Collect right electrode parameters
######################################################################
right_electrode_parameters = ElectrodeParameters(
brillouin_zone_integration_parameters = right_electrode_brillouin_zone_integration_parameters,
electron_density_parameters = right_electrode_electron_density_parameters,
eigenstate_occupation_parameters = right_electrode_eigenstate_occupation_parameters,
iteration_mixing_parameters = right_electrode_iteration_mixing_parameters,
iteration_control_parameters = right_electrode_iteration_control_parameters
)
######################################################################
# Initialize self-consistent field calculation
######################################################################
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 = electrode_voltages,
algorithm_parameters = two_probe_algorithm_parameters
)
if processIsMaster(): nlPrint(two_probe_method)
runtime_parameters = runtimeParameters(
verbosity_level = 10,
checkpoint_filename = '/home/hellboy/Desktop/NanoLab simulations/SWCNT 44 Two probe/SWCNT44twoprobe.nc'
)
voltages=[0.0,0.5,1.0]*Volt
ivcurve.runIVcurve (
twoprobe_configuration,
two_probe_method,
runtime_parameters,
voltages,
vnl_filename='/home/hellboy/Desktop/NanoLab simulations/SWCNT 44 Two probe/SWCNT44twoprobe_iv.vnl', sample_name='/home/hellboy/Desktop/NanoLab simulations/SWCNT 44 Two probe/SWCNT44twoprobe',
current_k_point_sampling = (1,1),
current_number_of_points = 100
)