7
« on: April 23, 2012, 10:36 »
This is the full input file.
# -------------------------------------------------------------
# TwoProbe configuration
# -------------------------------------------------------------
# -------------------------------------------------------------
# Left electrode
# -------------------------------------------------------------
# Set up lattice
vector_a = [6.0, 0.0, 0.0]*Angstrom
vector_b = [0.0, 6.0, 0.0]*Angstrom
vector_c = [0.0, 0.0, 6.22841]*Angstrom
left_electrode_lattice = UnitCell(vector_a, vector_b, vector_c)
# Define elements
left_electrode_elements = [Lithium, Lithium]
# Define coordinates
left_electrode_coordinates = [[ 3. , 3. , 1.5571025],
[ 3. , 3. , 4.6713075]]*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 = [6.0, 0.0, 0.0]*Angstrom
vector_b = [0.0, 6.0, 0.0]*Angstrom
vector_c = [0.0, 0.0, 6.22841]*Angstrom
right_electrode_lattice = UnitCell(vector_a, vector_b, vector_c)
# Define elements
right_electrode_elements = [Lithium, Lithium]
# Define coordinates
right_electrode_coordinates = [[ 3. , 3. , 1.557102],
[ 3. , 3. , 4.671308]]*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 = [6.0, 0.0, 0.0]*Angstrom
vector_b = [0.0, 6.0, 0.0]*Angstrom
vector_c = [0.0, 0.0, 33.1418095157]*Angstrom
central_region_lattice = UnitCell(vector_a, vector_b, vector_c)
# Define elements
central_region_elements = [Lithium, Lithium, Lithium, Lithium, Lithium, Hydrogen, Hydrogen,
Lithium, Lithium, Lithium, Lithium, Lithium]
# Define coordinates
central_region_coordinates = [[ 3. , 3. , 1.5571025 ],
[ 3. , 3. , 4.6713075 ],
[ 3. , 3. , 7.76171051],
[ 3. , 3. , 10.91847415],
[ 3. , 3. , 13.93149176],
[ 3. , 3. , 16.15851591],
[ 3. , 3. , 16.98337712],
[ 3. , 3. , 19.21030765],
[ 3. , 3. , 22.2234055 ],
[ 3. , 3. , 25.38002278],
[ 3. , 3. , 28.47050152],
[ 3. , 3. , 31.58470752]]*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
# -------------------------------------------------------------
#----------------------------------------
# Numerical Accuracy Settings
#----------------------------------------
left_electrode_numerical_accuracy_parameters = NumericalAccuracyParameters(
grid_mesh_cutoff=50.0*Hartree,
k_point_sampling=(1, 1, 100),
)
right_electrode_numerical_accuracy_parameters = NumericalAccuracyParameters(
grid_mesh_cutoff=50.0*Hartree,
k_point_sampling=(1, 1, 100),
)
device_numerical_accuracy_parameters = NumericalAccuracyParameters(
grid_mesh_cutoff=50.0*Hartree,
)
#----------------------------------------
# Electrode Calculators
#----------------------------------------
left_electrode_calculator = LCAOCalculator(
numerical_accuracy_parameters=left_electrode_numerical_accuracy_parameters,
)
right_electrode_calculator = LCAOCalculator(
numerical_accuracy_parameters=right_electrode_numerical_accuracy_parameters,
)
#----------------------------------------
# Device Calculator
#----------------------------------------
calculator = DeviceLCAOCalculator(
numerical_accuracy_parameters=device_numerical_accuracy_parameters,
electrode_calculators=
[left_electrode_calculator, right_electrode_calculator],
)
device_configuration.setCalculator(calculator)
nlprint(device_configuration)
device_configuration.update()
nlsave('li_h2.nc', device_configuration)
# -------------------------------------------------------------
# Transmission spectrum
# -------------------------------------------------------------
transmission_spectrum = TransmissionSpectrum(
configuration=device_configuration,
energies=numpy.linspace(-5,5,101)*eV,
kpoints=MonkhorstPackGrid(1,1),
energy_zero_parameter=AverageFermiLevel,
infinitesimal=1e-06*eV,
self_energy_calculator=KrylovSelfEnergy(),
)
nlsave('li_h2.nc', transmission_spectrum)
nlprint(transmission_spectrum)