Skip to content

Commit

Permalink
Fix map was removed in #296
Browse files Browse the repository at this point in the history
  • Loading branch information
singularitti committed Oct 24, 2023
1 parent 931410d commit fbf891f
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 77 deletions.
22 changes: 12 additions & 10 deletions src/ConvergenceTestWorkflow/Recipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,18 @@ end

function stage(::SelfConsistentField, r::TestCutoffEnergyRecipe)
conf = expand(r.config, SelfConsistentField())
steps = Iterators.Stateful((
DownloadPotentials(SelfConsistentField()),
CreateInput(SelfConsistentField()),
WriteInput(SelfConsistentField()),
RunCmd(SelfConsistentField()),
ExtractData(SelfConsistentField()),
GatherData(SelfConsistentField()),
SaveData(SelfConsistentField()),
TestConvergence(SelfConsistentField()),
)) do action
steps = map(
Iterators.Stateful((
DownloadPotentials(SelfConsistentField()),
CreateInput(SelfConsistentField()),
WriteInput(SelfConsistentField()),
RunCmd(SelfConsistentField()),
ExtractData(SelfConsistentField()),
GatherData(SelfConsistentField()),
SaveData(SelfConsistentField()),
TestConvergence(SelfConsistentField()),
)),
) do action
think(action, conf)
end
download = Job(iterate(steps); name="download potentials")
Expand Down
58 changes: 31 additions & 27 deletions src/EquationOfStateWorkflow/Recipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,22 @@ end

function stage(::SelfConsistentField, r::ParallelEosFittingRecipe)
conf = expand(r.config, SelfConsistentField())
steps = Iterators.Stateful((
DownloadPotentials(SelfConsistentField()),
ComputeVolume(SelfConsistentField()),
CreateInput(SelfConsistentField()),
WriteInput(SelfConsistentField()),
RunCmd(SelfConsistentField()),
ExtractCell(SelfConsistentField()),
SaveCell(SelfConsistentField()),
ExtractData(SelfConsistentField()),
GatherData(SelfConsistentField()),
SaveData(SelfConsistentField()),
FitEquationOfState(SelfConsistentField()),
SaveParameters(SelfConsistentField()),
)) do action
steps = map(
Iterators.Stateful((
DownloadPotentials(SelfConsistentField()),
ComputeVolume(SelfConsistentField()),
CreateInput(SelfConsistentField()),
WriteInput(SelfConsistentField()),
RunCmd(SelfConsistentField()),
ExtractCell(SelfConsistentField()),
SaveCell(SelfConsistentField()),
ExtractData(SelfConsistentField()),
GatherData(SelfConsistentField()),
SaveData(SelfConsistentField()),
FitEquationOfState(SelfConsistentField()),
SaveParameters(SelfConsistentField()),
)),
) do action
think(action, conf)
end
download = Job(iterate(steps); name="download potentials")
Expand Down Expand Up @@ -90,19 +92,21 @@ function stage(::SelfConsistentField, r::ParallelEosFittingRecipe)
end
function stage(::VariableCellOptimization, r::ParallelEosFittingRecipe)
conf = expand(r.config, VariableCellOptimization())
steps = Iterators.Stateful((
ComputeVolume(VariableCellOptimization()),
CreateInput(VariableCellOptimization()),
WriteInput(VariableCellOptimization()),
RunCmd(VariableCellOptimization()),
ExtractCell(VariableCellOptimization()),
SaveCell(VariableCellOptimization()),
ExtractData(VariableCellOptimization()),
GatherData(VariableCellOptimization()),
SaveData(VariableCellOptimization()),
FitEquationOfState(VariableCellOptimization()),
SaveParameters(VariableCellOptimization()),
)) do action
steps = map(
Iterators.Stateful((
ComputeVolume(VariableCellOptimization()),
CreateInput(VariableCellOptimization()),
WriteInput(VariableCellOptimization()),
RunCmd(VariableCellOptimization()),
ExtractCell(VariableCellOptimization()),
SaveCell(VariableCellOptimization()),
ExtractData(VariableCellOptimization()),
GatherData(VariableCellOptimization()),
SaveData(VariableCellOptimization()),
FitEquationOfState(VariableCellOptimization()),
SaveParameters(VariableCellOptimization()),
)),
) do action
think(action, conf)
end
compute = map(thunk -> Job(thunk; name="compute volume in vc-relax"), iterate(steps))
Expand Down
90 changes: 50 additions & 40 deletions src/PhononWorkflow/Recipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,17 @@ end

