1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
| clc clear all
e_0=1; a=sqrt(3)*e_0; e1=e_0*[0,1]'; e2=e_0*[sqrt(3)/2,-0.5]'; e3=e_0*[-sqrt(3)/2,-0.5]'; t=1;
colorrd = [207,108,82]/255; coloryl = [241,141,0]/255; colorbl = [109,152,165]/255;
count_x = 200; count_y = 200;
[x_min,x_max]=deal(2*-pi,2*pi); [y_min,y_max]=deal(2*-pi,2*pi);
delta_k_x = (x_max-x_min)/count_x; delta_k_y = (y_max-y_min)/count_y; k_x_valuex = (x_min:delta_k_x:x_max); k_y_valuey = (y_min:delta_k_y:y_max);
bar = waitbar(0,'贝里曲率计算中...'); for x = 1: count_x+1 per=x/(4*count_x); str=['贝里曲率计算中...',num2str(100*per),'%']; waitbar(per,bar,str) k_x = k_x_valuex(x); for y = 1: count_y+1 k_y = k_y_valuey(y); k = [k_x, k_y]; H(1,2,x,y)=t*exp(-1i*k*e1)+t*exp(-1i*k*e2)+t*exp(-1i*k*e3); H(2,1,x,y)=conj(H(1,2)); end end for x = 1: count_x per=(count_x+x)/(4*count_x);; str=['贝里曲率计算中...',num2str(100*per),'%']; waitbar(per,bar,str) for y = 1: count_y H_k_x_delta_k_x(:,:,x,y) = H(:,:,x+1,y); H_k_y_delta_k_y(:,:,x,y) = H(:,:,x,y+1); H__k_x_k_y_delta_k_x_k_y(:,:,x,y) = H(:,:,x+1,y+1); end end H(:,:,:,count_y+1)=[]; H(:,:,count_x+1,:)=[];
for n = 1:2 for x = 1: count_x per=((n+1)*count_x+x)/(4*count_x);; str=['贝里曲率计算中...',num2str(100*per),'%']; waitbar(per,bar,str) for y = 1: count_y [vecs, Energy(x,y,:)] = eigen(H(:,:,x,y)); [vecs_k_x_delta_k_x, Energy_k_x_delta_k_x(x,y,:)] = eigen(H_k_x_delta_k_x(:,:,x,y)); [vecs_k_y_delta_k_y, Energy_k_y_delta_k_y(x,y,:)] = eigen(H_k_y_delta_k_y(:,:,x,y)); [vecs__k_x_k_y_delta_k_x_k_y, Energy__k_x_k_y_delta_k_x_k_y(x,y,:)] = eigen(H__k_x_k_y_delta_k_x_k_y(:,:,x,y));
U_x(n) = dot(vecs(:,n), vecs_k_x_delta_k_x(:,n)) / abs(dot(vecs(:,n), vecs_k_x_delta_k_x(:,n))); U_y(n) = dot(vecs(:,n), vecs_k_y_delta_k_y(:,n)) / abs(dot(vecs(:,n), vecs_k_y_delta_k_y(:,n))); U_x_y(n) = dot(vecs_k_y_delta_k_y(:,n), vecs__k_x_k_y_delta_k_x_k_y(:,n)) / abs(dot(vecs_k_y_delta_k_y(:,n), vecs__k_x_k_y_delta_k_x_k_y(:,n))); U_y_x(n) = dot(vecs_k_x_delta_k_x(:,n), vecs__k_x_k_y_delta_k_x_k_y(:,n)) / abs(dot(vecs_k_x_delta_k_x(:,n), vecs__k_x_k_y_delta_k_x_k_y(:,n)));
F_tilde(x,y,n) = log(U_x(n) * U_y_x(n) / (U_x_y(n) * U_y(n))); Berry_Curvature(x,y,n) = real(1i * F_tilde(x,y,n) / (delta_k_x * delta_k_y)); Chern_number_point(x,y,n)=-F_tilde(x,y,n)/(2*pi*1i); end end Chern_number(n)=sum(Chern_number_point(:,:,n),"all") end
f1=figure(1); position0=get(f1,'position'); set(f1,'position',position0+[0*position0(3),0*position0(4),-1*position0(3)+1.05*position0(4),0*position0(4)]);
nexttile surf(k_x_valuex(1:count_x)/(pi/a), k_y_valuey(1:count_y)/(pi/a), Berry_Curvature(:,:,1)) hold on shading interp grid off set(gca,'linewidth',1) set(gca,'boxstyle','full','box','on') set(gca,'xticklabel','','yticklabel','','zticklabel','','xtick','','ytick','','ztick','') xlabel('$k_{x}\ (\pi/a)$','Interpreter','latex','FontSize',22); ylabel('$k_{y}\ (\pi/a)$','interpreter','latex','FontSize',22,'FontName','Arial') load('colorData.mat'); axis([min(k_x_valuex(1:count_x)/(pi/a)),max(k_x_valuex(1:count_x)/(pi/a)),min(k_y_valuey(1:count_y)/(pi/a)),max(k_y_valuey(1:count_y))/(pi/a)]*1.05) xtickangle(0); set(gca,'xminortick','on'); set(gca,'yminortick','on'); set(gca,'ticklength',[0.015 0.025]); set(gca, 'xtick',[x_min/(pi/a):1:x_max/(pi/a)], 'XTickLabel', {'$-4$', '', '', '', '$0$', '', '', '','$4$'}, 'TickLabelInterpreter', 'latex', 'FontSize', 18) set(gca, 'ytick',[y_min/(pi/a):1:y_max/(pi/a)], 'yTickLabel', {'$-4$', '', '', '', '$0$', '', '', '','$4$'}, 'TickLabelInterpreter', 'latex', 'FontSize', 18) view(-44.5,85); load('colorData.mat'); colormap(Purples6);
f2=figure(2); position0=get(f2,'position'); set(f2,'position',position0+[0*position0(3),0*position0(4),-1*position0(3)+1.05*position0(4),0*position0(4)]);
nexttile surf(k_x_valuex(1:count_x)/(pi/a), k_y_valuey(1:count_y)/(pi/a), Berry_Curvature(:,:,2)) hold on shading interp grid off set(gca,'linewidth',1) set(gca,'boxstyle','full','box','on') set(gca,'xticklabel','','yticklabel','','zticklabel','','xtick','','ytick','','ztick','') xlabel('$k_{x}\ (\pi/a)$','Interpreter','latex','FontSize',22); ylabel('$k_{y}\ (\pi/a)$','interpreter','latex','FontSize',22,'FontName','Arial') load('colorData.mat'); axis([min(k_x_valuex(1:count_x)/(pi/a)),max(k_x_valuex(1:count_x)/(pi/a)),min(k_y_valuey(1:count_y)/(pi/a)),max(k_y_valuey(1:count_y))/(pi/a)]*1.05) xtickangle(0); set(gca,'xminortick','on'); set(gca,'yminortick','on'); set(gca,'ticklength',[0.015 0.025]); set(gca, 'xtick',[x_min/(pi/a):1:x_max/(pi/a)], 'XTickLabel', {'$-4$', '', '', '', '$0$', '', '', '','$4$'}, 'TickLabelInterpreter', 'latex', 'FontSize', 18) set(gca, 'ytick',[y_min/(pi/a):1:y_max/(pi/a)], 'yTickLabel', {'$-4$', '', '', '', '$0$', '', '', '','$4$'}, 'TickLabelInterpreter', 'latex', 'FontSize', 18) view(-44.5,85); colormap(Purples6);
close(bar)
function [vecs, Energy] = eigen(H) [v, E] = eig(H); [Energy, index] = sort(real(diag(E))); vecs = v(:, index); end
|