-
Notifications
You must be signed in to change notification settings - Fork 3
/
datagencryst.m
79 lines (74 loc) · 1.37 KB
/
datagencryst.m
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
d1=4.6;
hopp_amp1=7.55;
d2=6.1;
dx=0;
hopp_amp2=1.54;
EB=45.59;
V0=123;
W0=V0;
EC=43.86;
N_sites=12;
d(1:2:N_sites-1)=d1;
d(2:2:N_sites-1)=d2;
x=zeros(1,N_sites);
for j=2:N_sites
x(j)=x(j-1)+d(j-1);
end
x=x+dx*(rand(1,N_sites)-1/2);
for j=1:N_sites-1
d(j)=x(j+1)-x(j);
end
epsilon_up(1:N_sites)=-EB;
t_up=zeros(1:N_sites);
t_up(1:2:N_sites-1)=-hopp_amp1;
t_up(2:2:N_sites)=-hopp_amp2;
t_down=t_up;
U(1:N_sites)= EC;
for j=1:N_sites
for k=1:N_sites
if k~=j
epsilon_up(j)=epsilon_up(j)-V0/(abs(x(k)-x(j)));
end
end
end
epsilon_down=epsilon_up;
adderg;
reqcondct_plot;
save trivialphase
clear all
d1=6.1;
hopp_amp1=1.54;
d2=4.6;
hopp_amp2=7.55;
EB=45.59;
V0=123;
W0=V0;
EC=43.86;
N_sites=12;
d(1:2:N_sites-1)=d1;
d(2:2:N_sites-1)=d2;
x=zeros(1,N_sites);
for j=2:N_sites
x(j)=x(j-1)+d(j-1);
end
x=x+dx*(rand(1,N_sites)-1/2);
for j=1:N_sites-1
d(j)=x(j+1)-x(j);
end
epsilon_up(1:N_sites)=-EB;
t_up=zeros(1:N_sites);
t_up(1:2:N_sites-1)=-hopp_amp1;
t_up(2:2:N_sites)=-hopp_amp2;
t_down=t_up;
U(1:N_sites)= EC;
for j=1:N_sites
for k=1:N_sites
if k~=j
epsilon_up(j)=epsilon_up(j)-V0/(abs(x(k)-x(j)));
end
end
end
epsilon_down=epsilon_up;
adderg;
reqcondct_plot;
save edgephase