function stage(::SelfConsistentField, r::Recipe)
conf = expand(r.config, SelfConsistentField())
steps = Iterators.Stateful((
DownloadPotentials(SelfConsistentField()),
CreateInput(SelfConsistentField()),
WriteInput(SelfConsistentField()),
RunCmd(SelfConsistentField()),
# ExtractData(SelfConsistentField()),
# GatherData(SelfConsistentField()),
# SaveData(SelfConsistentField()),
)) do action
steps = map(
Iterators.Stateful((
DownloadPotentials(SelfConsistentField()),
CreateInput(SelfConsistentField()),
WriteInput(SelfConsistentField()),
RunCmd(SelfConsistentField()),
# ExtractData(SelfConsistentField()),
# GatherData(SelfConsistentField()),
# SaveData(SelfConsistentField()),
)),
) do action
think(action, conf)
end
download = Job(iterate(steps); name="download potentials")
Expand Down Expand Up @@ -63,14 +65,16 @@ function stage(::SelfConsistentField, r::Recipe)
end
function stage(::DensityFunctionalPerturbationTheory, r::Recipe)
conf = expand(r.config, DensityFunctionalPerturbationTheory())
steps = Iterators.Stateful((
CreateInput(DensityFunctionalPerturbationTheory()),
WriteInput(DensityFunctionalPerturbationTheory()),
RunCmd(DensityFunctionalPerturbationTheory()),
# ExtractData(DensityFunctionalPerturbationTheory()),
# GatherData(DensityFunctionalPerturbationTheory()),
# SaveData(DensityFunctionalPerturbationTheory()),
)) do action
steps = map(
Iterators.Stateful((
CreateInput(DensityFunctionalPerturbationTheory()),
WriteInput(DensityFunctionalPerturbationTheory()),
RunCmd(DensityFunctionalPerturbationTheory()),
# ExtractData(DensityFunctionalPerturbationTheory()),
# GatherData(DensityFunctionalPerturbationTheory()),
# SaveData(DensityFunctionalPerturbationTheory()),
)),
) do action
think(action, conf)
end
makeinputs = map(
Expand Down Expand Up @@ -100,14 +104,16 @@ function stage(::DensityFunctionalPerturbationTheory, r::Recipe)
end
function stage(::RealSpaceForceConstants, r::Recipe)
conf = expand(r.config, RealSpaceForceConstants())
steps = Iterators.Stateful((
CreateInput(RealSpaceForceConstants()),
WriteInput(RealSpaceForceConstants()),
RunCmd(RealSpaceForceConstants()),
# ExtractData(RealSpaceForceConstants()),
# GatherData(RealSpaceForceConstants()),
# SaveData(RealSpaceForceConstants()),
)) do action
steps = map(
Iterators.Stateful((
CreateInput(RealSpaceForceConstants()),
WriteInput(RealSpaceForceConstants()),
RunCmd(RealSpaceForceConstants()),
# ExtractData(RealSpaceForceConstants()),
# GatherData(RealSpaceForceConstants()),
# SaveData(RealSpaceForceConstants()),
)),
) do action
think(action, conf)
end
makeinputs = map(
Expand Down Expand Up @@ -136,13 +142,15 @@ function stage(::RealSpaceForceConstants, r::Recipe)
end
function stage(::PhononDispersion, r::PhononDispersionRecipe)
conf = expand(r.config, PhononDispersion())
steps = Iterators.Stateful((
WriteInput(PhononDispersion()),
RunCmd(PhononDispersion()),
# ExtractData(PhononDispersion()),
# GatherData(PhononDispersion()),
# SaveData(PhononDispersion()),
)) do action
steps = map(
Iterators.Stateful((
WriteInput(PhononDispersion()),
RunCmd(PhononDispersion()),
# ExtractData(PhononDispersion()),
# GatherData(PhononDispersion()),
# SaveData(PhononDispersion()),
))
) do action
think(action, conf)
end
makeinputs = map(
Expand Down Expand Up @@ -185,14 +193,16 @@ function stage(::PhononDispersion, r::PhononDispersionRecipe)
end
function stage(::PhononDensityOfStates, r::PhononDispersionRecipe)
conf = expand(r.config, PhononDensityOfStates())
steps = map((
CreateInput(PhononDensityOfStates()),
WriteInput(PhononDensityOfStates()),
RunCmd(PhononDensityOfStates()),
# ExtractData(PhononDensityOfStates()),
# GatherData(PhononDensityOfStates()),
# SaveData(PhononDensityOfStates()),
)) do action
steps = map(
Iterators.Stateful(
CreateInput(PhononDensityOfStates()),
WriteInput(PhononDensityOfStates()),
RunCmd(PhononDensityOfStates()),
# ExtractData(PhononDensityOfStates()),
# GatherData(PhononDensityOfStates()),
# SaveData(PhononDensityOfStates()),
),
) do action
think(action, conf)
end
makeinputs = map(
Expand Down

0 comments on commit fbf891f

Please sign in to comment.