Skip to content

Commit a0f8fa1

Browse files
committed
hp parsing
1 parent 1016eaf commit a0f8fa1

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

src/Client/job.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,14 @@ function outputdata(job::Job; calcs=map(x->x.name, job.calculations), extra_pars
358358
server = Server(job.server)
359359
out = Dict{String, Dict{Symbol, Any}}()
360360
calculations = map(x->job[x], calcs)
361-
tdir = tempname()
362-
RemoteHPC.pull(job, tdir, infiles=false, calcs=calculations)
361+
362+
if !Jobs.runslocal(job)
363+
tdir = tempname()
364+
RemoteHPC.pull(job, tdir, infiles=false, calcs=calculations)
365+
else
366+
tdir = job.dir
367+
end
368+
363369
for c in calculations
364370
of = Calculations.outfiles(c)
365371
main_file = joinpath(tdir, of[1])

src/FileIO/qe.jl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,8 +903,18 @@ function qe_parse_Hubbard_U(out, line, f)
903903
end
904904
end
905905

906+
function qe_parse_HP_error(out, line, f)
907+
out[:error] = true
908+
while !occursin("E_Fermi", line)
909+
line = readline(f)
910+
end
911+
fermi_dos = parse(Float64, split(line)[end])
912+
out[:fermi_dos] = fermi_dos
913+
end
914+
906915
const QE_HP_PARSE_FUNCS = ["will be perturbed" => qe_parse_pert_at,
907-
"Hubbard U parameters:" => qe_parse_Hubbard_U]
916+
"Hubbard U parameters:" => qe_parse_Hubbard_U,
917+
"WARNING: The Fermi energy shift is zero or too big!" => qe_parse_HP_error]
908918

909919
function qe_parse_hp_output(hp_file, hubbard_files...; parse_funcs = Pair{String,<:Function}[])
910920
out = parse_file(hp_file, QE_HP_PARSE_FUNCS; extra_parse_funcs = parse_funcs)

0 commit comments

Comments
 (0)