new; 
clf;

UENERGY_IN_JOULE = 1.602192E-19;
ULENGTH_IN_METER = 1.E-10;
UMASS_IN_KG = 1.66053E-27;
UTIME_IN_SECOND = ULENGTH_IN_METER*sqrt(UMASS_IN_KG/UENERGY_IN_JOULE);
UFREQ_IN_HZ = 1./UTIME_IN_SECOND/2/pi;
UFREQ_IN_THZ = UFREQ_IN_HZ / 1E12;

load dos_si.out;
freq = 1:dos_si(2);
Si = sum(dos_si(4:3+dos_si(2)))

plot((freq-0.5)*dos_si(3)*UFREQ_IN_THZ,dos_si(4:3+dos_si(2))/Si/dos_si(3)/UFREQ_IN_THZ);
xlabel ('THz');
hold on;

load dos_c.out;
freq = 1:dos_c(2);
C = sum(dos_c(4:3+dos_c(2)))
plot((freq-0.5)*dos_c(3)*UFREQ_IN_THZ,dos_c(4:3+dos_c(2))/C/dos_c(3)/UFREQ_IN_THZ);

load dos_si_per.out;
plot(dos_si_per(:,1),dos_si_per(:,2),'o');

load dos_c_per.out;
plot(dos_c_per(:,1),dos_c_per(:,2),'o');

axis([ 0 35 -0. 0.6]);

text (31.2, 0.35, 'C') 
text (18.5, 0.1, 'Si')
text (15,0.03,'C');
text(29.55,0.02,'Si')

title ('LDOS of Si and C in perfect SiC (Lines: exact; Circles: our method)');

PRINT;

clf;
plot((freq-0.5)*dos_si(3)*UFREQ_IN_THZ,dos_si(4:3+dos_si(2))/Si/dos_si(3)/UFREQ_IN_THZ);
hold on;
xlabel ('THz');
plot(dos_si_per(:,1),dos_si_per(:,2),'-.');

load dos_si_def.out;
plot(dos_si_def(:,1),dos_si_def(:,2),'--');

axis([ 0 40 -0. 0.175]);
title ('Change of Si LDOS in (111) direction after putting in an antisite-pair defect');
text(0.7,0.165,'solid: perfect crystal (exact)')
text(0.7,0.155,'dash-dot: perfect crystal (our method)')
text(0.7,0.145,'dash: defect (our method)')

PRINT;








