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. |
|
|
|
|
|
Copy frame through |
|
|
|
True when every atom moved by the same vector, including the zero vector. |
|
|
|
|
|
Forces, displacements, and spreads still describe atoms. |
|
|
|
Write a new geometry. Old forces, displacements, and spreads stay unset. |
|
Write one image with precision omitted and canonical left off. |
|
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/.convelstayConFrameobjects fromcon_ioso a later write can keep sections. Every other suffix stays onase.io.read.
- rgpycrumbs.eon.con_splitter._with_energy(frame, energy: float | None)[source]¶
Copy frame through
frame_with_energyonly when the energy changes.
- 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._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._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 throughfrom_asewith the calculator cleared.
- 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).