Skip to content

Commit 8c5be91

Browse files
authored
feat(eon-pet-neb): run eOn via pip pyeonclient + rgpot engines (#293)
* feat(eon-pet-neb): run eOn via pip pyeonclient + rgpot engines Drop conda-forge eOn/eonclient. Use pyeonclient 0.3 with RGPOT metatomic dlopen engines from rgpot>=2.4.1 (parity with native Metatomic on this recipe: same force-call counts, energies within ~1e-5 eV). * style(eon-pet-neb): ruff format and drop unused chdir CI lint uses ruff format --check; chdir unused after pyeonclient helper. * fix(eon-pet-neb): require pyeonclient>=0.3.1 manylinux_2_28 0.3.0 was manylinux_2_43-only and unusable on GHA glibc; 0.3.1 is manylinux_2_28 for CI installability. * style(eon-pet-neb): avoid Path default arg (flake8 B008) * feat(eon-pet-neb): drive client via pyeonclient steppers Compose ClientEON stages in Python (load_parameters → run_job → potcalls → timing; minimize_workdir for Matter.relax) instead of run_job_in_directory. Require rgpot>=2.4.2 for nested-safe engines. * feat(eon-pet-neb): use Matter path API, not workdirs Drive pyeonclient as list[Matter] + NudgedElasticBand.compute / Matter.relax with live Parameters attributes. Drop config.ini, run_job workdir composition, and minimize_workdir. Disk is only an optional export for rgpycrumbs plots. * style(eon-pet-neb): ASE-shaped Matter API for eOn NEB and min Present pyeonclient like ASE: make_potential ≈ calculator, from_ase / to_ase for Atoms↔Matter, NudgedElasticBand.compute ≈ LBFGS(neb).run, Matter.relax for endpoints. Drop workdir/path-file scaffolding from the narrative; keep .con export only for plot tools. * docs(eon-pet-neb): use eOn-native IDPP and pyec alias Build the eOn band with neb_idpp_path / NEBInit.IDPP instead of ASE interpolate into Matter. Prefer import pyeonclient as pyec. * refactor(eon-pet-neb): use pyeonclient make_backend and collapse NEB knobs Build the shared PET-MAD potential with backends.make_backend("rgpot_metatomic"), load ASE MetatomicCalculator via the PET-MAD-safe helper, and group energy-weighted CI+MMF settings into configure_neb_ew_mmf so the eOn half reads as Matter → path → compute rather than pot plumbing. * refactor(eon-pet-neb): call make_backend directly, drop make_potential Teach the real registry API (rgpot_metatomic / metatomic / ase_metatomic) instead of a one-off wrapper that hid how the pot is built. * chore(eon-pet-neb): pin pyeonclient 0.3.2 + eon-schema 0.2.1 Use released NebSpec for EW/CI/MMF knobs and require the published pyeonclient[models] floor that ships make_backend and NEB helpers. * docs(eon-pet-neb): appendix force-cost ASE vs pyeonclient Time single-point PET-MAD forces for ASE MetatomicCalculator, ase_metatomic, and rgpot_metatomic so the backend overhead is separate from the NEB algorithm comparison. Also prefer write_neb_results and share Parameters with the min backend. * fix(eon-pet-neb): rattle-style force timing like metatomic profiling Use atoms.rattle(1e-6) for the ASE path and analogous Gaussian position noise for Matter, plus force_calls deltas, so the appendix cannot report cache hits as force-call cost. * style(eon-pet-neb): tighten force-cost appendix Shorter prose and timing helper; keep rattle + force_calls checks. * fix(eon-pet-neb): do not pass params into ase_metatomic factory CI failed after the ASE force timing line: MetatomicCalculator rejected params=. Share Parameters only with from_ase / Matter. * fix(eon-pet-neb): restore gallery; ASE vs rgpot force appendix only Drop ase_metatomic from the microbench (params leak into MetatomicCalculator on pyeonclient 0.3.2). Keep rattle + force_calls checks; ruff format. * fix(eon-pet-neb): appendix is ASE vs rgpot only Remove ase_metatomic microbench path that crashed gallery generation on PyPI pyeonclient 0.3.2 (params leaked into MetatomicCalculator). * style(eon-pet-neb): wrap long comment lines for flake8 E501 * style(eon-pet-neb): shorten comparison comment block for E501 * fix(eon-pet-neb): force appendix does not claim pot speedup CI: ASE ~17 ms/call vs rgpot_metatomic ~15 ms/call. Drop "speedup" wording; NEB advantage is EW/MMF, not force wrapper magic. * chore(eon-pet-neb): upper-bound pip deps for gallery stability Cap pyeonclient, eon-schema, rgpot, ase, metatrain, and readcon so the example does not silently break on the next major/minor release. * docs(eon-pet-neb): plain wording for make_backend and NebSpec Drop defensive registry/packaging asides; state the pot load and knobs. * docs(eon-pet-neb): shorter force-appendix note * docs(eon-pet-neb): drop force-cost appendix NEB comparison is enough; the microbench added bulk without payoff. * docs(eon-pet-neb): remove force-cost appendix body Previous commit dropped the import and README note; finish removing the timed force microbench. * docs(eon-pet-neb): neutral wording for deps and dual NEB paths State what the example uses; drop "not conda / not ASE" asides. * fix(eon-pet-neb): drop force appendix and finish prose cleanup Remove the timed force microbench entirely (NameError: time). Neutral wording, SIDPP citation (Schmerwitz et al.), upper-bound deps already in tree. * docs(eon-pet-neb): full NEB trace, parallel prose, in-process plots Report the write_movies band evolution (neb_NNN.dat), final neb.dat, and results.dat alongside the status/E_ref summary. State parallel per-image force evaluation honestly. Drive 1D/2D NEB and min figures through rgpycrumbs/chemparseplot imports instead of a CLI/uv subprocess. * fix(eon-pet-neb): pin chemparseplot and ruff-format report helper CI pulled chemparseplot 1.9.12, which raises NameError on SurfaceFitConfig under Python 3.13. Cap at <1.9.10 (last known-good). Apply ruff format so the lint session stays green. * fix(eon-pet-neb): avoid Path default for flake8 B008 flake8-bugbear rejects function-call defaults; use cwd=None and Path.cwd(). * chore(eon-pet-neb): pin chemparseplot>=1.9.13 Drop the temporary <1.9.10 cap; 1.9.13 fixes the SurfaceFitConfig NameError on Python 3.13. * style(eon-pet-neb): drop changelog notes from environment pins * style(eon-pet-neb): strip remaining pin commentary from environment.yml * docs(eon-pet-neb): drop redundant load-compat call; cite OCINEB Frontiers make_metatomic_ase_calculator already installs the PET-MAD load patch. Reference (6) is the Frontiers in Chemistry OCINEB paper (Goswami, Gunde, Jónsson). * docs(eon-pet-neb): drop verbose NEB report helper Keep a short status/ΔE/written printout; the 1D profile figure is the band evolution, not a hand-rolled snapshot table or client log dump. * docs(eon-pet-neb): use pyeonclient.plot_neb / plot_min Drop cookbook argv wrappers around rgpycrumbs CLI. Figures go through pyeonclient[plot] (0.3.3): plot_neb, plot_min, thin_min_movie. * docs(eon-pet-neb): use rgpycrumbs.eon.plot_neb library API Drop argv shims and pyeonclient.plot_*. NEB figures call plot_neb from rgpycrumbs 1.10.2; min figures use chemparseplot load/plot helpers. Pin rgpycrumbs>=1.10.2 and chemparseplot[neb,plot]>=1.9.13. * docs(eon-pet-neb): use rgpycrumbs.eon.plot_min for min figures Drop local thin_min_movie and chemparseplot low-level min plot calls. plot_min (1.10.3) with auto_thin covers landscapes; pin rgpycrumbs>=1.10.3. * fix(eon-pet-neb): declare adjustText for rgpycrumbs plot_neb CI failed at import of rgpycrumbs.eon.plot_neb because adjustText is required at module load but was not listed in environment.yml. Pin pyeonclient to >=0.3.3 for path_frames / retain_frames. * fix(eon-pet-neb): floor rgpycrumbs 1.10.4 for library plot_neb 1.10.3 applied Click to plot_*_from_settings, so keyword library calls fed settings keys into argv and failed after a good NEB. Match chemparseplot plot extra at 1.9.14. * fix(eon-pet-neb): install xyzrender for structure strip plots plot_structures with strip_renderer=xyzrender needs the xyzrender binary on PATH; chemparseplot raises at render time without it. * fix(eon-pet-neb): declare jax for grad_imq landscape surfaces plot_neb landscape with surface_type=grad_imq loads rgpycrumbs surface models that require jax at import time. * fix(eon-pet-neb): lazy-load jax via RGPYCRUMBS_AUTO_DEPS + uv Library plot_neb/plot_min use ensure_import; CLI dispatch turns on AUTO_DEPS by default. Gallery imports need the same flag so jax and adjustText stage through uv into the dep cache instead of env pins. * fix(eon-pet-neb): floor rgpycrumbs 1.10.7 for library AUTO_DEPS plot_neb enables RGPYCRUMBS_AUTO_DEPS like CLI; drop need for host jax pin. keep setdefault in the notebook as belt-and-suspenders. * style(eon-pet-neb): place AUTO_DEPS before plot import only Keeps RGPYCRUMBS_AUTO_DEPS=1 for ensure_import without E402 on the whole import block; match other gallery env-then-import patterns. * docs(eon-pet-neb): one gallery cell per minimization figure Four plot_min outputs in a single sphinx-gallery block were tiled into an unreadable multi-image grid. Split reactant/product landscapes and profile/convergence into separate cells, and size show_png from the PNG aspect ratio so structure-strip figures are not squashed. * fix(eon-pet-neb): drop chemparseplot/xyzrender host pins rgpycrumbs>=1.10.8 + AUTO_DEPS stages chemparseplot, jax, adjustText, and xyzrender via ensure_import; only recipe-native deps stay in env.yml. * docs(eon-pet-neb): show min landscapes side by side Render reactant and product plot_min landscapes as two PNGs, then one gallery figure with equal-height panels so endpoints can be compared. * docs(eon-pet-neb): drop show_png_row; inline side-by-side min panels Keep a single show_png helper; reactant/product landscapes use a plain 1x2 subplot for the gallery comparison. * fix(eon-pet-neb): replace leftover show_png_row call with 1x2 subplot Previous commit removed the helper but left a call site (F821). * chore(eon-pet-neb): recipe-only env; drop host plot pins and AUTO_DEPS set rgpycrumbs>=1.10.8 library plot enables AUTO_DEPS and ensure_import for jax, adjustText, chemparseplot, and xyzrender (Python API, not PATH). Keep uv for the dep cache; drop manual setdefault and E402-split imports. * docs(eon-pet-neb): polish example, trim env and redundant prose Drop redundant eon-schema pin, unused Matter returns, empty min stub section, and duplicated landscape text. Share N_INTERMEDIATE_IMGS for ASE NEB, hoist show_png/MPLBACKEND, tighten IRA and README. * ci(eon-pet-neb): re-verify after eOn 2.17.2 / pyeonclient 0.3.4 * chore(eon-pet-neb): floor release pins (pyeonclient 0.3.5, rgpot 2.5.2) Match the published stack: torch 2.10 engine ABI, vesin 0.6 VesinOptions, and an absolute model_path captured before min_* chdirs. Keeps the PR's library plot_neb/plot_min path; only the floors from the gallery run. * chore(eon-pet-neb): floor rgpycrumbs to 1.10.10 Stack already at PyPI latest for pyeonclient 0.3.5, rgpot 2.5.2, vesin 0.6, readcon, and metatrain. Raise the plot library floor to the current release and cap <2. Torch stays on 2.10 for the rgpot engine ABI. * chore(eon-pet-neb): floor rgpot to 2.5.3 PyPI now has the 2.5.3 abi3 wheel (was GitHub/crates-only after the tag). * chore(eon-pet-neb): floor rgpot to 2.5.4 multi-ABI 2.5.4 ships metatomic engines for torch 2.7–2.13. Recipe torch pin stays 2.10 for gallery reproducibility. * chore(eon-pet-neb): allow torch 2.10–2.13 with rgpot multi-ABI rgpot 2.5.4 ships engines through 2.13. Drift check on PET-MAD XS (climb.con) was bit-identical for 2.10/2.11/2.13; widen the pin. * style(eon-pet-neb): drop commentary from environment pins * chore(eon-pet-neb): upper-bound remaining pip pins Close the last unpinned gallery dependencies so minor upstream bumps cannot break the recipe. * build(eon-pet-neb): require rgpot>=3.0.2 for the metatensor-torch 0.10.3 load fix
1 parent 2676278 commit 8c5be91

3 files changed

Lines changed: 317 additions & 568 deletions

File tree

examples/eon-pet-neb/README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Finding Reaction Paths with EON and a Metatomic Potential
1+
Finding Reaction Paths with eOn and a Metatomic Potential
22
=========================================================
33

4-
Describes the usage of the Nudged Elastic Band with energy weighted springs and
5-
single ended dimer searches using EON and PET-MAD. Contrasts with ASE.
4+
Nudged elastic band with energy-weighted springs and OCI-MMF using
5+
``pyeonclient`` and PET-MAD (ASE climbing-image NEB for comparison).

examples/eon-pet-neb/environment.yml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,20 @@ channels:
33
- conda-forge
44
- https://repo.prefix.dev/rg-forge
55
dependencies:
6-
# eOn 2.16 writes CON via readcon-core (con_spec_version=2 metadata).
7-
- eon>=2.16.0
86
- ira
97
- python=3.13
108
- pip
119
- uv
1210
- pip:
13-
- torch>=2.9,<2.10
14-
- ase>=3.23
15-
- matplotlib
16-
# eOn 2.16 is built against libmetatomic-torch >=0.1.15; metatrain
17-
# 2026.3.1 is the first release that requires the same floor.
18-
- metatrain>=2026.3.1
19-
- requests
20-
- metatomic-ase
21-
# Notebook CON I/O only. Plot deps (chemparseplot, jax, adjustText, …)
22-
# Prefer library API when plot pipelines are public; today full NEB
23-
# plots still go through CLI uv PEP 723 / ensure_import — not host pins.
24-
- "readcon>=0.13.1"
25-
# rgpycrumbs 1.9.21+ plot-script headers require chemparseplot>=1.9.10,
26-
# whose 1.9.10-1.9.12 releases fail to import on Python <=3.13. Drop the
27-
# cap (and UV_EXCLUDE_NEWER in the recipe) once a fixed release is out.
28-
- "rgpycrumbs>=1.9.16,<1.9.21"
11+
- "pyeonclient[models]>=0.3.5,<0.4"
12+
- "rgpot>=3.0.2,<4"
13+
- "vesin>=0.6.0,<0.7"
14+
- torch>=2.10,<2.14
15+
- ase>=3.23,<4
16+
- matplotlib>=3.8,<4
17+
- metatrain>=2026.3.1,<2027
18+
- requests>=2.28,<3
19+
- metatomic-ase>=0.1,<0.2
20+
- "readcon>=0.13.1,<0.14"
21+
- "rgpycrumbs>=1.10.10,<2"
2922
- atomistic-cookbook-utils >=0.1,<0.2

0 commit comments

Comments
 (0)