chemparseplot.parse.con.trajectory#

Load general CON trajectories into typed tables + ASE atoms.

Works for any readcon-core CON/convel (eOn movies, standalone structures, multi-image NEB paths). Does not require a job directory or sidecar .dat files — metadata-native energies/forces on the frames are used when present.

.. versionadded:: 1.9.12

Module Contents#

Classes#

ConTrajectory

In-memory CON trajectory with table + ASE views.

Functions#

_frame_field

_metadata_dict

_force_stats

frames_to_table

Build a Polars table from readcon ConFrame objects.

load_con_trajectory

Load a CON/convel file into a :class:ConTrajectory.

load_trajectory

Load CON/convel or chemfiles-supported formats into ConTrajectory.

Data#

API#

chemparseplot.parse.con.trajectory.__all__#

[‘ConTrajectory’, ‘frames_to_table’, ‘load_con_trajectory’, ‘load_trajectory’]

chemparseplot.parse.con.trajectory._FRAME_FIELDS#

(‘frame_index’, ‘energy’, ‘neb_bead’, ‘neb_band’, ‘time’, ‘timestep’, ‘potential_type’, ‘spec_versio…

chemparseplot.parse.con.trajectory._frame_field(frame: Any, name: str) → Any[source]#
chemparseplot.parse.con.trajectory._metadata_dict(frame: Any) → dict[str, Any][source]#
chemparseplot.parse.con.trajectory._force_stats(frame: Any) → tuple[float | None, float | None][source]#
chemparseplot.parse.con.trajectory.frames_to_table(frames: list[Any])[source]#

Build a Polars table from readcon ConFrame objects.

Columns always include frame_index (fallback to enumeration) and n_atoms. Energy / force stats / NEB ids / time are filled when the frame carries them. Extra string metadata keys are promoted to columns when present on any frame.

class chemparseplot.parse.con.trajectory.ConTrajectory[source]#

In-memory CON trajectory with table + ASE views.

Attributes

path: Source path when loaded from disk (else None). frames: Raw readcon.ConFrame objects. atoms_list: ASE Atoms per frame (via ConFrame.to_ase). table: Polars metrics table from :func:frames_to_table.

path: pathlib.Path | None#

None

frames: list[Any]#

None

atoms_list: list[Any]#

None

table: Any#

None

source: str#

‘readcon’

property n_frames: int#
property energies: numpy.ndarray#

Energy column as float array (NaN where missing).

with_energies(energies: list[float] | numpy.ndarray) → chemparseplot.parse.con.trajectory.ConTrajectory[source]#

Return a copy with per-frame energies set on frames and table.

chemparseplot.parse.con.trajectory.load_con_trajectory(path: str | pathlib.Path) → chemparseplot.parse.con.trajectory.ConTrajectory[source]#

Load a CON/convel file into a :class:ConTrajectory.

Parameters

path: Path to .con or .convel (multi-frame movies supported).

chemparseplot.parse.con.trajectory.load_trajectory(path: str | pathlib.Path) → chemparseplot.parse.con.trajectory.ConTrajectory[source]#

Load CON/convel or chemfiles-supported formats into ConTrajectory.

  • .con / .convel → :func:load_con_trajectory (readcon native)

  • other extensions → :func:load_chemfiles_trajectory when chemfiles is linked

Raises

ImportError Chemfiles path requested but readcon has no chemfiles support.