chemparseplot.parse.eon.con_io#

Public readcon-backed CON/convel helpers for eOn parsers.

All .con / .convel I/O in chemparseplot should go through this module so metadata-native energies (readcon>=0.7) stay on one code path. readcon remains an optional extra (chemparseplot[neb]); import errors surface only when these helpers are called.

Added in version 1.8.1.

Module Contents#

Functions#

is_con_path

Return True when path looks like an eOn CON/convel file.

_readcon

read_con_frames

Read all frames from a CON/convel file as readcon.ConFrame objects.

read_con_as_ase

Read all frames from a CON/convel file as ASE Atoms objects.

read_first_atoms

Read the first frame of a CON file as an ASE Atoms object.

frame_with_energy

Return a ConFrame copy with per-frame total energy set (eV).

write_con_frames

Write ConFrame objects to path via readcon.write_con.

write_atoms_as_con

Convert ASE Atoms to ConFrame and write a CON file.

Data#

API#

chemparseplot.parse.eon.con_io.__all__#

[‘CON_SUFFIXES’, ‘frame_with_energy’, ‘is_con_path’, ‘read_con_as_ase’, ‘read_con_frames’, ‘read_fir…

chemparseplot.parse.eon.con_io.CON_SUFFIXES#

(‘.con’, ‘.convel’)

chemparseplot.parse.eon.con_io.is_con_path(path: str | pathlib.Path) bool[source]#

Return True when path looks like an eOn CON/convel file.

chemparseplot.parse.eon.con_io._readcon()[source]#
chemparseplot.parse.eon.con_io.read_con_frames(path: str | pathlib.Path) list[Any][source]#

Read all frames from a CON/convel file as readcon.ConFrame objects.

chemparseplot.parse.eon.con_io.read_con_as_ase(path: str | pathlib.Path) list[source]#

Read all frames from a CON/convel file as ASE Atoms objects.

chemparseplot.parse.eon.con_io.read_first_atoms(path: str | pathlib.Path)[source]#

Read the first frame of a CON file as an ASE Atoms object.

chemparseplot.parse.eon.con_io.frame_with_energy(frame: Any, energy: float) Any[source]#

Return a ConFrame copy with per-frame total energy set (eV).

Uses ConFrame.set_energy when available (readcon>=0.7) so metadata stays schema-valid; falls back to reconstructing the frame with string metadata.

chemparseplot.parse.eon.con_io.write_con_frames(path: str | pathlib.Path, frames: collections.abc.Sequence[Any]) pathlib.Path[source]#

Write ConFrame objects to path via readcon.write_con.

chemparseplot.parse.eon.con_io.write_atoms_as_con(path: str | pathlib.Path, atoms_list: collections.abc.Sequence[Any], *, energies: collections.abc.Sequence[float | None] | None = None) pathlib.Path[source]#

Convert ASE Atoms to ConFrame and write a CON file.

Optional energies (eV) are attached per frame with :func:frame_with_energy.