|
1 | 1 | # Prepare a VASP calculation |
2 | 2 |
|
3 | | -```{admonition} Status |
4 | | -:class: caution |
| 3 | +In v1 this was a Python call (`prepare_single_run`) followed by running |
| 4 | +`vasp` by hand. In v2 the packaged VASP runners do both halves: preparation |
| 5 | +derives every input you do not supply, and the workflow manager runs the |
| 6 | +calculation. |
5 | 7 |
|
6 | | -V2 has dependency-free VASP work-directory preparation, but not yet the v1 |
7 | | -one-call path from `UnitcellStructure` to a complete run directory. In particular, |
8 | | -*httk-io* reads POSCAR but does not write it. Supply `Run/POSCAR` and |
9 | | -`Run/INCAR`, then prepare the remaining inputs explicitly. |
| 8 | +```console |
| 9 | +httk project init --name tutorial |
| 10 | +httk workflow job new --template vasp-static --from POSCAR --tag example |
| 11 | +httk workflow workspace settings set vasp.command vasp_std |
| 12 | +httk workflow workspace settings set vasp.pseudo_library /path/to/potpaw_PBE |
| 13 | +httk workflow run |
10 | 14 | ``` |
11 | 15 |
|
12 | | -```python |
13 | | -from httk.workflow.vasp import VaspPreparationOptions, prepare_vasp_inputs |
| 16 | +`job new` scaffolds and submits one job from the packaged `vasp-static` |
| 17 | +template (`vasp-relax` and `vasp-relax-static` work the same way), staging the |
| 18 | +structure as the `files/POSCAR` the runner reads. No INCAR, KPOINTS, or POTCAR |
| 19 | +needs to be written: the runner's `prepare` step derives the k-point grid, |
| 20 | +assembles the POTCAR from the pseudopotential library, and fills in `MAGMOM` |
| 21 | +and `NBANDS`, with any explicit `--input incar_tags=...` winning over derived |
| 22 | +values. `run` executes the manager until nothing is ready, driving the job |
| 23 | +through prepare, run, and collect; the results and logs end up in the payload |
| 24 | +directory the `job new` command printed. |
14 | 25 |
|
15 | | -choices = prepare_vasp_inputs( |
16 | | - VaspPreparationOptions( |
17 | | - pseudopotential_library="/path/to/potpaw_PBE", |
18 | | - kpoint_density=40, |
19 | | - ), |
20 | | - directory="Run", |
21 | | -) |
22 | | -print(choices) |
23 | | -``` |
| 26 | +Both `vasp.*` settings are stored on the workspace, so they are set once, not |
| 27 | +per job; a real `HTTK_VASP_COMMAND` environment variable remains a deployment |
| 28 | +override and wins over the workspace setting. |
24 | 29 |
|
25 | | -This normalizes POSCAR handedness, assembles POTCAR, writes KPOINTS, and updates |
26 | | -INCAR with recorded choices. Execution is separately available through |
27 | | -`run_vasp` or the native workflow runner API. |
| 30 | +```{admonition} Status |
| 31 | +:class: caution |
| 32 | +
|
| 33 | +The starting structure must already be a VASP structure file: *httk-io* reads |
| 34 | +POSCAR but does not yet write it, so there is no route yet from a loaded |
| 35 | +`UnitcellStructure` (steps 1–7) to a POSCAR on disk. |
| 36 | +``` |
28 | 37 |
|
29 | | -See the workflow runner helpers in the versioned *httk-workflow* documentation |
30 | | -listed by the {doc}`module directory <../modules>`. |
| 38 | +See the quickstart and the packaged VASP runner guide in the versioned |
| 39 | +*httk-workflow* documentation listed by the {doc}`module directory <../modules>`. |
0 commit comments