Skip to content

Commit

Permalink
reegistry fix and fileio fix
Browse files Browse the repository at this point in the history
  • Loading branch information
louisponet committed Jul 28, 2021
1 parent 41ddf5c commit 73278e0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/jobAPI.jl
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/qe/fileio.jl
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/types.jl
Expand Up @@ -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)
Expand Down

0 comments on commit 73278e0

Please sign in to comment.