# -------------------------------------------------------------
# TwoProbe configuration
# -------------------------------------------------------------
# -------------------------------------------------------------
# Left electrode
# -------------------------------------------------------------
# Set up lattice
vector_a = [2.866, 0.0, 0.0]*Angstrom
vector_b = [0.0, 2.866, 0.0]*Angstrom
vector_c = [0.0, 0.0, 5.73200039971]*Angstrom
left_electrode_lattice = UnitCell(vector_a, vector_b, vector_c)
# Define elements
left_electrode_elements = [Cobalt, Iron, Cobalt, Iron]
# Define coordinates
left_electrode_coordinates = [[ 0.7165 , 0.7165 , 0.71650033],
[ 2.1495 , 2.1495 , 2.14950024],
[ 0.7165 , 0.7165 , 3.58250053],
[ 2.1495 , 2.1495 , 5.01550044]]*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 = [2.866, 0.0, 0.0]*Angstrom
vector_b = [0.0, 2.866, 0.0]*Angstrom
vector_c = [0.0, 0.0, 5.73200039972]*Angstrom
right_electrode_lattice = UnitCell(vector_a, vector_b, vector_c)
# Define elements
right_electrode_elements = [Iron, Cobalt, Iron, Cobalt]
# Define coordinates
right_electrode_coordinates = [[ 0.7165 , 0.7165 , 0.71649996],
[ 2.1495 , 2.1495 , 2.14949987],
[ 0.7165 , 0.7165 , 3.58250016],
[ 2.1495 , 2.1495 , 5.01550007]]*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 = [2.866, 0.0, 0.0]*Angstrom
vector_b = [0.0, 2.866, 0.0]*Angstrom
vector_c = [0.0, 0.0, 36.8717507374]*Angstrom
central_region_lattice = UnitCell(vector_a, vector_b, vector_c)
# Define elements
central_region_elements = [Cobalt, Iron, Cobalt, Iron, Cobalt, Iron, Cobalt, Iron,
Magnesium, Oxygen, Oxygen, Magnesium, Magnesium, Oxygen, Oxygen,
Magnesium, Magnesium, Oxygen, Oxygen, Magnesium, Iron, Cobalt,
Iron, Cobalt, Iron, Cobalt, Iron, Cobalt]
# Define coordinates
central_region_coordinates = [[ 0.7165 , 0.7165 , 0.71650033],
[ 2.1495 , 2.1495 , 2.14950024],
[ 0.7165 , 0.7165 , 3.58250053],
[ 2.1495 , 2.1495 , 5.01550044],
[ 0.7165 , 0.7165 , 6.44850036],
[ 2.1495 , 2.1495 , 7.88150027],
[ 0.7165 , 0.7165 , 9.36442933],
[ 2.1495 , 2.1495 , 10.79813571],
[ 0.7165 , 0.7165 , 12.91444474],
[ 2.1495 , 2.1495 , 12.99944039],
[ 0.7165 , 0.7165 , 15.14106372],
[ 2.1495 , 2.1495 , 15.15083326],
[ 0.7165 , 0.7165 , 17.3384058 ],
[ 2.1495 , 2.1495 , 17.33910931],
[ 0.7165 , 0.7165 , 19.53262631],
[ 2.1495 , 2.1495 , 19.53335305],
[ 0.7165 , 0.7165 , 21.72092411],
[ 2.1495 , 2.1495 , 21.73066969],
[ 0.7165 , 0.7165 , 23.87230076],
[ 2.1495 , 2.1495 , 23.95731706],
[ 0.7165 , 0.7165 , 26.0736154 ],
[ 2.1495 , 2.1495 , 27.50733542],
[ 0.7165 , 0.7165 , 28.99025046],
[ 2.1495 , 2.1495 , 30.42325038],
[ 0.7165 , 0.7165 , 31.8562503 ],
[ 2.1495 , 2.1495 , 33.28925021],
[ 0.7165 , 0.7165 , 34.7222505 ],
[ 2.1495 , 2.1495 , 36.15525041]]*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.Oxygen_DoubleZetaPolarized,
GGABasis.Magnesium_DoubleZetaPolarized,
GGABasis.Iron_SingleZetaPolarized,
GGABasis.Cobalt_SingleZetaPolarized,
]
#----------------------------------------
# Exchange-Correlation
#----------------------------------------
exchange_correlation = SGGA.PBE
#----------------------------------------
# Numerical Accuracy Settings
#----------------------------------------
left_electrode_numerical_accuracy_parameters = NumericalAccuracyParameters(
k_point_sampling=(6, 6, 100),
)
right_electrode_numerical_accuracy_parameters = NumericalAccuracyParameters(
k_point_sampling=(6, 6, 100),
)
device_numerical_accuracy_parameters = NumericalAccuracyParameters(
k_point_sampling=(6, 6, 100),
)
#----------------------------------------
# Poisson Solver Settings
#----------------------------------------
left_electrode_poisson_solver = FastFourier2DSolver(
boundary_conditions=[[PeriodicBoundaryCondition,PeriodicBoundaryCondition],
[PeriodicBoundaryCondition,PeriodicBoundaryCondition],
[PeriodicBoundaryCondition,PeriodicBoundaryCondition]]
)
right_electrode_poisson_solver = FastFourier2DSolver(
boundary_conditions=[[PeriodicBoundaryCondition,PeriodicBoundaryCondition],
[PeriodicBoundaryCondition,PeriodicBoundaryCondition],
[PeriodicBoundaryCondition,PeriodicBoundaryCondition]]
)
device_algorithm_parameters = DeviceAlgorithmParameters(
self_energy_calculator_real=KrylovSelfEnergy(save_self_energies=True, lambda_min=0.1),
)
#----------------------------------------
# Electrode Calculators
#----------------------------------------
left_electrode_calculator = LCAOCalculator(
basis_set=basis_set,
exchange_correlation=exchange_correlation,
numerical_accuracy_parameters=left_electrode_numerical_accuracy_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,
poisson_solver=right_electrode_poisson_solver,
)
#----------------------------------------
# Device Calculator
#----------------------------------------
calculator = DeviceLCAOCalculator(
basis_set=basis_set,
exchange_correlation=exchange_correlation,
numerical_accuracy_parameters=device_numerical_accuracy_parameters,
device_algorithm_parameters=device_algorithm_parameters,
electrode_calculators=
[left_electrode_calculator, right_electrode_calculator],
)
# -------------------------------------------------------------
# Initial State
# -------------------------------------------------------------
initial_spin = InitialSpin(scaled_spins=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0])
for bias in [0., 0.1, 0.2, 0.3, 0.5]*Volt:
device_configuration.setCalculator(
calculator(electrode_voltages=(0.5*bias,-0.5*bias)),
initial_state=device_configuration
)
device_configuration.update()
nlsave('C:/Users/Alexander/Documents/VNL_tmp/CoFe-MgO-CoFe_anti_I-V.nc', device_configuration)
nlprint(device_configuration)
I calculate this structure with anti parallel spin and when calculation begin it say:
Does it means that my calculation not include the spin orientation?
When i calculate with parallel spin I see the same message and the same result in I-V curve with Parallel and AntiParallel state.
Help me with it and tell what i do wrong!