0.0.121
This commit is contained in:
		| @@ -248,7 +248,7 @@ chern_number = guan.calculate_chern_number_for_square_lattice(hamiltonian_functi | ||||
|  | ||||
| chern_number = guan.calculate_chern_number_for_square_lattice_with_Wilson_loop(hamiltonian_function, precision_of_plaquettes=20, precision_of_Wilson_loop=5, print_show=0) | ||||
|  | ||||
| chern_number = guan.calculate_chern_number_for_square_lattice_with_Wilson_loop_for_degenerate_case(hamiltonian_function, num_of_bands=[0, 1], precision_of_plaquettes=20, precision_of_Wilson_loop=5, print_show=0) | ||||
| chern_number = guan.calculate_chern_number_for_square_lattice_with_Wilson_loop_for_degenerate_case(hamiltonian_function, index_of_bands=[0, 1], precision_of_plaquettes=20, precision_of_Wilson_loop=5, print_show=0) | ||||
|  | ||||
| chern_number = guan.calculate_chern_number_for_honeycomb_lattice(hamiltonian_function, a=1, precision=300, print_show=0) | ||||
|  | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| [metadata] | ||||
| # replace with your username: | ||||
| name = guan | ||||
| version = 0.0.120 | ||||
| version = 0.0.121 | ||||
| author = guanjihuan | ||||
| author_email = guanjihuan@163.com | ||||
| description = An open source python package | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| Metadata-Version: 2.1 | ||||
| Name: guan | ||||
| Version: 0.0.120 | ||||
| Version: 0.0.121 | ||||
| Summary: An open source python package | ||||
| Home-page: https://py.guanjihuan.com | ||||
| 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. | ||||
|  | ||||
| # The current version is guan-0.0.120, updated on August 12, 2022. | ||||
| # The current version is guan-0.0.121, updated on August 12, 2022. | ||||
|  | ||||
| # Installation: pip install --upgrade guan | ||||
|  | ||||
| @@ -1592,7 +1592,7 @@ def calculate_chern_number_for_square_lattice_with_Wilson_loop(hamiltonian_funct | ||||
|     chern_number = chern_number/(2*math.pi) | ||||
|     return chern_number | ||||
|  | ||||
| def calculate_chern_number_for_square_lattice_with_Wilson_loop_for_degenerate_case(hamiltonian_function, num_of_bands=[0, 1], precision_of_plaquettes=20, precision_of_Wilson_loop=5, print_show=0): | ||||
| def calculate_chern_number_for_square_lattice_with_Wilson_loop_for_degenerate_case(hamiltonian_function, index_of_bands=[0, 1], precision_of_plaquettes=20, precision_of_Wilson_loop=5, print_show=0): | ||||
|     delta = 2*math.pi/precision_of_plaquettes | ||||
|     chern_number = 0 | ||||
|     for kx in np.arange(-math.pi, math.pi, delta): | ||||
| @@ -1625,13 +1625,13 @@ def calculate_chern_number_for_square_lattice_with_Wilson_loop_for_degenerate_ca | ||||
|                 vector_delta = eigenvector[:, np.argsort(np.real(eigenvalue))] | ||||
|                 vector_array.append(vector_delta)            | ||||
|             Wilson_loop = 1 | ||||
|             dim = len(num_of_bands) | ||||
|             dim = len(index_of_bands) | ||||
|             for i0 in range(len(vector_array)-1): | ||||
|                 dot_matrix = np.zeros((dim , dim), dtype=complex) | ||||
|                 i01 = 0 | ||||
|                 for dim1 in num_of_bands: | ||||
|                 for dim1 in index_of_bands: | ||||
|                     i02 = 0 | ||||
|                     for dim2 in num_of_bands: | ||||
|                     for dim2 in index_of_bands: | ||||
|                         dot_matrix[i01, i02] = np.dot(vector_array[i0][:, dim1].transpose().conj(), vector_array[i0+1][:, dim2]) | ||||
|                         i02 += 1 | ||||
|                     i01 += 1 | ||||
| @@ -1639,9 +1639,9 @@ def calculate_chern_number_for_square_lattice_with_Wilson_loop_for_degenerate_ca | ||||
|                 Wilson_loop = Wilson_loop*det_value | ||||
|             dot_matrix_plus = np.zeros((dim , dim), dtype=complex) | ||||
|             i01 = 0 | ||||
|             for dim1 in num_of_bands: | ||||
|             for dim1 in index_of_bands: | ||||
|                 i02 = 0 | ||||
|                 for dim2 in num_of_bands: | ||||
|                 for dim2 in index_of_bands: | ||||
|                     dot_matrix_plus[i01, i02] = np.dot(vector_array[len(vector_array)-1][:, dim1].transpose().conj(), vector_array[0][:, dim2]) | ||||
|                     i02 += 1 | ||||
|                 i01 += 1 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user