chemparseplot.parse.eon.stitch#

Stitch multiple NEB segments into one continuous reaction band.

Segments share an absolute-energy axis (for example BLYP/3-21G) but carry small minimization offsets at the structures they share. Concatenating them into one band requires three steps:

  1. Slice each segment to the frames of interest.

  2. Deduplicate the junction frame: the first frame of every later segment repeats the last frame of the previous segment, so it is dropped.

  3. Align each later segment by a constant energy shift so the (dropped) junction frame matches the previous segment’s last kept frame, giving an unbroken energy profile.

Everything is referenced to the first frame of the first segment (reactant = 0).

stitch_neb_segments writes a combined band (neb.con, neb_path_000.con, neb_000.dat, sp.con) that the existing profile/landscape plotters consume unchanged, and returns a :class:StitchSummary describing the boundaries and per-segment barriers.

Added in version 1.8.0.

Module Contents#

Classes#

StitchedSegment

One stitched segment positioned in the combined band.

StitchSummary

Summary of a stitched multi-segment NEB band.

Functions#

_frame_with_energy

Return a ConFrame copy with energy set via :mod:con_io.

_cartesian_rmsd

Mass-agnostic Cartesian RMSD between two frames with matching ordering.

_cumulative_rmsd

Cumulative consecutive-frame RMSD, starting at 0 for the first frame.

stitch_neb_segments

Stitch ordered NEB segments into one continuous band on disk.

Data#

log

API#

chemparseplot.parse.eon.stitch.log[source]#

‘getLogger(…)’

chemparseplot.parse.eon.stitch._frame_with_energy(frame, energy: float)[source]#

Return a ConFrame copy with energy set via :mod:con_io.

class chemparseplot.parse.eon.stitch.StitchedSegment[source]#

One stitched segment positioned in the combined band.

start / end are the combined-band indices (inclusive) of the frames this segment contributes after junction deduplication. well_energy is the segment’s entry minimum and barrier is peak_energy - well_energy, all in eV relative to the global reactant.

label: str#

None

start: int#

None

end: int#

None

well_energy: float#

None

peak_energy: float#

None

barrier: float#

None

class chemparseplot.parse.eon.stitch.StitchSummary[source]#

Summary of a stitched multi-segment NEB band.

out_dir: pathlib.Path#

None

n_frames: int#

None

boundary_indices: list[int]#

None

segments: list[chemparseplot.parse.eon.stitch.StitchedSegment]#

None

highest_energy: float#

None

highest_index: int#

None

chemparseplot.parse.eon.stitch._cartesian_rmsd(atoms_a, atoms_b) float[source]#

Mass-agnostic Cartesian RMSD between two frames with matching ordering.

chemparseplot.parse.eon.stitch._cumulative_rmsd(atoms_list) list[float][source]#

Cumulative consecutive-frame RMSD, starting at 0 for the first frame.

Stacks positions once and uses vectorized pairwise steps instead of a Python loop over ASE frames (hot path for multi-segment stitch bands).

chemparseplot.parse.eon.stitch.stitch_neb_segments(segments: list[tuple[str, str | pathlib.Path, int | None, int | None]], out_dir: str | pathlib.Path, saddle_overrides: dict[str, tuple[str | pathlib.Path, float]] | None = None) chemparseplot.parse.eon.stitch.StitchSummary[source]#

Stitch ordered NEB segments into one continuous band on disk.

Added in version 1.8.0.

Parameters

segments Ordered (label, con_path, start, end) slices. start/end are Python slice bounds into the segment’s frames (frames[start:end]); None means the natural end. The first frame of every segment after the first is treated as a duplicate junction and dropped after the alignment shift is computed from it. out_dir Directory to write neb.con, neb_path_000.con, neb_000.dat and sp.con into. Created if missing. saddle_overrides Optional {label: (saddle_con_path, saddle_energy_abs)}. For the named segment the reported barrier uses saddle_energy_abs (in the segments’ absolute energy scale, e.g. from a dimer refinement) instead of the band maximum, and the saddle geometry is written to sp.con.

Returns

StitchSummary Boundary indices, per-segment barriers, and the overall highest point.