diff --git a/API_Reference.py b/API_Reference.py index 2963a12..2395d8f 100644 --- a/API_Reference.py +++ b/API_Reference.py @@ -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') diff --git a/PyPI/setup.cfg b/PyPI/setup.cfg index 34a38e4..b0e8575 100644 --- a/PyPI/setup.cfg +++ b/PyPI/setup.cfg @@ -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 diff --git a/PyPI/src/guan/__init__.py b/PyPI/src/guan/__init__.py index 63a8b76..9ca3cfd 100644 --- a/PyPI/src/guan/__init__.py +++ b/PyPI/src/guan/__init__.py @@ -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])