-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunit_H1_pi2.m
More file actions
155 lines (132 loc) · 3.69 KB
/
Copy pathrunit_H1_pi2.m
File metadata and controls
155 lines (132 loc) · 3.69 KB
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
147
148
149
150
151
152
153
154
155
%This a script that calls the function that gives Raman spectra for the
%Kitaev Hyperhoneycomb (3D) model
function I = runit_H1_pi2(Jxx,Jz,~)
tic
h=0;
disp(['Jxx= ',num2str(Jxx),' h= ',num2str(h)])
N=13;
nn=2;
bins = 200;
%initialization
Dt = cell(1,nn); Iv = Dt; Ier = Dt; DDt =Dt;
Ivt = cell(8,nn);
I = cell(1,11); Iermax = I; Iermean = I;
%Runs for different parameters
%Jz = 1;
flag = 1;
for Jx = Jxx
% if Jx == 1
% end
for n = 1:nn
%The function gets run nn times so we can do statistics
out = KitaevRaman_H1_pi_r2(N,bins,flag,nn,Jx,Jz,h);
Ev = out{1}; %Same every time
DDt{n} = out{2};
Dt{n} = out{3};
for m=1:8
Ivt{m,n} = out{m+3};
end
end
for m=1:8
Ivtt = Ivt(m,:);
Iv{m} = mean(Ivtt,1,'c');
Ier{m} = std(Ivtt,1,'c');
Iermean{m} = mean(Ier{m});
Iermax{m} = max(Ier{m});
disp(Iermean{m})
disp(Iermax{m})
I{m} = sum(Iv{m},2);
end
DD = mean(DDt,1,'c');
DDer = std(DDt,1,'c');
DDer2= max(DDer);
DDer3= mean(DDer);
disp(DDer3)
disp(DDer2)
D = mean(Dt,1,'c');
Der = std(DDt,1,'c');
Der2= max(Der);
Der3= mean(Der);
disp(Der3)
disp(Der2)
dE = Ev(bins)/bins;
%EE = (Ev/4).*D*dE/4;
EEE = zeros(1,nn);
for m = 1:nn
EEE(m)=sum(Dt{m}.*(Ev/4)*dE/4);
end
format long e
disp(mean(EEE));
format short
disp(std(EEE));
I{9} = DD;
I{11} = D;
I{10} = Ev;
I{12} = [mean(EEE),std(EEE)];
%
% %Plot DOS
% %position = [pixs(3)/2 20 pixs(3)/2-114 pixs(4)/2-50];
% hh=figure;%('Position',position); hold on;
% plot(Ev,DD);
% %errorbar(Ev,Ipp+Imm+Ipm,errs(:,4)+errs(:,5)+errs(:,6));
% title(['DOS for H-1 spinons: J_x=',num2str(Jx),', h=',num2str(h)])
% xlabel('\omega/J_z');
% ylabel('density of states');
% %set(gca,'XTick',-3:3);
% %set(gca,'YTick',2*(0:5));
% %hold off;
% filename = ['H1_DOS_',num2str(N),'_Jx_',num2str(round(100*Jx))];
% saveas(hh,filename)
% print(hh, '-dpng', filename);
%
%
% %Plot the ramans
%
% hh=figure;%('Position',position);
% hold on;
% plot(Ev,I{1},Ev,I{2},Ev,-I{3},Ev,I{4},Ev,I{5},Ev,I{6}/3,Ev,I{7},Ev,I{8}/2);
% %errorbar(Ev,Ipp+Imm+Ipm,errs(:,4)+errs(:,5)+errs(:,6));
% title(['Raman Spectrum for H-1 spinons: J_x=',num2str(Jx),', h=',num2str(h)])
% xlabel('\omega/J_z');
% ylabel('I(\omega)');
% legend({'I_{aa}', 'I_{aa,ac}', '-I_{aa,cc}','I_{ac}','I_{ac,cc}','I_{cc}/3','I_{ab}','I_{bc}/2'}, 'Location', 'NorthWest');
% hold off;
% filename = ['H1_Raman_Jx_',num2str(round(100*Jx)),'_h_',num2str(h*100)];
% saveas(hh,filename)
% print(hh, '-dpng', filename);
%
%
% hh=figure;%('Position',position);
% hold on;
% plot(Ev,I{1},Ev,-I{3}/3,Ev,I{6}/9,Ev,I{2},Ev,-I{5}/3,Ev,I{4},Ev,I{8}/2);
% %errorbar(Ev,Ipp+Imm+Ipm,errs(:,4)+errs(:,5)+errs(:,6));
% title(['Raman Spectrum for H-1 spinons: J_x=',num2str(Jx),', h=',num2str(h)])
% xlabel('\omega/J_z');
% ylabel('I(\omega)');
% legend({'I_{aa}','-I_{aa,cc}/3','I_{cc}/9','I_{aa,ac}','-I_{ac,cc}/3','I_{ac}','I_{bc}/2'}, 'Location', 'NorthWest');
% hold off;
% filename = ['H1_Raman_Jx_',num2str(round(100*Jx)),'_h_',num2str(h*100),'_3'];
% saveas(hh,filename)
% print(hh, '-dpng', filename);
%
%
% hh=figure;%('Position',position);
% hold on;
% plot(Ev,I{1},Ev,I{4},Ev,I{7});
% %errorbar(Ev,Ipp+Imm+Ipm,errs(:,4)+errs(:,5)+errs(:,6));
% title(['Raman Spectrum for H-1 spinons: J_x=',num2str(Jx),', h=',num2str(h)])
% xlabel('\omega/J_z');
% ylabel('I(\omega)');
% legend({'I_{aa}','I_{ac}','I_{ab}'}, 'Location', 'NorthWest');
% hold off;
% filename = ['H1_Raman_Jx_',num2str(round(100*Jx)),'_h_',num2str(h*100),'_2'];
% saveas(hh,filename)
% print(hh, '-dpng', filename);
%
% %Print the ratios
% disp(mean(I{3}(I{1}>0)./I{1}(I{1}>0)))
% disp(mean(I{6}(I{1}>0)./I{1}(I{1}>0)))
% disp(mean(I{5}(I{2}>0)./I{2}(I{2}>0)))
% disp(mean(I{8}(I{4}>0)./I{4}(I{4}>0)))
end
toc