plt-min¶
Visualizing Minimization Optimization¶
This tool generates energy profiles, 2D optimization landscapes, and convergence plots from minimization calculations. The CLI also shares the same structure-strip renderer contract as plt-neb and plt-saddle, so the same backend and viewing controls work across the full eOn plotting stack.
*
Library API¶
from rgpycrumbs.eon import plot_min, plot
# Job directory (write_movies=true)
plot_min(job_dir="results/", plot_type="profile", output="out.pdf")
# Live object frames (Matter.movie_frames / MinModeSaddleSearch.climb_frames)
# or a ConFrame sequence with kind="min"
plot(frames, kind="min", plot_type="profile", output="out.pdf")
Same pipeline as the CLI. Heavy deps stage via ensure_import when
RGPYCRUMBS_AUTO_DEPS is on (library entries enable it by default).
Method¶
Same projection approach as NEB/saddle search but using (initial, minimum) as references. The 2D landscape shows s = optimization progress toward the minimum and d = lateral deviation during optimization.
Requires eOn output with write_movies=true and a concatenated
minimization movie. Metadata-rich full CON movies are treated as the
canonical structured source; minimization.dat is retained as a compatibility
and export layer when present.
Prefer TOML for dense option sets¶
Pipeline¶
flowchart LR
JOB[job-dir movie.con] --> LOAD[load_min_trajectory]
LOAD --> CFG{plot.toml\nauto_thin?}
CFG -->|false| FULL[full frames]
CFG -->|true| THIN[fit subsample]
FULL --> RENDER[render_single_ended_landscape]
THIN --> RENDER
RENDER --> PNG[min_2D.png]
Important
Surface-fit knobs are TOML-only. Do not expect --auto-thin on the CLI.
Long option lists belong in a plot config file (--config plot.toml), not
ever-growing CLI flags. Shared style, strip rendering, and surface-fit
knobs live under [shared]; job paths and plot type under [min]. Explicit
CLI flags still override the file for one-off runs.
Surface-fit keys (auto_thin, max_surface_points) are TOML-only
(defaults: auto_thin = false, max_surface_points = 64). They forward to
chemparseplot SurfaceFitConfig / plot_landscape_surface (requires
chemparseplot ≥ 1.9.10).
Example package path: rgpycrumbs/eon/examples/plot_config.example.toml.
# plot.toml — dense min movies (eOn write_movies force-eval dumps)
[shared]
energy_unit = "eV"
theme = "ruhi"
dpi = 200
strip_renderer = "xyzrender"
xyzrender_config = "paton"
ira_kmax = 14.0
auto_thin = false
max_surface_points = 64
[min]
job_dir = ["min_reactant"]
plot_type = "landscape"
prefix = "minimization"
surface_type = "grad_imq"
plot_structures = "endpoints"
# Opt in when LBFGS movies are very dense (~100+ force evals):
# auto_thin = true
# max_surface_points = 64
output = "min_2D.pdf"
rgpycrumbs eon plt-min --config plot.toml
Plot Types¶
Energy Profile¶
rgpycrumbs eon plt-min --job-dir results/ --plot-type profile
Shows energy vs iteration. Useful for checking monotonic descent and convergence.
2D Optimization Landscape¶
rgpycrumbs eon plt-min --job-dir results/ --plot-type landscape
Projects the minimization trajectory into (s, d) coordinates. A good optimizer produces a path with d near zero (straight line to the minimum).
For dense force-eval movies that make GradientIMQ surfaces non-finite, set
auto_thin = true in the TOML config (see above) rather than adding more CLI
flags.
Convergence Panel¶
rgpycrumbs eon plt-min --job-dir results/ --plot-type convergence
Side-by-side plots of force norm and step size vs iteration.
Options (CLI)¶
Common one-off flags. Prefer --config for surface-fit and suite style.
Option |
Default |
Description |
|---|---|---|
|
(none) |
TOML plot config ( |
|
(required*) |
eOn output directory (*or |
|
|
Movie file prefix |
|
|
|
|
True |
Project into (s, d) coordinates |
|
|
Surface method; dense-fit knobs only via TOML |
|
14.0 |
IRA kmax for RMSD calculation |
|
|
Presentation unit: |
|
|
Plot theme |
|
|
Structure strip below landscape: |
|
|
Renderer backend for structure strips |
|
|
xyzrender preset for strip rendering |
|
|
Shared viewing rotation control |
|
0.0 |
Small off-axis tilt to reveal occluded atoms |
|
|
Output file path |
|
200 |
Resolution |
TOML surface-fit keys (not CLI)¶
Key |
Default |
Description |
|---|---|---|
|
|
Subsample dense movies for the GP fit only (endpoints kept; scatter/viewport stay full) |
|
|
Cap on fit observations when |
Keys may appear under [shared] or override under [min] / [neb].
Structure Rendering¶
Landscape plots can render the initial and final structures as a strip below the axes:
rgpycrumbs eon plt-min \
--job-dir results/ \
--plot-type landscape \
--plot-structures endpoints \
--strip-renderer xyzrender \
--rotation auto \
--perspective-tilt 6
The shared renderer flags behave the same as in plt-neb: --rotation auto
lets xyzrender choose a good view, while ASE-style strings such as
--rotation "0x,90y,0z" force a manual orientation for all backends.
Required eOn Output Files¶
File |
Required |
Description |
|---|---|---|
|
Yes |
Concatenated structure movie |
|
Fallback |
Compatibility/export TSV when the movie does not carry full per-frame metadata |
|
No |
Explicit final minimized structure matching the movie prefix |
|
No |
Legacy fallback final structure when |
See Also¶
Plotting NEB paths for double-ended method visualization
Plotting saddle search trajectories for dimer visualization