runtraj.execution.worker.run_stage#
- runtraj.execution.worker.run_stage(sim, name)[source]#
Run one stage of a simulation, which writes its file to the output directory.
The stage is the one the variant’s
stagesblock names (runtraj.stages.Stage.run()), run with the variant’s settings of it. A file the stage made before is removed first, and the stage writes under a temporary name beside the file’s own, which is moved into place when the stage returns. So a stage that fails, or is cut off part-way, leaves no file that would count as complete: neither a half-written one, nor an old one made from what has since been made again.- Raises:
ValueError – If the variant does not use a stage of that name.
RuntimeError – If the stage returned without writing its file.
- Return type:
- Parameters:
sim (runtraj.Simulation)
name (str)