Restart run

Features to allow run restart from a given step.

haddock.gear.restart_run.add_restart_arg(parser: ArgumentParser) None[source]

Add –restart option to argument parser.

haddock.gear.restart_run.remove_folders_after_number(run_dir: Path, num: int) None[source]

Remove calculation folder after (included) a given number.

Example

If the following step folders exist:

00_topoaa 01_rigidbody 02_mdref 03_flexref

and the number 2 is given, folders 02_ and 03_ will be deleted.

Parameters:
  • run_dir (pathlib.Path) – The run directory.

  • num (int) – The number of the folder from which to delete calculation step folders. num must be non-negative integer, or equivalent representation.