CLI Chain Contract¶
This page explains the molop parse chain rules and terminal-operation boundary. Start with CLI
first steps for normal use; see the CLI command reference
for the complete option surface.
Command shape¶
molop parse PATTERN [parse options] OPERATION [operation options] ...
-> terminal operation
PATTERN is a path or glob; repeat --input PATH_OR_GLOB for additional input groups. After parsing,
operations that return a batch can be followed by more operations. Operations that return a summary,
rendered text, or path mapping must be last. The CLI checks this rule before reading files. The
--report parse mode is also terminal and cannot be combined with operations.
The examples below use the bundled water_mp2.out.
Common chains¶
Operation classes¶
| Class | Operations | Returned state |
|---|---|---|
| Chainable | filter-state, filter-value, filter-by-codec, sample |
New batch |
| Terminal | to-summary-df |
CSV, JSON, or table result |
| Terminal | format-transform |
Rendered text or generated files |
| Terminal | draw-grid-image |
SVG/PNG image |
| Terminal | groupby, copy-to, move-to |
Grouped paths or file-operation result |
A terminal operation cannot be followed by another operation. The following chain is rejected before parsing:
Error shape
The exact error depends on the validation branch; move the filter before to-summary-df to correct it.
Writer-specific options¶
format-transform accepts writer-specific options after its common options. The registered writer
provides the option names:
molop parse "water_mp2.out" --n-jobs 1 \
format-transform --format gjf --output-dir gaussian_inputs \
--route-section "#p B3LYP/6-31G(d) opt" \
--link0-commands "%nprocshared=8"
Inspect the static and writer-specific options in the installed version:
Help output shape
Shell completion¶
Inspect the completion script without changing shell configuration:
Output shape
Install completion with molop completion install --shell bash, then reload the shell. Installation
modifies the current user’s shell configuration; automation should use completion show and manage
the script explicitly.