# -*- coding: utf-8 -*-
# -------------------------------------------------------------
# Two-probe Configuration
# -------------------------------------------------------------
# -------------------------------------------------------------
# Left Electrode
# -------------------------------------------------------------
# Set up lattice
vector_a = [12.0, 0.0, 0.0]*Angstrom
vector_b = [0.0, 12.0, 0.0]*Angstrom
vector_c = [0.0, 0.0, 5.88171421]*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]
# Define coordinates
left_electrode_coordinates = [[ 5.89496938918 , 6.369816335081, 0.735242827216],
[ 5.89496938918 , 9.310673438036, 0.735242827216],
[ 3.81546938918 , 4.899387783604, 2.205671378694],
[ 3.81546938918 , 7.840244886558, 2.205671378694],
[ 7.97446938918 , 4.899387783604, 2.205671378694],
[ 7.97446938918 , 7.840244886559, 2.205671378694],
[ 5.89496938918 , 6.369816335081, 3.676099930171],
[ 5.89496938918 , 9.310673438036, 3.676099930171],
[ 7.97446938918 , 4.899387783604, 5.146528481649],
[ 7.97446938918 , 7.840244886558, 5.146528481649],
[ 3.81546938918 , 4.899387783604, 5.146528481649],
[ 3.81546938918 , 7.840244886558, 5.146528481648]]*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 = [12.0, 0.0, 0.0]*Angstrom
vector_b = [0.0, 12.0, 0.0]*Angstrom
vector_c = [0.0, 0.0, 5.88171421]*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]
# Define coordinates
right_electrode_coordinates = [[ 7.97447 , 4.899387172784, 0.735185728352],
[ 7.97447 , 7.840244275739, 0.735185728352],
[ 3.81547 , 4.899387172784, 0.735185728352],
[ 3.81547 , 7.840244275739, 0.735185728352],
[ 5.89497 , 9.310672827216, 2.205614279829],
[ 5.89497 , 6.369815724261, 2.205614279829],
[ 7.97447 , 7.840244275739, 3.676042831306],
[ 3.81547 , 7.840244275739, 3.676042831306],
[ 7.97447 , 4.899387172784, 3.676042831306],
[ 3.81547 , 4.899387172784, 3.676042831306],
[ 5.89497 , 9.310672827216, 5.146471382784],
[ 5.89497 , 6.369815724261, 5.146471382784]]*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 = [12.0, 0.0, 0.0]*Angstrom
vector_b = [0.0, 12.0, 0.0]*Angstrom
vector_c = [0.0, 0.0, 25.233928324954178]*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, Hydrogen, Carbon, Hydrogen, Hydrogen, Carbon, Carbon, Carbon,
Carbon, Hydrogen, Hydrogen, Carbon, Hydrogen, Gold, Gold, Gold,
Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold, Gold]
# Define coordinates
central_region_coordinates = [[ 5.89496938918 , 6.369816335081, 0.735242827216],
[ 5.89496938918 , 9.310673438036, 0.735242827216],
[ 3.81546938918 , 4.899387783604, 2.205671378694],
[ 3.81546938918 , 7.840244886558, 2.205671378694],
[ 7.97446938918 , 4.899387783604, 2.205671378694],
[ 7.97446938918 , 7.840244886559, 2.205671378694],
[ 5.89496938918 , 6.369816335081, 3.676099930171],
[ 5.89496938918 , 9.310673438036, 3.676099930171],
[ 7.97446938918 , 4.899387783604, 5.146528481649],
[ 7.97446938918 , 7.840244886558, 5.146528481649],
[ 3.81546938918 , 4.899387783604, 5.146528481649],
[ 3.81546938918 , 7.840244886558, 5.146528481648],
[ 5.979528 , 5.8978735 , 10.133376813333],
[ 5.98854 , 5.9427995 , 11.227117813333],
[ 8.139325 , 6.0629885 , 11.352576813333],
[ 3.840072 , 5.8348215 , 11.397538813333],
[ 7.197288 , 6.0352055 , 11.909501813333],
[ 4.791217 , 5.9075385 , 11.934521813333],
[ 7.208723 , 6.0924095 , 13.299424813333],
[ 4.802674 , 5.9647895 , 13.324419813333],
[ 8.159928 , 6.1651785 , 13.836366813333],
[ 3.860514 , 5.9371685 , 13.881070813333],
[ 6.011398 , 6.0571905 , 14.006834813333],
[ 6.020461 , 6.1022335 , 15.100537813333],
[ 7.97447 , 4.899387172784, 20.087399843306],
[ 7.97447 , 7.840244275739, 20.087399843306],
[ 3.81547 , 4.899387172784, 20.087399843306],
[ 3.81547 , 7.840244275739, 20.087399843306],
[ 5.89497 , 9.310672827216, 21.557828394783],
[ 5.89497 , 6.369815724261, 21.557828394783],
[ 7.97447 , 7.840244275739, 23.02825694626 ],
[ 3.81547 , 7.840244275739, 23.02825694626 ],
[ 7.97447 , 4.899387172784, 23.02825694626 ],
[ 3.81547 , 4.899387172784, 23.02825694626 ],
[ 5.89497 , 9.310672827216, 24.498685497738],
[ 5.89497 , 6.369815724261, 24.498685497738]]*Angstrom
# Set up configuration
central_region = BulkConfiguration(
bravais_lattice=central_region_lattice,
elements=central_region_elements,
cartesian_coordinates=central_region_coordinates
)
# Add metallic region
metallic_region_0 = BoxRegion(
4.0*Volt,
xmin = 0.0*Angstrom, xmax = 12.0*Angstrom,
ymin = 0.0*Angstrom, ymax = 1.0*Angstrom,
zmin = 6.61695731333*Angstrom, zmax = 18.6169573133*Angstrom,
)
metallic_regions = [metallic_region_0]
central_region.setMetallicRegions(metallic_regions)
# Add dielectric region
dielectric_region_0 = BoxRegion(
10.0,
xmin = 0.0*Angstrom, xmax = 12.0*Angstrom,
ymin = 1.0*Angstrom, ymax = 4.7*Angstrom,
zmin = 6.61695731333*Angstrom, zmax = 18.6169573133*Angstrom,
)
dielectric_regions = [dielectric_region_0]
central_region.setDielectricRegions(dielectric_regions)
device_configuration = DeviceConfiguration(
central_region,
[left_electrode, right_electrode],
equivalent_electrode_lengths=[5.88171421, 5.88171421]*Angstrom,
transverse_electrode_repetitions=[[1, 1], [1, 1]],
)
# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
#----------------------------------------
# Basis Set
#----------------------------------------
basis_set = [
LDABasis.Hydrogen_DoubleZetaPolarized,
LDABasis.Carbon_DoubleZetaPolarized,
LDABasis.Gold_SingleZetaPolarized,
]
#----------------------------------------
# Exchange-Correlation
#----------------------------------------
exchange_correlation = LDA.PZ
#----------------------------------------
# Numerical Accuracy Settings
#----------------------------------------
device_k_point_sampling = KpointDensity(
density_c=150.0*Angstrom,
)
device_numerical_accuracy_parameters = NumericalAccuracyParameters(
k_point_sampling=device_k_point_sampling,
density_mesh_cutoff=75.0*Hartree,
)
#----------------------------------------
# Poisson Solver Settings
#----------------------------------------
device_poisson_solver = MultigridSolver(
boundary_conditions=[[NeumannBoundaryCondition(),NeumannBoundaryCondition()],
[NeumannBoundaryCondition(),NeumannBoundaryCondition()],
[DirichletBoundaryCondition(),DirichletBoundaryCondition()]]
)
#----------------------------------------
# Contour Integral Settings
#----------------------------------------
equilibrium_contour = SemiCircleContour(
integral_lower_bound=1.87054058324*Hartree,
circle_points=30,
)
contour_parameters = ContourParameters(
equilibrium_contour=equilibrium_contour,
)
#----------------------------------------
# Device Calculator
#----------------------------------------
calculator = DeviceLCAOCalculator(
basis_set=basis_set,
exchange_correlation=exchange_correlation,
numerical_accuracy_parameters=device_numerical_accuracy_parameters,
poisson_solver=device_poisson_solver,
contour_parameters=contour_parameters,
)
device_configuration.setCalculator(calculator)
nlprint(device_configuration)
device_configuration.update()
nlsave('1208 prototype device1.hdf5', device_configuration)
# -------------------------------------------------------------
# Device Density Of States
# -------------------------------------------------------------
kpoint_grid = MonkhorstPackGrid()
device_density_of_states = DeviceDensityOfStates(
configuration=device_configuration,
energies=numpy.linspace(-2,2,101)*eV,
kpoints=kpoint_grid,
contributions=All,
energy_zero_parameter=AverageFermiLevel,
infinitesimal=1e-06*eV,
self_energy_calculator=RecursionSelfEnergy(storage_strategy=NoStorage()),
)
nlsave('1208 prototype device1.hdf5', device_density_of_states)
nlprint(device_density_of_states)
# -------------------------------------------------------------
# Molecular Energy Spectrum
# -------------------------------------------------------------
molecular_energy_spectrum = MolecularEnergySpectrum(
configuration=device_configuration,
energy_zero_parameter=FermiLevel,
projection_list=ProjectionList(elements=[Carbon, Hydrogen])
)
nlsave('1208 prototype device1.hdf5', molecular_energy_spectrum)
nlprint(molecular_energy_spectrum)