Skip to content

Commit

Permalink
Simplify NamedTuple usage
Browse files Browse the repository at this point in the history
  • Loading branch information
singularitti committed Nov 20, 2023
1 parent 42e49e9 commit ce2db48
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 56 deletions.
50 changes: 25 additions & 25 deletions src/EquationOfState/Recipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,18 @@ function stage(::SelfConsistentField, r::ParallelEosFittingRecipe, ::Val{1})
gatherdata savedata
# runcmds .→ extractcells .→ savecells
return (;
download=download,
compute=compute,
makeinputs=makeinputs,
writeinputs=writeinputs,
runcmds=runcmds,
# extractcells=extractcells,
# savecells=savecells,
extractdata=extractdata,
gatherdata=gatherdata,
savedata=savedata,
fiteos=fiteos,
saveparams=saveparams,
download,
compute,
makeinputs,
writeinputs,
runcmds,
# extractcells,
# savecells,
extractdata,
gatherdata,
savedata,
fiteos,
saveparams,
)
end
function stage(::VariableCellOptimization, r::ParallelEosFittingRecipe, ::Val{2})
Expand Down Expand Up @@ -155,18 +155,18 @@ function stage(::VariableCellOptimization, r::ParallelEosFittingRecipe, ::Val{2}
runcmds .→ extractcells .→ savecells
extractcells .→ detectsymmetries
return (;
compute=compute,
makeinputs=makeinputs,
writeinputs=writeinputs,
runcmds=runcmds,
extractcells=extractcells,
savecells=savecells,
detectsymmetries=detectsymmetries,
extractdata=extractdata,
gatherdata=gatherdata,
savedata=savedata,
fiteos=fiteos,
saveparams=saveparams,
compute,
makeinputs,
writeinputs,
runcmds,
extractcells,
savecells,
detectsymmetries,
extractdata,
gatherdata,
savedata,
fiteos,
saveparams,
)
end
function stage(::SelfConsistentField, r::ParallelEosFittingRecipe, ::Val{3})
Expand All @@ -184,7 +184,7 @@ function stage(::SelfConsistentField, r::ParallelEosFittingRecipe, ::Val{3})
thunk -> ArgDependentJob(thunk; name="write input in SCF"), first(iterate(steps))
)
makeinputs .→ writeinputs
return (; makeinputs=makeinputs, writeinputs=writeinputs)
return (; makeinputs, writeinputs)
end

function build(::Type{Workflow}, r::ParallelEosFittingRecipe)
Expand Down
62 changes: 31 additions & 31 deletions src/Phonon/Recipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ function stage(::SelfConsistentField, r::Recipe)
# savedata = ArgDependentJob(first(iterate(steps)); name="save E(V) data in SCF")
download .→ makeinputs .→ runcmds
return steps = (;
download=download,
makeinputs=makeinputs,
# writeinputs=writeinputs,
runcmds=runcmds,
# extractdata=extractdata,
# gatherdata=gatherdata,
# savedata=savedata,
download,
makeinputs,
# writeinputs,
runcmds,
# extractdata,
# gatherdata,
# savedata,
)
end
function stage(::LinearResponse, r::Recipe)
Expand Down Expand Up @@ -94,12 +94,12 @@ function stage(::LinearResponse, r::Recipe)
# savedata = ArgDependentJob(first(iterate(steps)); name="save E(V) data in DFPT")
makeinputs .→ writeinputs .→ runcmds
return steps = (;
makeinputs=makeinputs,
writeinputs=writeinputs,
runcmds=runcmds,
# extractdata=extractdata,
# gatherdata=gatherdata,
# savedata=savedata,
makeinputs,
writeinputs,
runcmds,
# extractdata,
# gatherdata,
# savedata,
)
end
function stage(::FourierTransform, r::Recipe)
Expand Down Expand Up @@ -132,12 +132,12 @@ function stage(::FourierTransform, r::Recipe)
# savedata = ArgDependentJob(first(iterate(steps)); name="save E(V) data in IFC")
makeinputs .→ writeinputs .→ runcmds
return steps = (;
makeinputs=makeinputs,
writeinputs=writeinputs,
runcmds=runcmds,
# extractdata=extractdata,
# gatherdata=gatherdata,
# savedata=savedata,
makeinputs,
writeinputs,
runcmds,
# extractdata,
# gatherdata,
# savedata,
)
end
function stage(::PhononDispersion, r::PhononDispersionRecipe)
Expand Down Expand Up @@ -182,12 +182,12 @@ function stage(::PhononDispersion, r::PhononDispersionRecipe)
# savedata = ArgDependentJob(first(iterate(steps)); name="save E(V) data in phonon dispersion")
makeinputs .→ writeinputs .→ runcmds
return steps = (;
makeinputs=makeinputs,
writeinputs=writeinputs,
runcmds=runcmds,
# extractdata=extractdata,
# gatherdata=gatherdata,
# savedata=savedata,
makeinputs,
writeinputs,
runcmds,
# extractdata,
# gatherdata,
# savedata,
)
end
function stage(::PhononDensityOfStates, r::VDOSRecipe)
Expand Down Expand Up @@ -223,12 +223,12 @@ function stage(::PhononDensityOfStates, r::VDOSRecipe)
# savedata = ArgDependentJob(first(iterate(steps)); name="save E(V) data in phonon dispersion")
makeinputs .→ writeinputs .→ runcmds
return steps = (;
makeinputs=makeinputs,
writeinputs=writeinputs,
runcmds=runcmds,
# extractdata=extractdata,
# gatherdata=gatherdata,
# savedata=savedata,
makeinputs,
writeinputs,
runcmds,
# extractdata,
# gatherdata,
# savedata,
)
end

Expand Down

0 comments on commit ce2db48

Please sign in to comment.