rgpycrumbs.eon.con_splitter¶
Split multi-image .con files into per-image structures.
Added in version 0.0.2.
Attributes¶
Classes¶
Functions¶
|
|
|
Load trajectory frames; CON/convel go through readcon to keep metadata. |
|
|
|
Set per-frame total energy on a |
|
Write one ASE structure as a CON file via readcon. |
|
Write a readcon |
|
Applies the selected alignment strategy to the image sequence. |
|
Splits a multi-step trajectory file (.traj, .con, etc.) into |
Module Contents¶
- 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 go through readcon to keep metadata.
Returns
(ase_atoms_list, con_frames_or_none).con_framesis populated only for.con/.convelinputs so writers can preserve per-frame energy.
- rgpycrumbs.eon.con_splitter._apply_frame_energy(frame, energy: float | None)[source]¶
Set per-frame total energy on a
ConFramecopy-friendly handle.Prefers
set_energy/set_scalar_metadata(readcon>=0.13). Older wheels that expose only a read-onlyenergyproperty are reconstructed with string metadata values accepted by the constructor.
- rgpycrumbs.eon.con_splitter._write_con_atoms(dest: pathlib.Path, atoms, energy: float | None = None) None[source]¶
Write one ASE structure as a CON file via readcon.
- rgpycrumbs.eon.con_splitter._write_con_frame(dest: pathlib.Path, frame, atoms=None, energy: float | None = None) None[source]¶
Write a readcon
ConFrame, optionally replacing positions from atoms.
- class rgpycrumbs.eon.con_splitter.AlignMode[source]¶
Bases:
enum.EnumDefines structural alignment strategies.
- class rgpycrumbs.eon.con_splitter.SplitMode[source]¶
Bases:
enum.EnumDefines trajectory validation strictness.
- 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).