chemparseplot.plot.con#

Draw CON trajectory profiles. These helpers do not parse files.

plot_con_energy_profile and plot_con_force_profile draw one curve. plot_con_overview stacks energy, optional fmax, and an optional structure strip. plot_con_overlay draws several trajectories together.

Module Contents#

Functions#

_display_energies

_finite_fmax

_structure_indices

_atoms_for_strip

_energy_ylabel

plot_con_overview

Draw one trajectory: energy, optional fmax, optional structure strip.

plot_con_overlay

Draw energy curves for several trajectories on one axes.

_x_axis

plot_con_energy_profile

Plot energy against frame index for one CON trajectory.

plot_con_force_profile

Plot a per-frame force norm from the trajectory table.

select_structure_indices

Pick frame indices for a structure strip.

plot_con_structure_strip

Draw selected frames of traj with plot_structure_strip.

Data#

API#

chemparseplot.plot.con._COLORS#

()

chemparseplot.plot.con._STRUCTURE_MODES#

(‘none’, ‘endpoints’, ‘linspace’, ‘all’)

chemparseplot.plot.con._display_energies(energies: collections.abc.Sequence[float], unit: str, *, relative: bool) → numpy.ndarray#
chemparseplot.plot.con._finite_fmax(traj: Any) → numpy.ndarray | None#
chemparseplot.plot.con._structure_indices(n_frames: int, mode: str, max_structs: int) → list[int]#
chemparseplot.plot.con._atoms_for_strip(traj: Any) → list[Any]#
chemparseplot.plot.con._energy_ylabel(unit: str, *, relative: bool) → str#
chemparseplot.plot.con.plot_con_overview(traj: Any, *, energy_unit: str = 'eV', relative: bool = True, show_forces: bool = True, structures: str = 'none', max_structs: int = 8, strip_renderer: str = 'ase', title: str | None = None) → matplotlib.figure.Figure#

Draw one trajectory: energy, optional fmax, optional structure strip.

Positions for the strip come from

Func:

chemparseplot.parse.eon.frame_series.atoms_list_from_frames. This function does not read a file.

chemparseplot.plot.con.plot_con_overlay(trajs: collections.abc.Sequence[Any], *, labels: collections.abc.Sequence[str] | None = None, ax: matplotlib.axes.Axes | None = None, energy_unit: str = 'eV', relative: bool = True, title: str | None = None) → matplotlib.figure.Figure#

Draw energy curves for several trajectories on one axes.

Each curve is shifted by its own first finite energy when relative is true. This function does not read a file.

chemparseplot.plot.con._x_axis(traj: Any) → numpy.ndarray#
chemparseplot.plot.con.plot_con_energy_profile(traj: Any, ax: matplotlib.axes.Axes | None = None, *, energy_unit: str = 'eV', relative: bool = True, color: str | None = None, marker: str = 'o', label: str | None = None, title: str | None = None) → matplotlib.axes.Axes#

Plot energy against frame index for one CON trajectory.

relative subtracts the first finite energy. energy_unit is the presentation unit.

chemparseplot.plot.con.plot_con_force_profile(traj: Any, ax: matplotlib.axes.Axes | None = None, *, which: str = 'fmax', color: str | None = None, marker: str = 's', label: str | None = None, title: str | None = None) → matplotlib.axes.Axes#

Plot a per-frame force norm from the trajectory table.

which is fmax or frms. A table without that column raises ValueError.

chemparseplot.plot.con.select_structure_indices(n_frames: int, mode: str = 'endpoints', *, max_structs: int = 8, energies: numpy.ndarray | None = None) → list[int]#

Pick frame indices for a structure strip.

endpoints is the first and last frame, plus the highest energy between them when energies is given. linspace and all are evenly spaced, and all returns every frame when it fits in max_structs. none is empty.

chemparseplot.plot.con.plot_con_structure_strip(traj: Any, ax: matplotlib.axes.Axes | None = None, *, mode: str = 'endpoints', max_structs: int = 8, renderer: str = 'ase', rotation: str = '0x,90y,0z', xyzrender_config: str = 'paton', title: str | None = None) → matplotlib.axes.Axes#

Draw selected frames of traj with plot_structure_strip.

The default renderer is ase.