This commit is contained in:
guanjihuan 2022-07-19 16:51:30 +08:00
parent 42fca57089
commit c9389df4fc
3 changed files with 6 additions and 7 deletions

View File

@ -227,7 +227,7 @@ k_right, k_left, velocity_right, velocity_left, f_right, f_left, u_right, u_left
transmission_matrix, reflection_matrix, k_right, k_left, velocity_right, velocity_left, ind_right_active = guan.calculate_scattering_matrix(fermi_energy, h00, h01, length=100)
number_of_active_channels, number_of_evanescent_channels, k_of_right_moving_active_channels, k_of_left_moving_active_channels, velocity_of_right_moving_active_channels, velocity_of_left_moving_active_channels, transmission_matrix_for_active_channels, reflection_matrix_for_active_channels, total_transmission_of_channels, total_conductance, total_reflection_of_channels, sum_of_transmission_and_reflection_of_channels = guan.information_of_scattering_matrix(fermi_energy, h00, h01, length=100)
number_of_active_channels, number_of_evanescent_channels, k_of_right_moving_active_channels, k_of_left_moving_active_channels, velocity_of_right_moving_active_channels, velocity_of_left_moving_active_channels, transmission_matrix_for_active_channels, reflection_matrix_for_active_channels, total_transmission_of_channels, total_conductance, total_reflection_of_channels, sum_of_transmission_and_reflection_of_channels = guan.information_of_scattering_matrix(transmission_matrix, reflection_matrix, k_right, k_left, velocity_right, velocity_left, ind_right_active)
guan.print_or_write_scattering_matrix(fermi_energy, h00, h01, length=100, print_show=1, write_file=0, filename='a', format='txt')

View File

@ -1,7 +1,7 @@
[metadata]
# replace with your username:
name = guan
version = 0.0.110
version = 0.0.111
author = guanjihuan
author_email = guanjihuan@163.com
description = An open source python package

View File

@ -2,7 +2,7 @@
# With this package, you can calculate band structures, density of states, quantum transport and topological invariant of tight-binding models by invoking the functions you need. Other frequently used functions are also integrated in this package, such as file reading/writing, figure plotting, data processing.
# The current version is guan-0.0.110, updated on July 14, 2022.
# The current version is guan-0.0.111, updated on July 19, 2022.
# Installation: pip install --upgrade guan
@ -1381,12 +1381,11 @@ def calculate_scattering_matrix(fermi_energy, h00, h01, length=100):
print('Error Alert: scattering matrix is not normalized!')
return transmission_matrix, reflection_matrix, k_right, k_left, velocity_right, velocity_left, ind_right_active
def information_of_scattering_matrix(fermi_energy, h00, h01, length=100):
if np.array(h00).shape==():
def information_of_scattering_matrix(transmission_matrix, reflection_matrix, k_right, k_left, velocity_right, velocity_left, ind_right_active):
if np.array(transmission_matrix).shape==():
dim = 1
else:
dim = np.array(h00).shape[0]
transmission_matrix, reflection_matrix, k_right, k_left, velocity_right, velocity_left, ind_right_active = guan.calculate_scattering_matrix(fermi_energy, h00, h01, length)
dim = np.array(transmission_matrix).shape[0]
number_of_active_channels = ind_right_active
number_of_evanescent_channels = dim-ind_right_active
k_of_right_moving_active_channels = np.real(k_right[0:ind_right_active])