Defining workflows for external codes¶
In httk v1 a calculation was a task-template directory you pointed at with a
t: reference. In httk₂ it is a workflow package: a self-contained directory
whose httk_workflow.toml manifest is the httk-owned glue around a runner, and
whose runner is written against a small SDK. The whole directory is published
content-addressed and pinned by digest per job, so upgrading httk₂ underneath a
queued campaign cannot change what its jobs execute.
The quickstart shape¶
For VASP you do not have to author anything: the vasp.relax workflow
package from the httk/workflows-vasp
repository runs VASP through three steps — prepare, run, publish — and needs
only a POSCAR and a vasp.command setting.
$ httk project init --name quickstart .
$ httk workspace init --name default .
$ httk job new --workflow 'git+https://github.com/httk/workflows-vasp#vasp-relax' \
--input structure=POSCAR --tag silicon
$ httk workspace settings set --key vasp.command --value "$PWD/examples/mock_vasp.py" default
$ httk workflow run
Referencing a workflow this way canonicalizes the ref to the resolved commit
hash and records that pinned URI on the job; afterward the short name
vasp.relax also works wherever a workflow is accepted.
vasp.command is an application setting resolved most-specific-first: a job’s
own vasp.command parameter, then HTTK_VASP_COMMAND in the environment, then
the workspace setting. On a real machine you would set it to something like
"srun -n 32 vasp_std".
In httk v1
The equivalent was a per-code shell layer. ht_steps scripts dispatched on
$STEP (start → prerelax → relax1 → relax2 → cleanup) and sourced helpers
such as ht_tasks_api.sh and vasptools.sh; the VASP invocation lived in
shell functions like VASP_PREPARE_CALC and VASP_RUN_CONTROLLED. In httk₂
that is the workflows-vasp runner plus the one vasp.command workspace
setting.
Read next¶
https://docs.httk.org/httk-workflow/dev/main/quickstart.html — the seven-command walkthrough with a mock VASP.
https://docs.httk.org/httk-workflow/dev/main/workflow_packages.html and https://docs.httk.org/httk-workflow/dev/main/details/workflow_packages.html — the package manifest, every table and key.
https://docs.httk.org/httk-workflow/dev/main/workflow_languages.html — CWL, PWD, jobflow, and httk-v1 as workflow languages.
https://github.com/httk/workflows-vasp — the VASP workflow packages (
vasp.relax,vasp.relax-bash,vasp.static,vasp.relax-static): what they do, their inputs, parameters, and failure codes.https://docs.httk.org/httk-workflow/dev/main/sdks/ — the runner SDK in nine languages.
Finding, installing and writing workflows — the three workflow repositories, URIs, and installing.
Compute campaigns, small and large — the four-command cycle at ecosystem level.