-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspecplot.m
More file actions
164 lines (158 loc) · 4.42 KB
/
specplot.m
File metadata and controls
164 lines (158 loc) · 4.42 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
156
157
158
159
160
161
162
163
164
%% NQ
% Lets say that we have a ground state energy of theta that looks like
% clear classes
% clf
theta = 0:1:180;
GSBarrier = 10; % kcal/mol
vgs = 0.5*(1-cosd(2*theta));
% figure(1)
% plot(theta,vgs,'r');
%probability as a function of theta
% RT = 0.5922; % I think this may be room temp in kcal/mol
% prob = exp(-vgs/RT);
osc = nq.get_osc();
prob = (nq.esci-nq.esci(1)) .* (osc.^2);
% hold on;
% plot(theta,prob,'b');
% need the excitation energy as a function of theta
% exc = 3.8 + 0.5*(1-cosd(2*theta));
exc = nq.esci-nq.esci(1);
% figure(2)
% plot(theta,exc,'g');
% create a spectrum as a function of energy
ener = 2.5:0.025:7.6; % eV
spec = zeros(size(ener));
LWother = 0.5; % assume a line width of 0.1eV for effects other than torsion
figure(3)
% for it=1:length(theta)
for it=1:length(prob)
% we assume a gaussian centered at exc(i), with width LWother
for ie = 1:length(ener)
g = prob(it) * exp(-(ener-exc(it)).^2./LWother.^2);
hold on;
plot(1e7./(ener*8065.73) , g,'r');
spec = spec + g;
end
end
% spec = spec./max(spec);
figure(4)
hold on
plot(1e7./(ener*8065.73),spec,'b');
%% DHNQ
% Lets say that we have a ground state energy of theta that looks like
% clear classes
% clf
theta = 0:1:180;
GSBarrier = 10; % kcal/mol
vgs = 0.5*(1-cosd(2*theta));
% figure(1)
% plot(theta,vgs,'r');
%probability as a function of theta
% RT = 0.5922; % I think this may be room temp in kcal/mol
% prob = exp(-vgs/RT);
osc = dhnq.get_osc();
prob = (dhnq.esci-dhnq.esci(1)) .* (osc.^2);
% hold on;
% plot(theta,prob,'b');
% need the excitation energy as a function of theta
% exc = 3.8 + 0.5*(1-cosd(2*theta));
exc = dhnq.esci-dhnq.esci(1);
% figure(2)
% plot(theta,exc,'g');
% create a spectrum as a function of energy
ener = 2.5:0.025:7.6; % eV
spec = zeros(size(ener));
LWother = 0.5; % assume a line width of 0.1eV for effects other than torsion
figure(3)
% for it=1:length(theta)
for it=1:length(prob)
% we assume a gaussian centered at exc(i), with width LWother
for ie = 1:length(ener)
g = prob(it) * exp(-(ener-exc(it)).^2./LWother.^2);
hold on;
plot(1e7./(ener*8065.73) , g,'r');
spec = spec + g;
end
end
% spec = spec./max(spec);
figure(4)
hold on
plot(1e7./(ener*8065.73),spec,'r');
%% DCNQ
% Lets say that we have a ground state energy of theta that looks like
% clear classes
% clf
theta = 0:1:180;
GSBarrier = 10; % kcal/mol
vgs = 0.5*(1-cosd(2*theta));
% figure(1)
% plot(theta,vgs,'r');
%probability as a function of theta
% RT = 0.5922; % I think this may be room temp in kcal/mol
% prob = exp(-vgs/RT);
osc = dcnq.get_osc();
prob = (dcnq.esci-dcnq.esci(1)) .* (osc.^2);
% hold on;
% plot(theta,prob,'b');
% need the excitation energy as a function of theta
% exc = 3.8 + 0.5*(1-cosd(2*theta));
exc = dcnq.esci-dcnq.esci(1);
% figure(2)
% plot(theta,exc,'g');
% create a spectrum as a function of energy
ener = 2.5:0.025:7.6; % eV
spec = zeros(size(ener));
LWother = 0.5; % assume a line width of 0.1eV for effects other than torsion
figure(3)
% for it=1:length(theta)
for it=1:length(prob)
% we assume a gaussian centered at exc(i), with width LWother
for ie = 1:length(ener)
g = prob(it) * exp(-(ener-exc(it)).^2./LWother.^2);
hold on;
plot(1e7./(ener*8065.73) , g,'r');
spec = spec + g;
end
end
% spec = spec./max(spec);
figure(4)
plot(1e7./(ener*8065.73),spec,'g');
%% DCDHNQ
% Lets say that we have a ground state energy of theta that looks like
% clear classes
% clf
theta = 0:1:180;
GSBarrier = 10; % kcal/mol
vgs = 0.5*(1-cosd(2*theta));
% figure(1)
% plot(theta,vgs,'r');
%probability as a function of theta
% RT = 0.5922; % I think this may be room temp in kcal/mol
% prob = exp(-vgs/RT);
osc = dcdhnq.get_osc();
prob = (dcdhnq.esci-dcdhnq.esci(1)) .* (osc.^2);
% hold on;
% plot(theta,prob,'b');
% need the excitation energy as a function of theta
% exc = 3.8 + 0.5*(1-cosd(2*theta));
exc = dcdhnq.esci-dcdhnq.esci(1);
% figure(2)
% plot(theta,exc,'g');
% create a spectrum as a function of energy
ener = 2.5:0.025:7.6; % eV
spec = zeros(size(ener));
LWother = 0.5; % assume a line width of 0.1eV for effects other than torsion
figure(3)
% for it=1:length(theta)
for it=1:length(prob)
% we assume a gaussian centered at exc(i), with width LWother
for ie = 1:length(ener)
g = prob(it) * exp(-(ener-exc(it)).^2./LWother.^2);
hold on;
plot(1e7./(ener*8065.73) , g,'r');
spec = spec + g;
end
end
% spec = spec./max(spec);
figure(4)
plot(1e7./(ener*8065.73),spec,'k');