from ATK.TwoProbe import *
from ATK.MPI import processIsMaster
# Generate time stamp
if processIsMaster():
import platform, time
print '#',time.ctime()
print '#',platform.node(),platform.platform()+'\n'
# Opening vnlfile
if processIsMaster(): file = VNLFile('sample_tp.vnl')
# Scattering elements and coordinates
scattering_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,
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,
Carbon, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon]
scattering_coordinates = [[ 7.755, 0. , 10.99 ],
[ 8.46 , 0. , 9.769],
[ 10.575, 0. , 10.99 ],
[ 9.87 , 0. , 9.769],
....
[ 14.805, 0. , 18.316],
[ 14.1 , 0. , 17.095],
[ 16.215, 0. , 18.316],
[ 16.92 , 0. , 17.095],
[ 19.035, 0. , 18.316],
[ 18.33 , 0. , 17.095],
[ 7.755, 0. , 20.759],
[ 8.46 , 0. , 19.538],
[ 10.575, 0. , 20.759],
[ 9.87 , 0. , 19.538],
[ 11.985, 0. , 20.759],
[ 12.69 , 0. , 19.538],
[ 14.805, 0. , 20.759],
[ 14.1 , 0. , 19.538],
[ 16.215, 0. , 20.759],
[ 16.92 , 0. , 19.538],
[ 19.035, 0. , 20.759],
[ 18.33 , 0. , 19.538],
[ 7.755, 0. , 23.201],
[ 8.46 , 0. , 21.98 ],
[ 10.575, 0. , 23.201],
[ 9.87 , 0. , 21.98 ],
[ 11.985, 0. , 23.201],
[ 12.69 , 0. , 21.98 ],
[ 14.805, 0. , 23.201],
[ 14.1 , 0. , 21.98 ],
[ 16.215, 0. , 23.201],
[ 16.92 , 0. , 21.98 ],
[ 19.035, 0. , 23.201],
...
[ 16.215, 0. , 28.085],
[ 16.92 , 0. , 26.864],
[ 19.035, 0. , 28.085],
[ 18.33 , 0. , 26.864],
[ 7.755, 0. , 30.527],
[ 8.46 , 0. , 29.306],
[ 10.575, 0. , 30.527],
[ 9.87 , 0. , 29.306],
[ 11.985, 0. , 30.527],
[ 12.69 , 0. , 29.306],
[ 14.805, 0. , 30.527],
[ 14.1 , 0. , 29.306],
[ 16.215, 0. , 30.527],
[ 16.92 , 0. , 29.306],
[ 19.035, 0. , 30.527],
[ 18.33 , 0. , 29.306],
[ 7.755, 0. , 32.97 ],
[ 8.46 , 0. , 31.748],
[ 10.575, 0. , 32.97 ],
[ 9.87 , 0. , 31.748],
[ 11.985, 0. , 32.97 ],
[ 12.69 , 0. , 31.748],
[ 14.805, 0. , 32.97 ],
[ 14.1 , 0. , 31.748],
[ 16.215, 0. , 32.97 ],
[ 16.92 , 0. , 31.748],
[ 19.035, 0. , 32.97 ],
[ 18.33 , 0. , 31.748],
[ 7.755, 0. , 35.412],
[ 8.46 , 0. , 34.191],
[ 10.575, 0. , 35.412],
.....
[ 16.92 , 0. , 36.633],
[ 19.035, 0. , 37.854],
[ 18.33 , 0. , 36.633]]*Angstrom
electrode_elements = [Carbon, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon,
...
Carbon, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon]
electrode_coordinates = [[ 7.755, 0. , 1.221],
[ 8.46 , 0. , 0. ],
[ 10.575, 0. , 1.221],
[ 9.87 , 0. , 0. ],
[ 11.985, 0. , 1.221],
[ 12.69 , 0. , 0. ],
[ 14.805, 0. , 1.221],
....
[ 7.755, 0. , 3.663],
[ 8.46 , 0. , 2.442],
[ 10.575, 0. , 3.663],
[ 9.87 , 0. , 2.442],
[ 11.985, 0. , 3.663],
[ 12.69 , 0. , 2.442],
[ 14.805, 0. , 3.663],
[ 14.1 , 0. , 2.442],
[ 16.215, 0. , 3.663],
[ 16.92 , 0. , 2.442],
[ 19.035, 0. , 3.663],
[ 18.33 , 0. , 2.442],
[ 7.755, 0. , 6.105],
[ 8.46 , 0. , 4.884],
[ 10.575, 0. , 6.105],
[ 9.87 , 0. , 4.884],
[ 11.985, 0. , 6.105],
[ 12.69 , 0. , 4.884],
[ 14.805, 0. , 6.105],
...
[ 9.87 , 0. , 7.327],
[ 11.985, 0. , 8.548],
[ 12.69 , 0. , 7.327],
[ 14.805, 0. , 8.548],
[ 14.1 , 0. , 7.327],
[ 16.215, 0. , 8.548],
[ 16.92 , 0. , 7.327],
[ 19.035, 0. , 8.548],
[ 18.33 , 0. , 7.327]]*Angstrom
electrode_cell = [[ 12.78774, 0. , 0. ],
[ 0. , 30. , 0. ],
[ 0. , 0. , 9.844 ]]*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],[47,143])
)
if processIsMaster(): nlPrint(twoprobe_configuration)
if processIsMaster(): file.addToSample(twoprobe_configuration, 'sample_tp')
######################################################################
# Central region parameters
######################################################################
exchange_correlation_type = LDA.PZ
iteration_mixing_parameters = iterationMixingParameters(
algorithm = IterationMixing.Pulay,
diagonal_mixing_parameter = 0.05,
quantity = IterationMixing.Hamiltonian,
history_steps = 6
)
electron_density_parameters = electronDensityParameters(
mesh_cutoff = 150.0*Rydberg
)
basis_set_parameters = basisSetParameters(
type = SingleZetaPolarizedPolarized,
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.NeutralAtom
)
energy_contour_integral_parameters = energyContourIntegralParameters(
circle_points = 100,
integral_lower_bound = 10*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 = 150.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 = (16, 1, 200)
)
left_electrode_iteration_mixing_parameters = iterationMixingParameters(
algorithm = IterationMixing.Pulay,
diagonal_mixing_parameter = 0.05,
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 = 150.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 = (16, 1, 200)
)
right_electrode_iteration_mixing_parameters = iterationMixingParameters(
algorithm = IterationMixing.Pulay,
diagonal_mixing_parameter = 0.05,
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 = None
)
# Perform self-consistent field calculation
scf = executeSelfConsistentCalculation(
twoprobe_configuration,
two_probe_method,
runtime_parameters = runtime_parameters
)
This is the used script file in my ongoing calculation, in which the diagonal mixing has been changed into 0.05 and the SingleZetaPolarized orbital has been adopted.
In the previous calculation, the diagonal mixing is 0.1 and the SingleZeta orbital is used.