-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanalyzer.jl
More file actions
93 lines (88 loc) · 2.44 KB
/
Copy pathanalyzer.jl
File metadata and controls
93 lines (88 loc) · 2.44 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
using Plots
Es = Float64[]
ERPA0_1s = Float64[]
ERPA1_1s = Float64[]
ERPA2_1s = Float64[]
ERPA0_2s = Float64[]
ERPA1_2s = Float64[]
ERPA2_2s = Float64[]
ERPA0_3s = Float64[]
ERPA1_3s = Float64[]
ERPA2_3s = Float64[]
ERPA0_4s = Float64[]
ERPA1_4s = Float64[]
ERPA2_4s = Float64[]
rs = 1.0:0.1:4.5
for r in rs
erpa0 = false
erpa1 = false
erpa2 = false
filename = "n2/PNOF7/n2_$r.out"
println(filename)
E = 0.0
open(filename, "r") do f
for line in eachline(f)
if occursin("Final NOF", line)
println("✅ ENCONTRADO: $line)")
E = parse(Float64,split(line)[6])
push!(Es, E)
end
if occursin("Excitation energies ERPA0", line)
readline(f)
readline(f)
readline(f)
line2 = readline(f)
exc = parse(Float64,split(line2)[4])/27.2114
push!(ERPA0_1s, E + exc)
line2 = readline(f)
exc = parse(Float64,split(line2)[4])/27.2114
push!(ERPA0_2s, E + exc)
line2 = readline(f)
exc = parse(Float64,split(line2)[4])/27.2114
push!(ERPA0_3s, E + exc)
line2 = readline(f)
exc = parse(Float64,split(line2)[4])/27.2114
push!(ERPA0_4s, E + exc)
end
if occursin("Excitation energies ERPA/", line)
readline(f)
readline(f)
readline(f)
line2 = readline(f)
exc = parse(Float64,split(line2)[4])/27.2114
push!(ERPA1_1s, E + exc)
line2 = readline(f)
exc = parse(Float64,split(line2)[4])/27.2114
push!(ERPA1_2s, E + exc)
line2 = readline(f)
exc = parse(Float64,split(line2)[4])/27.2114
push!(ERPA1_3s, E + exc)
line2 = readline(f)
exc = parse(Float64,split(line2)[4])/27.2114
push!(ERPA1_4s, E + exc)
end
if occursin("Excitation energies ERPA2", line)
readline(f)
readline(f)
readline(f)
line2 = readline(f)
exc = parse(Float64,split(line2)[4])/27.2114
push!(ERPA2_1s, E + exc)
line2 = readline(f)
exc = parse(Float64,split(line2)[4])/27.2114
push!(ERPA2_2s, E + exc)
line2 = readline(f)
exc = parse(Float64,split(line2)[4])/27.2114
push!(ERPA2_3s, E + exc)
line2 = readline(f)
exc = parse(Float64,split(line2)[4])/27.2114
push!(ERPA2_4s, E + exc)
end
end
end
end
plot(rs, Es, marker=:circle)
plot!(rs, ERPA0_1s, marker=:circle)
plot!(rs, ERPA0_2s, marker=:circle)
plot!(rs, ERPA0_3s, marker=:circle)
plot!(rs, ERPA0_4s, marker=:circle)