From 92b1824a1dd77b6954f992c9f56b5f187ba23bd0 Mon Sep 17 00:00:00 2001 From: guanjihuan Date: Sun, 6 Nov 2022 22:10:55 +0800 Subject: [PATCH] update --- .../bandstructure_of_graphene_on_high_symmetric_axes.py | 6 +++--- ...stribution_of_graphene_under_broken_inversion_symmery.py | 6 +++--- .../Berry_curvature_distribution_with_ky=0.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/academic_codes/2020.09.30_bandstructure_of_graphene_on_high_symmetric_axes/bandstructure_of_graphene_on_high_symmetric_axes.py b/academic_codes/2020.09.30_bandstructure_of_graphene_on_high_symmetric_axes/bandstructure_of_graphene_on_high_symmetric_axes.py index 5dd2383..ee20732 100755 --- a/academic_codes/2020.09.30_bandstructure_of_graphene_on_high_symmetric_axes/bandstructure_of_graphene_on_high_symmetric_axes.py +++ b/academic_codes/2020.09.30_bandstructure_of_graphene_on_high_symmetric_axes/bandstructure_of_graphene_on_high_symmetric_axes.py @@ -10,9 +10,9 @@ import cmath # 要处理复数情况,用到cmath.exp() def hamiltonian(k1, k2, M=0, t1=1, a=1/sqrt(3)): # Haldane哈密顿量(a为原子间距,不赋值的话默认为1/sqrt(3)) - h0 = np.zeros((2, 2))*(1+0j) - h1 = np.zeros((2, 2))*(1+0j) - h2 = np.zeros((2, 2))*(1+0j) + h0 = np.zeros((2, 2), dtype=complex) + h1 = np.zeros((2, 2), dtype=complex) + h2 = np.zeros((2, 2), dtype=complex) # 质量项(mass term), 用于打开带隙 h0[0, 0] = M diff --git a/academic_codes/2021.01.10_Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery/Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery.py b/academic_codes/2021.01.10_Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery/Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery.py index 096ffa7..7c8ac2a 100755 --- a/academic_codes/2021.01.10_Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery/Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery.py +++ b/academic_codes/2021.01.10_Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery/Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery.py @@ -11,7 +11,7 @@ import time def hamiltonian(k1, k2, t1=2.82, a=1/sqrt(3)): # 石墨烯哈密顿量(a为原子间距,不赋值的话默认为1/sqrt(3)) - h = np.zeros((2, 2))*(1+0j) + h = np.zeros((2, 2), dtype=complex) h[0, 0] = 0.28/2 h[1, 1] = -0.28/2 h[1, 0] = t1*(cmath.exp(1j*k2*a)+cmath.exp(1j*sqrt(3)/2*k1*a-1j/2*k2*a)+cmath.exp(-1j*sqrt(3)/2*k1*a-1j/2*k2*a)) @@ -69,9 +69,9 @@ def main(): j0 += 1 if band==0: - plot_3d_surface(kx_array/pi, ky_array/pi, F_all, xlabel='kx', ylabel='ky', zlabel='Berry curvature', title='Valence Band', rcount=300, ccount=300) + plot_3d_surface(kx_array/pi, ky_array/pi, F_all, xlabel='k_x (pi)', ylabel='k_y (pi)', zlabel='Berry curvature', title='Valence Band', rcount=300, ccount=300) else: - plot_3d_surface(kx_array/pi, ky_array/pi, F_all, xlabel='kx', ylabel='ky', zlabel='Berry curvature', title='Conductance Band', rcount=300, ccount=300) + plot_3d_surface(kx_array/pi, ky_array/pi, F_all, xlabel='k_x (pi)', ylabel='k_y (pi)', zlabel='Berry curvature', title='Conductance Band', rcount=300, ccount=300) # import guan # if band==0: # guan.plot_3d_surface(kx_array/pi, ky_array/pi, F_all, xlabel='kx', ylabel='ky', zlabel='Berry curvature', title='Valence Band', rcount=300, ccount=300) diff --git a/academic_codes/2021.01.10_Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery/Berry_curvature_distribution_with_ky=0.py b/academic_codes/2021.01.10_Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery/Berry_curvature_distribution_with_ky=0.py index 2cd576f..1cabb91 100644 --- a/academic_codes/2021.01.10_Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery/Berry_curvature_distribution_with_ky=0.py +++ b/academic_codes/2021.01.10_Berry_curvature_distribution_of_graphene_under_broken_inversion_symmery/Berry_curvature_distribution_with_ky=0.py @@ -11,7 +11,7 @@ import time def hamiltonian(k1, k2, t1=2.82, a=1/sqrt(3)): # 石墨烯哈密顿量(a为原子间距,不赋值的话默认为1/sqrt(3)) - h = np.zeros((2, 2))*(1+0j) + h = np.zeros((2, 2), dtype=complex) h[0, 0] = 0.28/2 h[1, 1] = -0.28/2 h[1, 0] = t1*(cmath.exp(1j*k2*a)+cmath.exp(1j*sqrt(3)/2*k1*a-1j/2*k2*a)+cmath.exp(-1j*sqrt(3)/2*k1*a-1j/2*k2*a))