Skip to content

Study Workflow

Study workflow CLI entrypoint.

This module provides the public command entry surface (build_parser, run_main) for the study command while delegating execution-heavy behavior to runtime.py.

Usage context

  • CLI routing: Loaded by command registries as the study command module.
  • Parser ownership: Defines top-level parser description/help wiring.
  • Runtime dispatch: Forwards execution to study_design.runtime.

Command: study

Create and initialize parameter-sweep study layouts.

Follow these steps to design and run a study: 1. Create a study YAML template using either of the followin commands and edit it to declare parameters, cases, stages, and analyses. - Examples: reaxkit study --make-yaml study.yaml reaxkit study --gen-yaml - NOTE: You need a template folder which is one example case with all stages and parameters declared to use as a reference for all other folders. - NOTE: if you have multiple stages under run and they are dependent on each other, you need to have 'set -euo pipefail' in your job submission file to ensure successive stages run after each other instead of in parallel.

  1. Initialize the study layout with --init, which generates folders and manifests for each case and stage.
  2. Examples: reaxkit study --init study.yaml --root . reaxkit study --init study.yaml --root studies --force

  3. Run the study stages with --run, which executes the declared stages for each case and replicate, tracking status and artifacts.

  4. Cases can run in parallel by specifying --parallel-workers with the number of workers to use.
  5. Failed or waiting replicates can be rerun with --rerun-failed, which cleans stage artifacts before rerunning.
  6. Examples: reaxkit study --run study_MgTemp/ reaxkit study --run study_MgTemp/ --parallel-workers 4 reaxkit study --run study_MgTemp/ --rerun-failed reaxkit study --run study_MgTemp/ --stage MM reaxkit study --run study_MgTemp/ --case mg_05__temp_300

  7. Analyze the study with --analyze, which executes analysis pipelines declared in the top-level study YAML for each stage.

  8. Analyses can be filtered by title or variable name with --analysis.
  9. Failed or waiting analyses can be rerun with --rerun-failed, which cleans analysis artifacts before rerunning.
  10. Examples: reaxkit study --analyze study_MgTemp/ reaxkit study --analyze study_MgTemp/ --rerun-failed reaxkit study --analyze study_MgTemp/ --analysis msd

  11. Aggregate results, which execute aggregation pipeline declared in the top-level study YAML. - Aggregation means combining results across cases and replicates for a given analysis variable.

  12. Examples: reaxkit study --aggregate study_MgTemp/ reaxkit study --aggregate study_MgTemp/ --aggregate msd_atom1_aggregation reaxkit study --aggregate study_MgTemp/ --aggregate msd_atom1_aggregation --stage NVT

  13. Present results, which generates plots and tables from completed analyses and aggregates.

  14. Examples: reaxkit study --present study_MgTemp/ reaxkit study --present study_MgTemp/ --present msd_atom1_aggregation

  15. Manage study metadata and artifacts with --manage, which supports path updates, case renaming, and removals of analysis, aggregate, and cache outputs.

  16. Path updates and case renaming are useful when study folder structures change after initialization, and removals are useful for cleaning up old or failed runs.
  17. Targets for removals can be filtered by case, replicate, stage, analysis title, and aggregate title.
  18. Examples: reaxkit study --manage study_MgTemp/ --action update-paths --target paths reaxkit study --manage study_MgTemp/ --action rename-cases --target case-names reaxkit study --manage study_MgTemp/ --action remove --target cache --older-than 14 --dry-run

Arguments

Scientific choices

Flag Required Default Help Choices
--analyze No Execute analysis pipelines declared in top-level study 'analysis'. Example: --analyze studies/heating, which runs the study's configured analysis pipelines.
--aggregate No Aggregate mode. First value is STUDY_ROOT; optional second value is aggregate title filter. Example: --aggregate studies/heating, which aggregates results for that study.
--strict-actions, --no-strict-actions No False Fail immediately when geometry generation or artifact propagation actions fail. Example: --strict-actions, which stops initialization when a generation or transfer action fails.
--replicate No Optional replicate selector (e.g. rep_01). Example: --replicate rep_01, which selects only the first named replicate.
--analysis No Analysis title filter for --analyze. For legacy aggregate mode only, this can be a variable/title name. Example: --analysis temperature, which selects the analysis titled temperature.
--value-column No For aggregate: explicit numeric column to extract from per-run analysis CSV exports. Example: --value-column temperature, which aggregates that numeric analysis column.

Input and file selection

Flag Required Default Help Choices
--init No Initialize a study from a YAML file and generate folders/manifests. Example: --init study.yaml, which creates study folders from that configuration.
--manage No Manage study metadata/artifacts (path update and removals). Example: --manage studies/heating, which targets that study for metadata or artifact management.

Outputs and plots

