0.0.142
This commit is contained in:
parent
def88e0cd6
commit
46d5e23f06
@ -1,7 +1,7 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
# replace with your username:
|
# replace with your username:
|
||||||
name = guan
|
name = guan
|
||||||
version = 0.0.141
|
version = 0.0.142
|
||||||
author = guanjihuan
|
author = guanjihuan
|
||||||
author_email = guanjihuan@163.com
|
author_email = guanjihuan@163.com
|
||||||
description = An open source python package
|
description = An open source python package
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Metadata-Version: 2.1
|
Metadata-Version: 2.1
|
||||||
Name: guan
|
Name: guan
|
||||||
Version: 0.0.141
|
Version: 0.0.142
|
||||||
Summary: An open source python package
|
Summary: An open source python package
|
||||||
Home-page: https://py.guanjihuan.com
|
Home-page: https://py.guanjihuan.com
|
||||||
Author: guanjihuan
|
Author: guanjihuan
|
||||||
|
@ -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.
|
# 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.141, updated on December 09, 2022.
|
# The current version is guan-0.0.142, updated on December 10, 2022.
|
||||||
|
|
||||||
# Installation: pip install --upgrade guan
|
# Installation: pip install --upgrade guan
|
||||||
|
|
||||||
@ -1776,46 +1776,46 @@ def calculate_berry_curvature_with_efficient_method_for_degenerate_case(hamilton
|
|||||||
eigenvalue, vector_delta_kx_ky = np.linalg.eigh(H_delta_kx_ky)
|
eigenvalue, vector_delta_kx_ky = np.linalg.eigh(H_delta_kx_ky)
|
||||||
dim = len(index_of_bands)
|
dim = len(index_of_bands)
|
||||||
det_value = 1
|
det_value = 1
|
||||||
# first dot
|
# first dot product
|
||||||
dot_matrix = np.zeros((dim , dim), dtype=complex)
|
dot_matrix = np.zeros((dim , dim), dtype=complex)
|
||||||
i0 = 0
|
i0 = 0
|
||||||
for dim1 in index_of_bands:
|
for dim1 in index_of_bands:
|
||||||
j0 = 0
|
j0 = 0
|
||||||
for dim2 in index_of_bands:
|
for dim2 in index_of_bands:
|
||||||
dot_matrix[dim1, dim2] = np.dot(np.conj(vector[:, dim1]), vector_delta_kx[:, dim2])
|
dot_matrix[i0, j0] = np.dot(np.conj(vector[:, dim1]), vector_delta_kx[:, dim2])
|
||||||
j0 += 1
|
j0 += 1
|
||||||
i0 += 1
|
i0 += 1
|
||||||
dot_matrix = np.linalg.det(dot_matrix)/abs(np.linalg.det(dot_matrix))
|
dot_matrix = np.linalg.det(dot_matrix)/abs(np.linalg.det(dot_matrix))
|
||||||
det_value = det_value*dot_matrix
|
det_value = det_value*dot_matrix
|
||||||
# second dot
|
# second dot product
|
||||||
dot_matrix = np.zeros((dim , dim), dtype=complex)
|
dot_matrix = np.zeros((dim , dim), dtype=complex)
|
||||||
i0 = 0
|
i0 = 0
|
||||||
for dim1 in index_of_bands:
|
for dim1 in index_of_bands:
|
||||||
j0 = 0
|
j0 = 0
|
||||||
for dim2 in index_of_bands:
|
for dim2 in index_of_bands:
|
||||||
dot_matrix[dim1, dim2] = np.dot(np.conj(vector_delta_kx[:, dim1]), vector_delta_kx_ky[:, dim2])
|
dot_matrix[i0, j0] = np.dot(np.conj(vector_delta_kx[:, dim1]), vector_delta_kx_ky[:, dim2])
|
||||||
j0 += 1
|
j0 += 1
|
||||||
i0 += 1
|
i0 += 1
|
||||||
dot_matrix = np.linalg.det(dot_matrix)/abs(np.linalg.det(dot_matrix))
|
dot_matrix = np.linalg.det(dot_matrix)/abs(np.linalg.det(dot_matrix))
|
||||||
det_value = det_value*dot_matrix
|
det_value = det_value*dot_matrix
|
||||||
# third dot
|
# third dot product
|
||||||
dot_matrix = np.zeros((dim , dim), dtype=complex)
|
dot_matrix = np.zeros((dim , dim), dtype=complex)
|
||||||
i0 = 0
|
i0 = 0
|
||||||
for dim1 in index_of_bands:
|
for dim1 in index_of_bands:
|
||||||
j0 = 0
|
j0 = 0
|
||||||
for dim2 in index_of_bands:
|
for dim2 in index_of_bands:
|
||||||
dot_matrix[dim1, dim2] = np.dot(np.conj(vector_delta_kx_ky[:, dim1]), vector_delta_ky[:, dim2])
|
dot_matrix[i0, j0] = np.dot(np.conj(vector_delta_kx_ky[:, dim1]), vector_delta_ky[:, dim2])
|
||||||
j0 += 1
|
j0 += 1
|
||||||
i0 += 1
|
i0 += 1
|
||||||
dot_matrix = np.linalg.det(dot_matrix)/abs(np.linalg.det(dot_matrix))
|
dot_matrix = np.linalg.det(dot_matrix)/abs(np.linalg.det(dot_matrix))
|
||||||
det_value = det_value*dot_matrix
|
det_value = det_value*dot_matrix
|
||||||
# four dot
|
# four dot product
|
||||||
dot_matrix = np.zeros((dim , dim), dtype=complex)
|
dot_matrix = np.zeros((dim , dim), dtype=complex)
|
||||||
i0 = 0
|
i0 = 0
|
||||||
for dim1 in index_of_bands:
|
for dim1 in index_of_bands:
|
||||||
j0 = 0
|
j0 = 0
|
||||||
for dim2 in index_of_bands:
|
for dim2 in index_of_bands:
|
||||||
dot_matrix[dim1, dim2] = np.dot(np.conj(vector_delta_ky[:, dim1]), vector[:, dim2])
|
dot_matrix[i0, j0] = np.dot(np.conj(vector_delta_ky[:, dim1]), vector[:, dim2])
|
||||||
j0 += 1
|
j0 += 1
|
||||||
i0 += 1
|
i0 += 1
|
||||||
dot_matrix = np.linalg.det(dot_matrix)/abs(np.linalg.det(dot_matrix))
|
dot_matrix = np.linalg.det(dot_matrix)/abs(np.linalg.det(dot_matrix))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user