2
« on: November 27, 2012, 13:31 »
The script I used is:
# -------------------------------------------------------------
# TwoProbe configuration
# -------------------------------------------------------------
# -------------------------------------------------------------
# Left electrode
# -------------------------------------------------------------
# Set up lattice
vector_a = [8.65127469112, -6.75261456523e-33, 0.0]*Angstrom
vector_b = [-4.32563734556, 7.49222365763, 4.09015759516e-16]*Angstrom
vector_c = [0.0, 0.0, 7.06373620597]*Angstrom
left_electrode_lattice = UnitCell(vector_a, vector_b, vector_c)
# Define elements
left_electrode_elements = [Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold, Gold, Gold, Gold]
# Define coordinates
left_electrode_coordinates = [[ 0.72107876, 1.24846289, 1.17728937],
[ 3.60483699, 1.24846289, 1.17728937],
[ 6.48859522, 1.24846289, 1.17728937],
[-0.72080035, 3.74587078, 1.17728937],
[ 5.04671611, 3.74587078, 1.17728937],
[ 2.16295788, 3.74587078, 1.17728937],
[ 3.60483699, 6.24327867, 1.17728937],
[-2.16267947, 6.24327867, 1.17728937],
[ 0.72107876, 6.24327867, 1.17728937],
[ 2.16295788, 2.08093219, 3.5318681 ],
[-0.72080035, 2.08093219, 3.5318681 ],
[ 5.04671611, 2.08093219, 3.5318681 ],
[-3.60455858, 7.07574796, 3.5318681 ],
[-2.16267947, 4.57834008, 3.5318681 ],
[ 2.16295788, 7.07574796, 3.5318681 ],
[ 3.60483699, 4.57834008, 3.5318681 ],
[ 0.72107876, 4.57834008, 3.5318681 ],
[-0.72080035, 7.07574796, 3.5318681 ],
[ 7.93047434, 0.4159936 , 5.88644684],
[ 0.72107876, 2.91340148, 5.88644684],
[ 2.16295788, 5.41080937, 5.88644684],
[-0.72080035, 5.41080937, 5.88644684],
[ 5.04671611, 5.41080937, 5.88644684],
[ 2.16295788, 0.4159936 , 5.88644684],
[ 3.60483699, 2.91340148, 5.88644684],
[ 5.04671611, 0.4159936 , 5.88644684],
[ 6.48859522, 2.91340148, 5.88644684]]*Angstrom
# Set up configuration
left_electrode = BulkConfiguration(
bravais_lattice=left_electrode_lattice,
elements=left_electrode_elements,
cartesian_coordinates=left_electrode_coordinates
)
# -------------------------------------------------------------
# Right electrode
# -------------------------------------------------------------
# Set up lattice
vector_a = [8.65127469112, -6.75261456523e-33, 0.0]*Angstrom
vector_b = [-4.32563734556, 7.49222365763, 4.09015759516e-16]*Angstrom
vector_c = [0.0, 0.0, 7.06373620597]*Angstrom
right_electrode_lattice = UnitCell(vector_a, vector_b, vector_c)
# Define elements
right_electrode_elements = [Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold, Gold, Gold, Gold]
# Define coordinates
right_electrode_coordinates = [[ 0.72080035, 4.57882217, 1.17728937],
[-0.72107876, 7.07623006, 1.17728937],
[ 2.16267947, 7.07623006, 1.17728937],
[-2.16295788, 4.57882217, 1.17728937],
[-0.72107876, 2.08141429, 1.17728937],
[ 3.60455858, 4.57882217, 1.17728937],
[-3.60483699, 7.07623006, 1.17728937],
[ 5.0464377 , 2.08141429, 1.17728937],
[ 2.16267947, 2.08141429, 1.17728937],
[ 7.93019593, 0.4164757 , 3.5318681 ],
[ 3.60455858, 2.91388358, 3.5318681 ],
[ 6.48831681, 2.91388358, 3.5318681 ],
[ 2.16267947, 5.41129147, 3.5318681 ],
[ 5.0464377 , 0.4164757 , 3.5318681 ],
[ 5.0464377 , 5.41129147, 3.5318681 ],
[-0.72107876, 5.41129147, 3.5318681 ],
[ 0.72080035, 2.91388358, 3.5318681 ],
[ 2.16267947, 0.4164757 , 3.5318681 ],
[ 2.16267947, 3.74635288, 5.88644684],
[-2.16295788, 6.24376076, 5.88644684],
[ 0.72080035, 6.24376076, 5.88644684],
[-0.72107876, 3.74635288, 5.88644684],
[ 6.48831681, 1.24894499, 5.88644684],
[ 0.72080035, 1.24894499, 5.88644684],
[ 5.0464377 , 3.74635288, 5.88644684],
[ 3.60455858, 1.24894499, 5.88644684],
[ 3.60455858, 6.24376076, 5.88644684]]*Angstrom
# Set up configuration
right_electrode = BulkConfiguration(
bravais_lattice=right_electrode_lattice,
elements=right_electrode_elements,
cartesian_coordinates=right_electrode_coordinates
)
# -------------------------------------------------------------
# Central region
# -------------------------------------------------------------
# Set up lattice
vector_a = [8.65127469112, -6.75261456523e-33, 0.0]*Angstrom
vector_b = [-4.32563734556, 7.49222365763, 4.09015759516e-16]*Angstrom
vector_c = [0.0, 0.0, 21.4537368239]*Angstrom
central_region_lattice = UnitCell(vector_a, vector_b, vector_c)
# Define elements
central_region_elements = [Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold, Gold, Gold, Gold, Nitrogen, Carbon,
Hydrogen, Hydrogen, Carbon, Carbon, Carbon, Carbon, Hydrogen,
Hydrogen, Carbon, Nitrogen, Hydrogen, Hydrogen, Hydrogen, Hydrogen,
Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold, Gold, Gold, Gold]
# Define coordinates
central_region_coordinates = [[ 0.72107876, 1.24846289, 1.17728937],
[ 3.60483699, 1.24846289, 1.17728937],
[ 6.48859522, 1.24846289, 1.17728937],
[ -0.72080035, 3.74587078, 1.17728937],
[ 5.04671611, 3.74587078, 1.17728937],
[ 2.16295788, 3.74587078, 1.17728937],
[ 3.60483699, 6.24327867, 1.17728937],
[ -2.16267947, 6.24327867, 1.17728937],
[ 0.72107876, 6.24327867, 1.17728937],
[ 2.16295788, 2.08093219, 3.5318681 ],
[ -0.72080035, 2.08093219, 3.5318681 ],
[ 5.04671611, 2.08093219, 3.5318681 ],
[ -3.60455858, 7.07574796, 3.5318681 ],
[ -2.16267947, 4.57834008, 3.5318681 ],
[ 2.16295788, 7.07574796, 3.5318681 ],
[ 3.60483699, 4.57834008, 3.5318681 ],
[ 0.72107876, 4.57834008, 3.5318681 ],
[ -0.72080035, 7.07574796, 3.5318681 ],
[ 7.93047434, 0.4159936 , 5.88644684],
[ 0.72107876, 2.91340148, 5.88644684],
[ 2.16295788, 5.41080937, 5.88644684],
[ -0.72080035, 5.41080937, 5.88644684],
[ 5.04671611, 5.41080937, 5.88644684],
[ 2.16295788, 0.4159936 , 5.88644684],
[ 3.60483699, 2.91340148, 5.88644684],
[ 5.04671611, 0.4159936 , 5.88644684],
[ 6.48859522, 2.91340148, 5.88644684],
[ 2.16296 , 3.74587 , 7.88344 ],
[ 2.16296 , 3.74587 , 9.32715 ],
[ 1.07985 , 5.62137 , 9.47628 ],
[ 3.24595 , 1.87058 , 9.47677 ],
[ 1.55661 , 4.79582 , 10.02683 ],
[ 2.76905 , 2.69637 , 10.02705 ],
[ 1.55659 , 4.79585 , 11.42669 ],
[ 2.76903 , 2.69641 , 11.42691 ],
[ 1.07969 , 5.62165 , 11.97696 ],
[ 3.24579 , 1.87085 , 11.97746 ],
[ 2.16268 , 3.74635 , 12.12659 ],
[ 2.16268 , 3.74635 , 13.5703 ],
[ 2.97945788, 4.21687078, 7.54944143],
[ 1.34645788, 4.21687078, 7.54944143],
[ 2.97945788, 3.27487078, 13.9043 ],
[ 1.34645788, 4.21687078, 13.9043 ],
[ 0.72080035, 4.57882217, 15.56729 ],
[ -0.72107876, 7.07623006, 15.56729 ],
[ 2.16267947, 7.07623006, 15.56729 ],
[ -2.16295788, 4.57882217, 15.56729 ],
[ -0.72107876, 2.08141429, 15.56729 ],
[ 3.60455858, 4.57882217, 15.56729 ],
[ -3.60483699, 7.07623006, 15.56729 ],
[ 5.0464377 , 2.08141429, 15.56729 ],
[ 2.16267947, 2.08141429, 15.56729 ],
[ 7.93019593, 0.4164757 , 17.92186873],
[ 3.60455858, 2.91388358, 17.92186873],
[ 6.48831681, 2.91388358, 17.92186873],
[ 2.16267947, 5.41129147, 17.92186873],
[ 5.0464377 , 0.4164757 , 17.92186873],
[ 5.0464377 , 5.41129147, 17.92186873],
[ -0.72107876, 5.41129147, 17.92186873],
[ 0.72080035, 2.91388358, 17.92186873],
[ 2.16267947, 0.4164757 , 17.92186873],
[ 2.16267947, 3.74635288, 20.27644746],
[ -2.16295788, 6.24376076, 20.27644746],
[ 0.72080035, 6.24376076, 20.27644746],
[ -0.72107876, 3.74635288, 20.27644746],
[ 6.48831681, 1.24894499, 20.27644746],
[ 0.72080035, 1.24894499, 20.27644746],
[ 5.0464377 , 3.74635288, 20.27644746],
[ 3.60455858, 1.24894499, 20.27644746],
[ 3.60455858, 6.24376076, 20.27644746]]*Angstrom
# Set up configuration
central_region = BulkConfiguration(
bravais_lattice=central_region_lattice,
elements=central_region_elements,
cartesian_coordinates=central_region_coordinates
)
device_configuration = DeviceConfiguration(
central_region,
[left_electrode, right_electrode]
)
calculator = device_configuration.calculator()
# Define bias voltages
voltage_list= 0.2 *numpy.arange(1,16)*Volt
#make loop
for voltage in voltage_list:
# Set new calculator with modified electrode voltages on the configuration
# use the self consistent state of the old calculation as starting input.
device_configuration.setCalculator(
calculator(electrode_voltages=(-0.5*voltage, 0.5*voltage)),
initial_state=device_configuration)
# Calculate the transmission spectrum
transmission_spectrum = TransmissionSpectrum(
configuration=device_configuration,
energies=numpy.linspace(-3,3,100)*eV,
kpoints=MonkhorstPackGrid(3,3),
)
#save the results
nlsave('au_dtb_au.nc', device_configuration)
nlsave('au_dtb_au.nc', transmission_spectrum)
The question is the first cycle of the calculation died! Why? I wrote it following the mini tutorial of "molecular device". Oh, the Version of my ATK is 11.2.2.