I tried with the li-h2 tutorial and i get similar results. I will attach my script and a picture.
###############################################################
# TwoProbe configuration
###############################################################
###############################################################
# Left electrode
###############################################################
# Set up lattice
vector_a = [10.0, 0.0, 0.0]*Angstrom
vector_b = [0.0, 10.0, 0.0]*Angstrom
vector_c = [0.0, 0.0, 6.6]*Angstrom
left_electrode_lattice = UnitCell(vector_a, vector_b, vector_c)
# Define elements
left_electrode_elements = [Lithium, Lithium, Lithium]
# Define coordinates
left_electrode_coordinates = [[ 5. , 5. , 1.1],
[ 5. , 5. , 3.3],
[ 5. , 5. , 5.5]]*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 = [10.0, 0.0, 0.0]*Angstrom
vector_b = [0.0, 10.0, 0.0]*Angstrom
vector_c = [0.0, 0.0, 6.6]*Angstrom
right_electrode_lattice = UnitCell(vector_a, vector_b, vector_c)
# Define elements
right_electrode_elements = [Lithium, Lithium, Lithium]
# Define coordinates
right_electrode_coordinates = [[ 5. , 5. , 1.1],
[ 5. , 5. , 3.3],
[ 5. , 5. , 5.5]]*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 = [10.0, 0.0, 0.0]*Angstrom
vector_b = [0.0, 10.0, 0.0]*Angstrom
vector_c = [0.0, 0.0, 24.9]*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 = [[ 5. , 5. , 1.1],
[ 5. , 5. , 3.3],
[ 5. , 5. , 5.5],
[ 5. , 5. , 7.7],
[ 5. , 5. , 9.9],
[ 5. , 5. , 12.1],
[ 5. , 5. , 12.8],
[ 5. , 5. , 15. ],
[ 5. , 5. , 17.2],
[ 5. , 5. , 19.4],
[ 5. , 5. , 21.6],
[ 5. , 5. , 23.8]]*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
###############################################################
#----------------------------------------
# Basis Set
#----------------------------------------
basis_set = GGABasis.DoubleZetaPolarized
#----------------------------------------
# Exchange-Correlation
#----------------------------------------
exchange_correlation = GGA.PBE
#----------------------------------------
# Numerical Accuracy Settings
#----------------------------------------
left_electrode_numerical_accuracy_parameters = NumericalAccuracyParameters(
k_point_sampling=(1, 1, 100),
)
right_electrode_numerical_accuracy_parameters = NumericalAccuracyParameters(
k_point_sampling=(1, 1, 100),
)
#----------------------------------------
# Iteration Control Settings
#----------------------------------------
left_electrode_iteration_control_parameters = IterationControlParameters(
linear_dependence_threshold=4e-05,
)
right_electrode_iteration_control_parameters = IterationControlParameters(
linear_dependence_threshold=4e-05,
)
#----------------------------------------
# Poisson Solver Settings
#----------------------------------------
left_electrode_poisson_solver = MultigridSolver(
boundary_conditions=[[PeriodicBoundaryCondition,PeriodicBoundaryCondition],
[PeriodicBoundaryCondition,PeriodicBoundaryCondition],
[PeriodicBoundaryCondition,PeriodicBoundaryCondition]]
)
right_electrode_poisson_solver = MultigridSolver(
boundary_conditions=[[PeriodicBoundaryCondition,PeriodicBoundaryCondition],
[PeriodicBoundaryCondition,PeriodicBoundaryCondition],
[PeriodicBoundaryCondition,PeriodicBoundaryCondition]]
)
#----------------------------------------
# Electrode Calculators
#----------------------------------------
left_electrode_calculator = LCAOCalculator(
basis_set=basis_set,
exchange_correlation=exchange_correlation,
numerical_accuracy_parameters=left_electrode_numerical_accuracy_parameters,
iteration_control_parameters=left_electrode_iteration_control_parameters,
poisson_solver=left_electrode_poisson_solver,
)
right_electrode_calculator = LCAOCalculator(
basis_set=basis_set,
exchange_correlation=exchange_correlation,
numerical_accuracy_parameters=right_electrode_numerical_accuracy_parameters,
iteration_control_parameters=right_electrode_iteration_control_parameters,
poisson_solver=right_electrode_poisson_solver,
)
#----------------------------------------
# Device Calculator
#----------------------------------------
calculator = DeviceLCAOCalculator(
basis_set=basis_set,
exchange_correlation=exchange_correlation,
electrode_calculators=
[left_electrode_calculator, right_electrode_calculator],
)
device_configuration.setCalculator(calculator)
nlprint(device_configuration)
device_configuration.update()
nlsave('analysis.nc', device_configuration)
local_device_density_of_states = LocalDeviceDensityOfStates(
configuration=device_configuration,
energy=0*eV,
kpoints=MonkhorstPackGrid(1,1,1),
contributions=All,
energy_zero_parameter=AverageFermiLevel,
infinitesimal=1e-06*eV,
self_energy_calculator=KrylovSelfEnergy(),
spin=Spin.Up,
)
nlsave('analysis.nc', local_device_density_of_states)