energy-diagram (state energy diagram)¶
energy-diagram draws a state energy diagram from numbers you give it. It reads no structure files and runs no calculation. It suits energies you already have, for example the energy_diagrams of the summary.json written by all or path-search, or a table in a paper. It saves the diagram as an image file.
What it is for¶
Figures from known energies: energies of the reactant (R), transition state (TS), intermediate (IM), and product (P) taken from a workflow or from DFT.
Figures for papers and slides: vector output as SVG or PDF.
Quick checks: a diagram of a few values without writing plotting code.
Examples¶
1. Values as one list¶
Pass all values as one quoted list.
mlmm energy-diagram -i "[0, 12.5, 4.3]" -o energy.png --out-json
The console prints [energy-diagram] Saved -> …/energy.png, and result.json next to the image has n_points: 3.
2. One -i per value¶
Repeat -i once for each value.
mlmm energy-diagram -i 0 -i 12.5 -i 4.3 -o energy.png
3. State and axis labels¶
Name the states on the x-axis and set the y-axis label.
mlmm energy-diagram -i "[0, 12.5, 4.3]" \
--label-x "['R','TS','P']" --label-y "ΔE (kcal/mol)" -o energy.png
How it works¶
Reading the values: Values come from
-i, repeated once per value or given as one list-like string ("[0, 12.5, 4.3]"or"0, 12.5, 4.3"). Any numbers are drawn as given, so absolute energies work as well as relative ones.Labels:
--label-xgives one label per state, repeated or as one list-like string. Without it the states are namedS1,S2, ….Drawing: Each state is drawn as a short horizontal bar at its energy, neighboring bars are joined by dotted lines, and a light gray dotted line marks the energy of the first state.
Saving: The extension of
-ochooses the format. A path without an extension gets.png, and missing parent directories are created.
Output files¶
energy_diagram.png # The diagram (default name; set with -o)
result.json # execution_status, scientific_status, n_points, and files (with --out-json)
summary.json # Same content as result.json (with --out-json)
result.json and summary.json are written in the directory of the image. They record the number of points and the image path, not the values or the labels.
Main options¶
Option |
Type |
Default |
Description |
|---|---|---|---|
|
text |
(required) |
Energies: repeat |
|
path |
|
Output image ( |
|
text |
|
State labels on the x-axis: repeat once per state, or give one list-like string |
|
text |
|
Y-axis label |
|
flag |
|
Write |
See the generated CLI reference for every option.
Notes¶
At least two values: fewer stop the run with
Provide at least two numeric values with -i/--input.Label count: the number of
--label-xlabels must equal the number of values.Order: the input order is the order on the x-axis.
Units: the values are drawn unchanged, so state their unit in
--label-y.Exit codes: see Exit codes.
See also¶
trj2fig — energy profile from the frames of a trajectory
all — the full workflow, which draws its own energy diagrams
JSON Output Reference — the fields of
result.jsonTroubleshooting — what to do when a run fails; for a failed image export, see Installation / environment