Skip to content

Commit

Permalink
THIS IS BEFORE FILENAME REFACTOR & added estimted scf accuracy
Browse files Browse the repository at this point in the history
  • Loading branch information
louisponet committed Jun 13, 2018
1 parent 5cba2af commit 3a14e5b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/qe/fileio.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ Possible keys:
- `:total_force`
- `:colin_mag_moments`
- `:bands`
- `:estimated_accuracy`
"""
function read_qe_output(filename::String, T=Float64)
out = Dict{Symbol,Any}()
out = Dict{Symbol,Any}(:estimated_accuracy => T[])
open(filename, "r") do f
prefac_k = nothing
k_eigvals = Array{Array{T,1},1}()
Expand Down Expand Up @@ -88,7 +89,6 @@ function read_qe_output(filename::String, T=Float64)
warn("File ended unexpectedly, returning what info has been gathered so far.")
return out
break

#vcrel outputs
elseif contains(line, "Begin final coordinates")
line = readline(f)
Expand Down Expand Up @@ -127,6 +127,8 @@ function read_qe_output(filename::String, T=Float64)
push!(out[key], parse(split(line)[6]))
line = readline(f)
end
elseif contains(line, "estimated scf accuracy")
push!(out[:estimated_accuracy], parse(split(line)[end-1]))
end
end

Expand Down

0 comments on commit 3a14e5b

Please sign in to comment.