Flag Required Default Help Choices
--make-yaml No Write a starter study YAML template (default: study.yaml). Example: --make-yaml study.yaml, which writes a starter study configuration.
--gen-yaml No Alias for --make-yaml. Example: --gen-yaml study.yaml, which writes a starter study configuration.
--present No Presentation mode. First value is STUDY_ROOT; optional second value is aggregate title filter. Example: --present studies/heating, which renders presentations for that study.
--plot No Deprecated alias for --present. Example: --plot studies/heating, which renders study presentations through the legacy alias.
--root No . Root folder where the generated / tree will be created. Example: --root studies, which creates the study tree under that directory.
--analysis-title No Manager filter: analysis title. Example: --analysis-title temperature, which limits management to that analysis.
--aggregate-title No Manager filter: aggregate title. Example: --aggregate-title mean_temperature, which limits management to that aggregate.
--plot-style No default Plot appearance: default preserves existing styling; publication uses clear fonts and an accessible palette; publication-bold uses larger bold text and heavier lines. Example: --plot-style publication-bold, which improves readability when figures are reduced in a manuscript. default, publication, publication-bold
--color-style No default Color treatment: default preserves existing colors; light-fill uses lighter bar and marker interiors with the original outlines and lines. Example: --color-style light-fill, which adds contrast between fills and borders. default, light-fill
--detail-format No Optional detail format (default: Parquet; legacy: CSV). Example: --detail-format csv, which writes requested detail tables as CSV. parquet, csv

Execution

Flag Required Default Help Choices
--run No Execute study stages from an initialized study root folder. Example: --run studies/heating, which executes stages in that initialized study.
--run-geometry-generator, --no-run-geometry-generator No True Execute geometry_generator.cli_template during study initialization (default: true). Example: --run-geometry-generator, which executes configured geometry generation during initialization.
--stage No Run only one stage name (e.g. MM, NPT, NVT). Example: --stage NVT, which runs only the NVT stage.
--parallel-workers No 1 Number of replicate pipelines to run in parallel for --run (default: 1). Example: --parallel-workers 4, which runs up to four replicate pipelines concurrently.
--rerun-failed No False For --run, rerun only replicates with fail>0 or wait>0 in run_status.csv; cleans stage artifacts before rerun. Example: --rerun-failed, which reruns failed or waiting replicates after cleaning stage artifacts.
--dry-run No False Show what --manage would change without writing/removing. Example: --dry-run, which previews management changes without writing or removing artifacts.
--execution No auto Execution backend; unsupported backends fall back to serial with a logged reason. Example: --execution serial, which processes work sequentially. auto, serial, threads, processes
--workers No 0 Frame workers: auto or N (default: auto). Example: --workers 4, which requests four frame workers.
--chunk-size No 0 Maximum in-flight frames: auto or N. Example: --chunk-size 8, which limits concurrent frame processing to eight frames.

Storage and cache

Flag Required Default Help Choices
--force No False Allow overwriting existing template file or reusing non-empty study directory. Example: --force, which allows replacement of existing generated output.
--artifact-transfer No copy How consumed artifacts are propagated into downstream stage folders. Example: --artifact-transfer copy, which copies consumed artifacts into downstream stages. copy, hardlink, symlink
--case No Optional case selector (case_id, combo slug, or shorthand like mg_05__temp_300). Example: --case mg_05__temp_300, which selects that study case.
--action No Manager action for --manage. Example: --action update-paths, which updates stored study paths. update-paths, rename-cases, remove
--target No Manager target(s) for --manage. Can be repeated. Example: --target cache, which targets cached artifacts for the selected manager action. paths, case-names, analysis, aggregate, cache, run-status, analysis-status, aggregate-status, plot-status
--older-than No For cache removal: only remove entries older than N days. Example: --older-than 30, which limits cache removal to entries older than 30 days.
--profile No False Record deterministic function calls and timings for all Python threads (requires --diagnostics and reaxkit[profiling]).
--profile-clock No wall Profiler timer: elapsed wall time (default) or thread CPU time. Requires --profile to record. wall, cpu
--diagnostics, --no-diagnostics No False Enable a per-command report, console log, resource samples, and periodic Python stacks under logs/diagnostics (disabled by default).
--diagnostic-interval-seconds No 60.0 Python stack sampling interval (default: 60 seconds). Example: --diagnostic-interval-seconds 30.
--checkpoint, --no-checkpoint No Enable durable result batches for audited commands. Example: --no-checkpoint, disables recovery storage.
--resume No Resume a compatible result checkpoint; repeat the original scientific options. Example: --resume ./checkpoint, skips committed calculations.
--checkpoint-buffer-mb No 32 Result buffer in MiB, plus one oversized frame. Example: --checkpoint-buffer-mb 32, bounds pending result payloads to approximately 32 MiB.
--checkpoint-interval-seconds No 30 Flush at the next completed frame after this interval. Example: --checkpoint-interval-seconds 30, commits roughly every 30 seconds.
--output-profile No standard Artifact profile (default: standard). Example: --output-profile full, which includes declared optional detail artifacts. standard, minimal, full, legacy

Diagnostics and compatibility

Flag Required Default Help Choices
-h, --help No show this help message and exit
--help-all, --all-flags No Show every option, grouped by purpose. Example: --help-all, which includes advanced flags in the help output.

Common Runtime and Presentation Arguments

These are shared workflow-level CLI flags added before command-specific options, covering runtime context (engine/input/storage) and output presentation/export behavior.

Each command table above includes its shared and inherited options.