chemparseplot.parse.trajectory.neb

NEB trajectory parser for ASE-readable formats (extxyz, .traj, etc.).

Added in version 1.2.0.

Loads trajectory files via ASE, computes NEB profile data (cumulative distance, improved Henkelman-Jonsson tangent forces), and converts into the formats expected by chemparseplot’s plotting functions.

Module Contents

Functions

_get_energy

Extract energy from an Atoms object, checking calc then info.

load_trajectory

Load an extxyz trajectory file, returning all frames.

compute_cumulative_distance

Compute cumulative Euclidean path length along the NEB band.

compute_tangent_force

Compute force component parallel to the path using the improved Henkelman-Jonsson tangent definition.

extract_profile_data

Extract profile data from trajectory frames.

trajectory_to_profile_dat

Convert trajectory to a (5, N) array matching eOn .dat layout.

trajectory_to_landscape_df

Convert trajectory to a polars DataFrame for plot_landscape_surface.

Data

log

API

chemparseplot.parse.trajectory.neb.log

‘getLogger(…)’

chemparseplot.parse.trajectory.neb._get_energy(atoms: ase.Atoms) float

Extract energy from an Atoms object, checking calc then info.

chemparseplot.parse.trajectory.neb.load_trajectory(traj_file: str) list[ase.Atoms]

Load an extxyz trajectory file, returning all frames.

Added in version 1.2.0.

chemparseplot.parse.trajectory.neb.compute_cumulative_distance(atoms_list: list[ase.Atoms]) numpy.ndarray

Compute cumulative Euclidean path length along the NEB band.

Added in version 1.2.0.

Returns a 1D array of length n_images with the cumulative distance from the first image.

chemparseplot.parse.trajectory.neb.compute_tangent_force(atoms_list: list[ase.Atoms], energies: numpy.ndarray) numpy.ndarray

Compute force component parallel to the path using the improved Henkelman-Jonsson tangent definition.

Added in version 1.2.0.

For interior images, the tangent is energy-weighted (uphill neighbor gets more weight). Forces are read from each frame’s arrays.

Returns a 1D array of f_parallel values (one per image).

chemparseplot.parse.trajectory.neb.extract_profile_data(atoms_list: list[ase.Atoms]) tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray]

Extract profile data from trajectory frames.

Added in version 1.2.0.

Returns (index, distance, energy, f_parallel) arrays.

chemparseplot.parse.trajectory.neb.trajectory_to_profile_dat(atoms_list: list[ase.Atoms]) numpy.ndarray

Convert trajectory to a (5, N) array matching eOn .dat layout.

Added in version 1.2.0.

Columns: [index, reaction_coordinate, energy, f_parallel, zeros] This output can be fed directly into plot_energy_path as: plot_energy_path(ax, data[1], data[2], data[3], …)

chemparseplot.parse.trajectory.neb.trajectory_to_landscape_df(atoms_list: list[ase.Atoms], ira_kmax: float = 1.8, step: int = 0)

Convert trajectory to a polars DataFrame for plot_landscape_surface.

Added in version 1.2.0.

Columns: r, p, grad_r, grad_p, z, step

Uses RMSD from reactant (first frame) and product (last frame) as the 2D coordinate system, with synthetic gradients projected from the parallel force component.