From 87ef3a433ae519eb2f66b8bb41cf357214962523 Mon Sep 17 00:00:00 2001 From: guanjihuan Date: Wed, 20 Jul 2022 16:21:40 +0800 Subject: [PATCH] 0.0.113 --- API_Reference.py | 2 ++ PyPI/setup.cfg | 2 +- PyPI/src/guan/__init__.py | 21 ++++++++++++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/API_Reference.py b/API_Reference.py index 4076826..6037d37 100644 --- a/API_Reference.py +++ b/API_Reference.py @@ -209,6 +209,8 @@ conductance = guan.calculate_conductance(fermi_energy, h00, h01, length=100) conductance_array = guan.calculate_conductance_with_fermi_energy_array(fermi_energy_array, h00, h01, length=100, print_show=0) +conductance = guan.calculate_conductance_with_barrier(fermi_energy, h00, h01, length=100, barrier_length=20, barrier_potential=1) + conductance = guan.calculate_conductance_with_disorder(fermi_energy, h00, h01, disorder_intensity=2.0, disorder_concentration=1.0, length=100) conductance_array = guan.calculate_conductance_with_disorder_intensity_array(fermi_energy, h00, h01, disorder_intensity_array, disorder_concentration=1.0, length=100, calculation_times=1, print_show=0) diff --git a/PyPI/setup.cfg b/PyPI/setup.cfg index 0e6edd8..b0b4028 100644 --- a/PyPI/setup.cfg +++ b/PyPI/setup.cfg @@ -1,7 +1,7 @@ [metadata] # replace with your username: name = guan -version = 0.0.112 +version = 0.0.113 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 41cf1fa..91b58dd 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.112, updated on July 20, 2022. +# The current version is guan-0.0.113, updated on July 20, 2022. # Installation: pip install --upgrade guan @@ -1137,6 +1137,25 @@ def calculate_conductance_with_fermi_energy_array(fermi_energy_array, h00, h01, i0 += 1 return conductance_array +def calculate_conductance_with_barrier(fermi_energy, h00, h01, length=100, barrier_length=20, barrier_potential=1): + right_self_energy, left_self_energy, gamma_right, gamma_left = guan.self_energy_of_lead(fermi_energy, h00, h01) + dim = np.array(h00).shape[0] + for ix in range(length): + if ix == 0: + green_nn_n = guan.green_function(fermi_energy, h00, broadening=0, self_energy=left_self_energy) + green_0n_n = copy.deepcopy(green_nn_n) + elif int(length/2-barrier_length/2)<=ix