-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcheck_cutoff.jl
28 lines (22 loc) · 1.04 KB
/
check_cutoff.jl
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
"""
Do a check to make sure that the bounds of the DOS (provided they're far from Ef) don't affect the final results.
"""
include("analysis_functions.jl")
include("plot_fcns.jl")
dos_file = "DOSes/LiF_Li2CO3dos.txt"
E_step = 0.01
kT = .026
cutoff_figprefix = Dict(true => "figs/check_cutoff/cutoffdos/", false => "figs/check_cutoff/fulldos/")
for cut_energy in [true, false]
eq_dos, average_eq_dos, min_E_eq, max_E_eq = get_dos(dos_file; cut_energy=cut_energy)
for Ef in [0.0, 1.0, -1.0, -2.0]
dos_f, average_dos, min_E, max_E = get_dos(dos_file; Ef=Ef, cut_energy=cut_energy)
println(Ef, " ", min_E, " ", max_E)
plot_comparison(dos_f, 5, min_E, max_E, average_dos, plot_title=string("E_f = ", Ef, " eV"))
savefig(string(cutoff_figprefix[cut_energy],"rate_compare_Ef",Ef,".png"))
end
# and plot the DOS too
E_range = range(min_E_eq, max_E_eq-0.01, length=200)
plot(E_range, eq_dos.(E_range), label="DOS", xlabel="energy", ylabel="DOS")
savefig(string(cutoff_figprefix[cut_energy], "DOS.png"))
end