chemparseplot.api#

Stable public library entry points for chemparseplot.

Prefer this module for new consumers (cookbooks, wailord, notebooks).

Representative in-process path (parse → typed result):

.. code-block:: python

from chemparseplot.api import extract_orca_geomscan_energy

dist_bohr, energy_Eh = extract_orca_geomscan_energy(orca_out_text, "Actual Energy")
# dist_bohr, energy_Eh are pint Quantities (bohr, hartree)

Heavy plot stacks still live under chemparseplot.plot (optional deps / transitional extras until suite uv design fully covers them).

Suite pins/config: use rgpycrumbs.api (shared rgpkgs TOML) — this package does not invent ~/.config/chemparseplot.

.. versionadded:: 1.9.8 .. versionchanged:: 1.9.9 Expose ORCA geomscan energy parse as the stable library path.

Module Contents#

Functions#

grammar_available

True if the optional parsimonious grammar track is importable.

_looks_like_path

True for short path-like strings (avoid Path on multi-line blobs).

parse_xyz

Parse XYZ via grammar track (file path if exists, else text).

parse_orca_final_energy

Last FINAL SINGLE POINT ENERGY as a hartree Quantity.

extract_orca_geomscan_energy

Parse ORCA geometry-scan surface energies from output text.

suite_pins

Return suite package pins from rgpkgs config + env (soft on old hub).

Data#

API#

chemparseplot.api.__all__#

[‘ENERGY_UNITS’, ‘convert_energy_magnitude’, ‘energy_quantity’, ‘extract_orca_geomscan_energy’, ‘gra…

chemparseplot.api.grammar_available() bool[source]#

True if the optional parsimonious grammar track is importable.

chemparseplot.api._looks_like_path(s: str) bool[source]#

True for short path-like strings (avoid Path on multi-line blobs).

chemparseplot.api.parse_xyz(path_or_text: str)[source]#

Parse XYZ via grammar track (file path if exists, else text).

Requires chemparseplot[grammar].

chemparseplot.api.parse_orca_final_energy(path_or_text: str)[source]#

Last FINAL SINGLE POINT ENERGY as a hartree Quantity.

Grammar track; requires chemparseplot[grammar].

chemparseplot.api.extract_orca_geomscan_energy(data: str, energy_type: str = 'Actual Energy') tuple[chemparseplot.units.Q_, chemparseplot.units.Q_][source]#

Parse ORCA geometry-scan surface energies from output text.

In-process library path: text → typed (distance, energy) pint Quantities in Bohr and Hartree (ORCA defaults).

Parameters

data: Blob of ORCA output containing Calculated Surface blocks. energy_type: "Actual Energy" or "SCF energy" (substring match in the block).

Returns

tuple[Q_, Q_] Distances (bohr) and energies (hartree). Empty quantities if no match.

chemparseplot.api.suite_pins() dict[str, str][source]#

Return suite package pins from rgpkgs config + env (soft on old hub).

Empty dict if rgpycrumbs is missing or too old.