from ATK.TwoProbe import *
from ATK.MPI import processIsMaster
# Opening vnlfile
if processIsMaster(): file = VNLFile('D:/Atomistix_works/Au_nanowire/Au_nanowire_c1.vnl')
# Scattering elements and coordinates
scattering_elements = [Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold]
scattering_coordinates = [[ 6. , 6. , 0. ],
[ 6. , 6. , 2.8],
[ 6. , 6. , 5.6],
[ 6. , 6. , 8.4],
[ 6. , 6. , 11.2],
[ 6. , 6. , 14. ],
[ 6. , 6. , 16.8],
[ 6. , 6. , 19.6]]*Angstrom
electrode_elements = [Gold, Gold]
electrode_coordinates = [[ 6. , 6. , 0. ],
[ 6. , 6. , 2.8]]*Angstrom
electrode_cell = [[ 12. , 0. , 0. ],
[ 0. , 12. , 0. ],
[ 0. , 0. , 5.6]]*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,7])
)
if processIsMaster(): nlPrint(twoprobe_configuration)
if processIsMaster(): file.addToSample(twoprobe_configuration, 'Au_nanowire')
######################################################################
# 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 = 150.0*Rydberg
)
basis_set_parameters = basisSetParameters(
type = DoubleZetaPolarized,
radial_sampling_dr = 0.005*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 = 0.0001,
criterion = IterationControl.Strict,
max_steps = 1000
)
electrode_voltages = (1.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*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
)
######################################################################
# Homogeneous electrode parameters
######################################################################
homogeneous_electrode_electron_density_parameters = electronDensityParameters(
mesh_cutoff = 150.0*Rydberg
)
homogeneous_electrode_iteration_control_parameters = iterationControlParameters(
tolerance = 0.0001,
criterion = IterationControl.Strict,
max_steps = 10000
)
homogeneous_electrode_brillouin_zone_integration_parameters = brillouinZoneIntegrationParameters(
monkhorst_pack_parameters = (1, 1, 100)
)
homogeneous_electrode_iteration_mixing_parameters = iterationMixingParameters(
algorithm = IterationMixing.Pulay,
diagonal_mixing_parameter = 0.1,
quantity = IterationMixing.Hamiltonian,
history_steps = 6
)
homogeneous_electrode_eigenstate_occupation_parameters = eigenstateOccupationParameters(
temperature = 300.0*Kelvin
)
######################################################################
# Collect Homogeneous electrode parameters
######################################################################
homogeneous_electrode_parameters = ElectrodeParameters(
brillouin_zone_integration_parameters = homogeneous_electrode_brillouin_zone_integration_parameters,
electron_density_parameters = homogeneous_electrode_electron_density_parameters,
eigenstate_occupation_parameters = homogeneous_electrode_eigenstate_occupation_parameters,
iteration_mixing_parameters = homogeneous_electrode_iteration_mixing_parameters,
iteration_control_parameters = homogeneous_electrode_iteration_control_parameters
)
######################################################################
# Initialize self-consistent field calculation
######################################################################
two_probe_method = TwoProbeMethod(
electrode_parameters = (homogeneous_electrode_parameters,homogeneous_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 = 'D:/Atomistix_works/Au_nanowire/Au_nanowire.nc'
)
# Perform self-consistent field calculation
scf = executeSelfConsistentCalculation(
twoprobe_configuration,
two_probe_method,
runtime_parameters = runtime_parameters
)
######################################################################
# Calculate physical properties
######################################################################
current = calculateCurrent(
self_consistent_calculation = scf,
brillouin_zone_integration_parameters = brillouinZoneIntegrationParameters((1, 1)),
green_function_infinitesimal = 1.0e-5*electronVolt,
number_of_points = 100
)
if processIsMaster(): nlPrint(current)
# -----------------------------------------------------------------------------
# Homogeneous Two Probe Configuration
# -----------------------------------------------------------------------------
# Electrode 0 1
Equivalent Atoms (0, 0) (1, 7)
Electrode Repetitions (1, 1) (1, 1)
# -----------------------------------------------------------------------------
# Index Element x (Ang) y (Ang) z (Ang)
0 Au 6.00 6.00 0.00
1 Au 6.00 6.00 2.80
2 Au 6.00 6.00 5.60
3 Au 6.00 6.00 8.40
4 Au 6.00 6.00 11.20
5 Au 6.00 6.00 14.00
6 Au 6.00 6.00 16.80
7 Au 6.00 6.00 19.60
# -----------------------------------------------------------------------------
# Electrodes 0 and 1
# -----------------------------------------------------------------------------
# Index Element x (Ang) y (Ang) z (Ang)
0 Au 6.00 6.00 0.00
1 Au 6.00 6.00 2.80
# -----------------------------------------------------------------------------
# Supercell Vectors
# -----------------------------------------------------------------------------
# Vector number x (Ang) y (Ang) z (Ang)
0 12.00 0.00 0.00
1 0.00 12.00 0.00
2 0.00 0.00 5.60
# -----------------------------------------------------------------------------
# Two Probe Method
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# Basis Set Parameters
# -----------------------------------------------------------------------------
Type = DZP
Radial Sampling dr = 0.005 Bohr
Energy Shift = 0.01 Rydberg
Delta R(inner) = 0.8
v0 = 40 Rydberg
Charge = 0
Split Norm = 0.15
Element = All
# -----------------------------------------------------------------------------
# Exchange Correlation
# -----------------------------------------------------------------------------
Exchange Correlation Type = PZ
# -----------------------------------------------------------------------------
# ElectronDensityParameters
# -----------------------------------------------------------------------------
Mesh Cutoff = 150.00 Rydberg
# -----------------------------------------------------------------------------
# Two Center Integral Parameters
# -----------------------------------------------------------------------------
Cutoff = 2500.0 Rydberg
Number Of Points = 1024
# -----------------------------------------------------------------------------
# Iteration Mixing Parameters
# -----------------------------------------------------------------------------
Algorithm = Pulay
Diagonal Mixing Parameter = 0.1
Quantity = Hamiltonian
History Steps = 6
# -----------------------------------------------------------------------------
# Iteration Control Parameters
# -----------------------------------------------------------------------------
Tolerance = 0.0001
Criterion = Strict
Max. Steps = 1000
# -----------------------------------------------------------------------------
# Energy Contour Integral Parameters
# -----------------------------------------------------------------------------
Circle Points = 30
Integral Lower Bound = 3 Rydberg
Fermi Function Poles = 4
Real Axis Infinitesimal = 0.01 eV
Real Axis Point Density = 0.02 eV
# -----------------------------------------------------------------------------
# Electrode Voltages
# -----------------------------------------------------------------------------
Voltage at Electrode 0 = 1.00 V
Voltage at Electrode 1 = 0.00 V
# -----------------------------------------------------------------------------
# TwoProbe Algorithm Parameters
# -----------------------------------------------------------------------------
Electrode Constraint = ElectrodeConstraints.Off
Initial Density Type = ElectrodeConstraints.EquivalentBulk
2.052, d(-2): -0.054, d(-1): -0.076, d(0): -0.039, d(1): -0.076, d(2): -0.054, py: 0.069, pz: 0.387, px: 0.069 ]
# ----------------------------------------------------------------
# Total charge = 85.5735
# ----------------------------------------------------------------
%endblock Results::MullikenPopulations
# sc 114 : q = 85.57355 e Ebs = -12.55344 Ry dRho = 6.5800E-005 dEbs = 8.4550E-005 Ry dH = 6.9135E-005 Ry
#
# SelfConsistent loop : Iteration converged after 114 steps.
#
3.4018175915e-005 A
Terminated Normally
Run finished at Mon May 17 07:19:20 2008!
-2.00 5.9971
-1.95 5.9970
-1.90 5.9950
-1.85 5.9858
-1.80 5.9384
-1.75 4.9143
-1.70 3.9980
-1.65 3.9982
-1.60 3.9983
-1.55 3.9984
-1.50 3.9985
-1.45 3.9987
-1.40 3.9988
-1.35 3.9988
-1.30 3.9988
-1.25 3.9988
-1.20 3.9987
-1.15 3.9985
-1.10 3.9982
-1.05 3.9978
-1.00 3.9973
-0.95 3.9966
-0.90 3.9956
-0.85 3.9943
-0.80 3.9925
-0.75 3.9900
-0.70 3.9857
-0.65 3.9774
-0.60 3.9506
-0.55 2.9998
-0.50 2.9998
-0.45 2.9998
-0.40 2.9998
-0.35 2.9998
-0.30 2.9998
-0.25 2.9998
-0.20 2.9997
-0.15 2.9997
-0.10 2.9997
-0.05 2.9996
0.00 2.9995
0.05 2.9993
0.10 2.9991
0.15 2.9985
0.20 2.9964
0.25 1.0000
0.30 1.0000
0.35 1.0000
0.40 1.0000
0.45 1.0000
0.50 1.0000
0.55 1.0000
0.60 1.0000
0.65 1.0000
0.70 1.0000
0.75 1.0000
0.80 1.0000
0.85 1.0000
0.90 1.0000
0.95 1.0000
1.00 1.0000
1.05 1.0000
1.10 1.0000
1.15 1.0000
1.20 1.0000
1.25 1.0000
1.30 1.0000
1.35 1.0000
1.40 1.0000
1.45 1.0000
1.50 1.0000
1.55 1.0000
1.60 1.0000
1.65 1.0000
1.70 1.0000
1.75 1.0000
1.80 1.0000
1.85 1.0000
1.90 1.0000
1.95 1.0000
2.00 1.0000
Terminated Normally
Run finished at Thu Jan 01 20:05:23 2009!