Splitting con files¶
Trajectory Splitting¶
rgpycrumbs eon con-splitter¶
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).
Usage
rgpycrumbs eon con-splitter [OPTIONS] NEB_TRAJECTORY_FILE
Options
- --mode <mode>¶
Validation mode: ‘neb’ (strict multiples) or ‘normal’ (flexible).
- Options:
neb | flex
- --output-dir <output_dir>¶
Directory to save output files. Defaults to the input filename stem.
- --images-per-path <images_per_path>¶
Required Number of images in a single NEB path (e.g., 7). [REQUIRED]
- --path-index <path_index>¶
Index of the NEB path to extract (0-based). Use -1 for the last path.
- Default:
-1
- --center, --no-center¶
Center the atomic coordinates around the origin.
- --box-diagonal <box_diagonal>¶
Override the unit cell dimensions (Å) during processing.
- Default:
25.0, 25.0, 25.0
- --align-type <align_type>¶
Alignment: ‘all’ (every image), ‘endpoints’ (reactant/product), or ‘none’.
- Options:
none | all | endpoints
- --use-ira¶
Enable Iterative Reordering and Alignment (requires ira_mod).
- --ira-kmax <ira_kmax>¶
kmax factor for the IRA matching algorithm.
- --path-list-filename <path_list_filename>¶
Name of the file listing the generated .con absolute paths.
Arguments
- NEB_TRAJECTORY_FILE¶
Required argument
Usage¶
To split a trajectory file:
rgpycrumbs eon con-splitter neb_final_path.con -o initial_images
This creates a directory named initial_images containing ipath_000.con,
ipath_001.con, etc., along with an ipath.dat file listing their paths which
feeds into EON via:
[Nudged Elastic Band]
initial_path_in = ipath.dat
minimize_endpoints_for_ipath = False
Refinement Strategies¶
Structural Alignment¶
The --align-type option removes non-physical translational and rotational degrees of freedom that often accumulate during optimization.
- all
Aligns every intermediate image to the reactant. This creates a visually smooth trajectory but can occasionally introduce artifacts if the reaction path involves significant curvature.
- endpoints
Aligns only the reactant and product. This ensures consistent boundary conditions while preserving the relative internal coordinates of the intermediate images as optimized.
Iterative Reordering and Alignment (IRA)¶
When using --use-ira, the script handles atom index permutations. In complex
NEB optimizations—especially those involving surface diffusion or molecular
dissociations—atom indices in the output trajectory may not match the reactant’s
order. IRA finds the optimal mapping and alignment simultaneously, ensuring that
the resulting .con files maintain a consistent atom numbering scheme across
the entire path.
Centering and Unit Cell Management¶
The --center flag translates the center of mass of each image to the origin.
Use --box-diagonal to override the simulation cell dimensions (e.g., 20 20 20), which ensures all generated images share an identical vacuum box for
EON calculations.
Initial Path Generation from Generic Files¶
We may also generate valid starting points for an EON NEB calculation from a
generic .xyz file or any ASE compatible input. For instance, for a two-image
trajectory, to convert a reactant/product pair into the required EON format
while fixing coordinate and mapping issues:
python -m rgpycrumbs.cli eon con-splitter --images-per-path 2 initial.xyz --box-diagonal 25 25 25 --center --align-type endpoints --use-ira --ira-kmax 1.8
This approach ensures that the reactant and product share an identical vacuum box, center of mass, and atom indexing before the NEB optimization begins.
API Reference¶
For developer details and source code see
rgpycrumbs.eon.con_splitter.