From 73278e026338964cee8aae0dbb446272e74ea55d Mon Sep 17 00:00:00 2001 From: Louis Ponet Date: Wed, 28 Jul 2021 18:15:00 +0200 Subject: [PATCH] reegistry fix and fileio fix --- src/jobAPI.jl | 4 ++-- src/qe/fileio.jl | 2 +- src/types.jl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jobAPI.jl b/src/jobAPI.jl index 938a315a..48b873c7 100644 --- a/src/jobAPI.jl +++ b/src/jobAPI.jl @@ -37,7 +37,6 @@ function save(job::DFJob; kwargs...) set_localdir!(job, local_dir) # Needs to be done so the inputs `dir` also changes. verify_or_create(local_dir) - maybe_register_job(job) curver = job.version job.version = last_version(job) + 1 @@ -50,6 +49,7 @@ function save(job::DFJob; kwargs...) timestamp!(job, now()) save_metadata(job) writejobfiles(job; kwargs...) + maybe_register_job(job) rm_tmp_flags!(job) return end @@ -229,7 +229,7 @@ Base.getindex(job::DFJob, el::Element) = job.structure[el] "Finds the output files for each of the calculations of a job, and groups all found data into a dictionary." function outputdata(job::DFJob, calculations::Vector{DFCalculation}; print = true, onlynew = false) - if isarchived(job) + if isarchived(job) && ispath(joinpath(job, "results.jld2")) return JLD2.load(joinpath(job, "results.jld2"))["outputdata"] end datadict = Dict() diff --git a/src/qe/fileio.jl b/src/qe/fileio.jl index db9f3a7c..a9aafb07 100644 --- a/src/qe/fileio.jl +++ b/src/qe/fileio.jl @@ -428,7 +428,7 @@ const QE_PW_PARSE_FUNCTIONS = ["C/m^2" => qe_parse_polarization, "PseudoPot" => qe_parse_pseudo, "the Fermi energy is" => qe_parse_fermi, "highest occupied" => qe_parse_highest_lowest, - " total energy" => qe_parse_total_energy, + "total energy " => qe_parse_total_energy, "SPIN UP" => (x, y, z) -> x[:colincalc] = true, "cryst." => qe_parse_k_cryst, "cart." => qe_parse_k_cart, "bands (ev)" => qe_parse_k_eigvals, diff --git a/src/types.jl b/src/types.jl index a7068e2e..64549f0d 100644 --- a/src/types.jl +++ b/src/types.jl @@ -253,7 +253,7 @@ Creates a new [`DFCalculation`](@ref) from the `template`, setting the `flags` o run::Bool = true outdata::SymAnyDict = SymAnyDict() infile::String = P == Wannier90 ? name * ".win" : name * ".in" - outfile::String = name * ".out" + outfile::String = P == Wannier90 ? name * ".wout" : name * ".out" function DFCalculation{P}(name, dir, flags, data, execs, run, outdata, infile, outfile) where {P<:Package} out = new{P}(name, dir, SymAnyDict(), data, execs, run, outdata, infile, outfile)