rgpycrumbs.eon.con_splitter

Split multi-image .con files into per-image structures.

Added in version 0.0.2.

Attributes

Classes

AlignMode

Defines structural alignment strategies.

SplitMode

Defines trajectory validation strictness.

Functions

_is_con_path(→ bool)

_read_trajectory_frames(→ tuple[list, list | None])

Load trajectory frames.

_energy_from_atoms(→ float | None)

_energy_changed(→ bool)

_with_energy(frame, energy)

Copy frame through frame_with_energy only when the energy changes.

_same_symbol_order(→ bool)

_is_pure_translation(→ bool)

True when every atom moved by the same vector, including the zero vector.

_positions_unmoved(→ bool)

_cell_changed(→ bool)

_sections_still_true(→ bool)

Forces, displacements, and spreads still describe atoms.

_with_cell(frame, atoms)

_write_fresh_geometry(→ None)

Write a new geometry. Old forces, displacements, and spreads stay unset.

_write_output_frame(→ None)

Write one image with precision omitted and canonical left off.

align_path(frames, mode, iraconf)

Applies the selected alignment strategy to the image sequence.

con_splitter(neb_trajectory_file, mode, output_dir, ...)

Splits a multi-step trajectory file (.traj, .con, etc.) into

Module Contents

rgpycrumbs.eon.con_splitter._CON_SUFFIXES[source]
rgpycrumbs.eon.con_splitter._is_con_path(path: pathlib.Path) → bool[source]
rgpycrumbs.eon.con_splitter._read_trajectory_frames(path: pathlib.Path) → tuple[list, list | None][source]

Load trajectory frames.

.con / .convel stay ConFrame objects from con_io so a later write can keep sections. Every other suffix stays on ase.io.read.

rgpycrumbs.eon.con_splitter._energy_from_atoms(atoms) → float | None[source]
rgpycrumbs.eon.con_splitter._POSITION_ATOL = 1e-08[source]
rgpycrumbs.eon.con_splitter._energy_changed(frame, energy: float | None) → bool[source]
rgpycrumbs.eon.con_splitter._with_energy(frame, energy: float | None)[source]

Copy frame through frame_with_energy only when the energy changes.

rgpycrumbs.eon.con_splitter._same_symbol_order(frame, atoms) → bool[source]
rgpycrumbs.eon.con_splitter._is_pure_translation(src, dst) → bool[source]

True when every atom moved by the same vector, including the zero vector.

rgpycrumbs.eon.con_splitter._positions_unmoved(frame, atoms) → bool[source]
rgpycrumbs.eon.con_splitter._cell_changed(frame, atoms) → bool[source]
rgpycrumbs.eon.con_splitter._sections_still_true(frame, atoms) → bool[source]

Forces, displacements, and spreads still describe atoms.

A pure translation keeps them. A rotation or a reorder does not.

rgpycrumbs.eon.con_splitter._with_cell(frame, atoms)[source]
rgpycrumbs.eon.con_splitter._write_fresh_geometry(dest: pathlib.Path, atoms, energy: float | None) → None[source]

Write a new geometry. Old forces, displacements, and spreads stay unset.

rgpycrumbs.eon.con_splitter._write_output_frame(dest: pathlib.Path, atoms, frame, energy: float | None, *, preserve_source: bool) → None[source]

Write one image with precision omitted and canonical left off.

An unmoved CON frame is the original object, so a RoundTrip rewrite can match the input bytes. A translation uses frame_with_positions. A rotation or a reorder goes through from_ase with the calculator cleared.

rgpycrumbs.eon.con_splitter.ira_mod[source]
rgpycrumbs.eon.con_splitter.CONSOLE[source]
class rgpycrumbs.eon.con_splitter.AlignMode[source]

Bases: enum.Enum

Defines structural alignment strategies.

NONE = 'none'[source]
ALL = 'all'[source]
ENDPOINTS = 'endpoints'[source]
class rgpycrumbs.eon.con_splitter.SplitMode[source]

Bases: enum.Enum

Defines trajectory validation strictness.

NEB = 'neb'[source]
FLEX = 'flex'[source]
rgpycrumbs.eon.con_splitter.align_path(frames, mode: AlignMode, iraconf: rgpycrumbs.geom.api.alignment.IRAConfig)[source]

Applies the selected alignment strategy to the image sequence.

rgpycrumbs.eon.con_splitter.con_splitter(neb_trajectory_file: pathlib.Path, mode: str, output_dir: pathlib.Path | None, images_per_path: int, path_index: int, center: bool, box_diagonal: tuple[float, float, float], align_type: str, use_ira: bool, ira_kmax: float, path_list_filename: str)[source]

Splits a multi-step trajectory file (.traj, .con, etc.) into individual .con files for a single specified path.

This script reads a trajectory file, which may contain multiple NEB optimization steps (paths), and extracts only the frames corresponding to a single specified path.

It writes each frame of that path into a separate .con file (e.g., ipath_000.con, ipath_001.con, …).

It also generates a text file (default: ‘ipath.dat’) that lists the absolute paths of all created .con files.

This utility extracts specific optimization steps and applies physical chemistry refinements such as centering, cell overrides, and structural alignment (RMSD minimization).