energy-diagram¶
Draw a state energy diagram directly from numeric values you provide — it does not read structure files and runs no quantum / thermo / MLIP calculations (--thermo / --dft). Use it when numeric state energies are already known (e.g. from summary.json) and only the formatted diagram is needed. It produces one image file and an optional machine-readable sidecar.
Examples¶
# Command form
pdb2reaction energy-diagram {-i VALUE ... | -i "[VALUE, ...]"} [-o OUTPUT] [--label-x...] [--label-y...]
# List string (recommended for ad-hoc plots)
pdb2reaction energy-diagram -i "[0, 12.5, 4.3]" -o energy.png
# Repeated flag form (use one `-i` per value)
pdb2reaction energy-diagram -i 0 -i 12.5 -i 4.3 -o energy.png
# X/Y labels — same applies to --label-x / --label-y
pdb2reaction energy-diagram -i "[0, 12.5, 4.3]" \
--label-x "['R','TS','P']" --label-y "ΔE (kcal/mol)" -o energy.png
Workflow¶
Collect values from
-i/--input(supports repeated flags and a single list-like string).Parse all input values as floats and fail early if fewer than two values are provided.
Parse optional
--label-xvalues. If omitted, labels are auto-generated asS1,S2,…Validate label count (
--label-x) against value count, then render the diagram.Save the image to
-o/--outputand print the saved path.
Outputs¶
OUTPUT.(png|jpg|jpeg|svg|pdf)
result.json # Authoritative optional sidecar: status, n_points, files, and the standard envelope
summary.json # Byte-identical compatibility mirror on a successful --out-json run
If
-o/--outputis omitted,energy_diagram.pngis written to the current directory.When output has no extension,
.pngis appended automatically.Parent directories are created automatically when needed.
CLI options¶
Option |
Description |
Default |
|---|---|---|
|
Repeat once per numeric value, or pass one quoted list-like string. Multiple bare values after a single |
Required |
|
Output image path ( |
|
|
X-axis state labels. Count must match input value count. |
|
|
Y-axis label. |
|
|
Write authoritative |
|
The full flag list is in the generated command reference.
Notes¶
Input order is used directly as plotting order.
Values are plotted unchanged; set
--label-yto their unit.At least two numeric values are required.
See Also¶
Common Error Recipes – Symptom-first failure routing
Troubleshooting – Detailed troubleshooting guide
trj2fig – Plot profile from trajectory energies
all – End-to-end workflow with built-in energy diagram output