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#
In-memory CON trajectory with table + ASE views. |
Functions#
Build a Polars table from readcon |
|
Load a CON/convel file into a :class: |
|
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._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
ConFrameobjects.Columns always include
frame_index(fallback to enumeration) andn_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: Rawreadcon.ConFrameobjects. atoms_list: ASEAtomsper frame (viaConFrame.to_ase). table: Polars metrics table from :func:frames_to_table.- path: pathlib.Path | None#
None
- 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
.conor.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_trajectorywhen chemfiles is linked
Raises
ImportError Chemfiles path requested but readcon has no chemfiles support.