0.0.86
This commit is contained in:
parent
6a056b04c2
commit
a8fd9a20ad
@ -1 +1 @@
|
||||
Guan is an open-source python package developed and maintained by https://www.guanjihuan.com/about. The primary location of this package is on website https://py.guanjihuan.com.
|
||||
Guan is an open-source python package developed and maintained by https://www.guanjihuan.com/about. The primary location of this package is on website https://py.guanjihuan.com. 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.
|
@ -1,10 +1,10 @@
|
||||
[metadata]
|
||||
# replace with your username:
|
||||
name = guan
|
||||
version = 0.0.85
|
||||
version = 0.0.86
|
||||
author = guanjihuan
|
||||
author_email = guanjihuan@163.com
|
||||
description = Guan is an open-source python package developed and maintained by https://www.guanjihuan.com/about. The primary location of this package is on website https://py.guanjihuan.com. 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.
|
||||
description = An open source python package
|
||||
long_description = file: README.md
|
||||
long_description_content_type = text/markdown
|
||||
url = https://py.guanjihuan.com
|
||||
|
@ -109,7 +109,9 @@ hamiltonian = guan.hamiltonian_of_finite_size_system_along_two_directions_for_sq
|
||||
|
||||
hamiltonian = guan.hamiltonian_of_finite_size_system_along_three_directions_for_cubic_lattice(N1, N2, N3, on_site=0, hopping_1=1, hopping_2=1, hopping_3=1, period_1=0, period_2=0, period_3=0)
|
||||
|
||||
hopping = guan.hopping_matrix_along_zigzag_direction_for_graphene_ribbon(N)
|
||||
hamiltonian = guan.hamiltonian_of_finite_size_SSH_model(N, v=0.6, w=1, onsite_1=0, onsite_2=0, period=1)
|
||||
|
||||
hopping = guan.hopping_matrix_along_zigzag_direction_for_graphene_ribbon(N, eta=0)
|
||||
|
||||
hamiltonian = guan.hamiltonian_of_finite_size_system_along_two_directions_for_graphene(N1, N2, period_1=0, period_2=0)
|
||||
|
||||
@ -609,9 +611,28 @@ def hamiltonian_of_finite_size_system_along_three_directions_for_cubic_lattice(N
|
||||
hamiltonian[i1*N2*N3*dim+i2*N3*dim+0:i1*N2*N3*dim+i2*N3*dim+dim, i1*N2*N3*dim+i2*N3*dim+(N3-1)*dim+0:i1*N2*N3*dim+i2*N3*dim+(N3-1)*dim+dim] = hopping_3.transpose().conj()
|
||||
return hamiltonian
|
||||
|
||||
def hopping_matrix_along_zigzag_direction_for_graphene_ribbon(N):
|
||||
def hamiltonian_of_finite_size_SSH_model(N, v=0.6, w=1, onsite_1=0, onsite_2=0, period=1):
|
||||
hamiltonian = np.zeros((2*N, 2*N))
|
||||
for i in range(N):
|
||||
hamiltonian[i*2+0, i*2+0] = onsite_1
|
||||
hamiltonian[i*2+1, i*2+1] = onsite_2
|
||||
hamiltonian[i*2+0, i*2+1] = v
|
||||
hamiltonian[i*2+1, i*2+0] = v
|
||||
for i in range(N-1):
|
||||
hamiltonian[i*2+1, (i+1)*2+0] = w
|
||||
hamiltonian[(i+1)*2+0, i*2+1] = w
|
||||
if period==1:
|
||||
hamiltonian[0, 2*N-1] = w
|
||||
hamiltonian[2*N-1, 0] = w
|
||||
return hamiltonian
|
||||
|
||||
def hopping_matrix_along_zigzag_direction_for_graphene_ribbon(N, eta=0):
|
||||
hopping = np.zeros((4*N, 4*N), dtype=complex)
|
||||
for i0 in range(N):
|
||||
hopping[4*i0+0, 4*i0+0] = eta
|
||||
hopping[4*i0+1, 4*i0+1] = eta
|
||||
hopping[4*i0+2, 4*i0+2] = eta
|
||||
hopping[4*i0+3, 4*i0+3] = eta
|
||||
hopping[4*i0+1, 4*i0+0] = 1
|
||||
hopping[4*i0+2, 4*i0+3] = 1
|
||||
return hopping
|
||||
|
@ -31,7 +31,7 @@ import guan
|
||||
|
||||
## About this package
|
||||
|
||||
+ The original motivation of this project is for self use. Based on this project, the frequent functions can be imported by “import guan” instead of repeated copies and pastes. You can also install and use this open-source package if some functions are helpful for you. If one function is not good enough, you can copy the source code and modify it. You can also feed back to guanjihuan@163.com. The modifications and supplements will be in the following updated version.
|
||||
+ The original motivation of this project is for self use. Based on this project, the frequent functions can be imported by “import guan” instead of repeated copies and pastes. You can also install and use this open-source package if some functions are helpful for you. If one function is not good enough, you can copy the Source Code and modify it. You can also feed back to guanjihuan@163.com. The modifications and supplements will be in the following updated version.
|
||||
+ All realizations of this package are based on functions without any class, which are concise and convenient. The boring document is omitted and you have to read the Source Code for details if it is necessary. Nevertheless, you don’t have to be worried about the difficulty, because all functions are simple enough without too many prejudgments and the variable names are written commonly as far as possible for the easy reading.
|
||||
+ Before the beginning of function call in your project, you are recommended to briefly read the Source Code to know the specific formats of input and output about the function. Applying functions mechanically may cause errors. Notice that as the package is developed, the function names may be changed in the future version. Therefore, the latest API Reference is important and helpful.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user