-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDOS_Effective_mass.m
156 lines (156 loc) · 3.59 KB
/
DOS_Effective_mass.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
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
156
%Developed by Emad
% This code reads TransDOS, differential conductivity, and calculates
% effective masses of electrons and holes and prints out the maximum
% effective mass ratio between two quantities.
clear all
clc
disp('This is to approximate effective mass around Fermi level through DOS')
cod=input('what code is employed to calculate transport properties? type 1 or 2 or 3 for BoltzTrap1, BoltzTrap2 and Boltzwann, respectively')
qe=1.6*1e-16;
vol=270.2565;
conv=(1/1.8897)^3*1e-30;
vol=vol*conv;
%%%%Opening DOS%%%%
fid=fopen('GaAs_boltzdos.dat','r');
if fid == -1
disp ('file name is wrong')
else
if cod==1
ff=textscan(fid,'%f %f %f'); %BoltzTrap1
elseif cod==2
ff=textscan(fid,'%f %f','Headerlines',5); %Boltzdos
elseif cod==3
ff=textscan(fid,'%f %f %f %f %f %f %f','Headerlines',5); %Bolttzwann
else
ff=textscan(fid,'%f %f %f','Headerlines',1); %QE DOS
end
end
fclose(fid)
c=size(ff{1},1);
f=zeros(c-1,2);
if cod>1
Ef=input('please enter the intrinsic Fermi level');
end
for x=2:c
if cod==3
f(x-1,1)=ff{1}(x,1)-Ef; %Boltwann
f(x-1,2)=ff{2}(x,1);
elseif cod==1
%Ef=0;
%f(x-1,1)=13.605698066*ff{1}(x,1)-Ef; %BTZP1
f(x-1,1)=13.605698066*ff{1}(x,1)-Ef;
f(x-1,2)=ff{3}(x,1);
else
%Ef=0;
f(x-1,1)=ff{1}(x,1)-Ef;
f(x-1,2)=ff{2}(x,1);
end
end
%%%%% Defining effective mass estimation range on DOS%%%%%%%
a=input('how far is final point in valence band? with a negative sign'); %negative sign has to be typed!
b=input('how far is final point in conduction band? with a positive sign'); %positive sign has to be typed!
aa=input('how far is initial point in valence band? with a negative sign');
bb=input('how far is initial point in conduction band? with a positive sign');
dd=zeros(c,2);
ee=zeros(c,2);
g=0;
h=0;
hbar=6.63*10^-34;
me0=9.1094*10^-31;
cc=size(f,1);
for i=1:cc;
if a<=f(i,1) & f(i,1)<=b
if bb<=f(i,1)
g=g+1;
dd(g,2)=f(i,2);
dd(g,1)=(abs(f(i,1)))^(1/2);
elseif f(i,1)<=aa
h=h+1;
ee(h,2)=f(i,2);
ee(h,1)=(abs(f(i,1)))^(1/2);
end
end
end
d=zeros(g,2);
e=zeros(h,2);
for v=1:g
for w=1:2
for z=1:h
d(v,w)=dd(v,w);
e(z,w)=ee(z,w);
end
end
end
k=zeros(2,2);
l=0;
m=0;
mc=0;
ymc=0;
xymc=0;
s=zeros(2,1);
for j=1:g;
l=l+d(j,1);
m=m+d(j,1).*d(j,1);
ymc=ymc+d(j,2);
xymc=xymc+d(j,1).*d(j,2);
end
k(1,1)=g;
k(1,2)=l;
k(2,1)=l;
k(2,2)=m;
s(1,1)=ymc;
s(2,1)=xymc;
r=inv(k)*s;
mc=((hbar^3*abs(r(2,1))*pi^2)/sqrt(2))^(2/3);
mc=mc/(vol^(2/3)*qe);
mc=mc/me0;
disp('electron effective mass is:')
disp(mc)
o=zeros(2,2);
n=0;
q=0;
mv=0;
ymv=0;
xymv=0;
t=zeros(2,1);
for p=1:h;
n=n+e(p,1);
q=q+e(p,1).*e(p,1);
ymv=ymv+e(p,2);
xymv=xymv+e(p,1).*e(p,2);
end
o(1,1)=h;
o(1,2)=n;
o(2,1)=n;
o(2,2)=q;
t(1,1)=ymv;
t(2,1)=xymv;
u=inv(o)*t;
mv=((hbar^3*abs(u(2,1))*pi^2)/sqrt(2))^(2/3);
mv=mv/(vol^(2/3)*qe);
mv=mv/me0;
disp('hole effective mass is:')
disp(mv)
rmass= abs(r(2,1))/abs(u(2,1));
if rmass<1
rmass=inv(rmass);
end
disp('mass ratio is')
disp(rmass)
disp(abs(mv/mc))
subplot(3,1,1);
plot(d(:,1),d(:,2),'*',d(:,1),r(2,1).*d(:,1)+r(1,1),':')
title('Electrons')
xlabel('E^{3/2}')
ylabel('DOS(1/ev)')
subplot(3,1,2);
plot(e(:,1),e(:,2),'*',e(:,1),u(2,1).*e(:,1)+u(1,1),':')
title('Holes')
xlabel('E^{3/2}')
ylabel('DOS(1/ev)')
subplot(3,1,3)
plot(f(:,1),f(:,2))
title('NormalDOS')
xlabel('E-E_{f}(ev)')
ylabel('DOS(1/ev)')
xlim([-2 2]);