chemparseplot.parse.orca.neb.opi_parser#

Parse ORCA NEB calculations via a stable public API.

OPI is an optional internal backend. Prefer::

from chemparseplot.parse.orca.neb import parse_orca_neb

Do not import opi in application code for suite-supported workflows.

  • backend="auto" (default): try OPI, then legacy .interp parsing.

  • backend="opi": require OPI (ORCA 6.1+ / opi package).

  • backend="legacy": .interp only.

Returns :class:~chemparseplot.parse.types.OrcaNebResult for plot helpers.

Added in version 0.2.0.

Changed in version 1.9.0: OPI is loaded only through :mod:chemparseplot.parse.orca._opi (no rgpycrumbs.ensure_import). Public entry supports backend= selection.

Module Contents#

Classes#

_OpiGeometry

Typed geometry payload extracted from one OPI image.

_OpiNebImage

Typed per-image NEB record extracted from OPI output.

Functions#

_get_opi_output

Get OPI Output class (lazy). Public tests may monkeypatch this.

_has_opi

parse_orca_neb

Parse ORCA NEB into :class:OrcaNebResult (public entry point).

_require_fallback

_parse_orca_neb_opi

Parse ORCA NEB using OPI only (internal).

_read_opi_neb_image

Read one NEB image record from an OPI output object.

_geometry_to_atoms

Convert a typed OPI geometry payload to ASE Atoms.

_calculate_rmsd

Calculate RMSD between two ASE Atoms objects (simple, no alignment).

_compute_synthetic_gradients

Compute synthetic gradients for landscape plotting.

parse_orca_neb_fallback

Parse ORCA NEB using legacy regex parsing (ORCA < 6.1).

Data#

API#

chemparseplot.parse.orca.neb.opi_parser.Backend#

None

chemparseplot.parse.orca.neb.opi_parser._get_opi_output()[source]#

Get OPI Output class (lazy). Public tests may monkeypatch this.

chemparseplot.parse.orca.neb.opi_parser._has_opi() bool[source]#
chemparseplot.parse.orca.neb.opi_parser.HAS_OPI#

‘opi_available(…)’

class chemparseplot.parse.orca.neb.opi_parser._OpiGeometry[source]#

Typed geometry payload extracted from one OPI image.

coordinates: numpy.ndarray#

None

atomic_numbers: tuple[int, ...]#

None

class chemparseplot.parse.orca.neb.opi_parser._OpiNebImage[source]#

Typed per-image NEB record extracted from OPI output.

energy_ev: float#

None

geometry: chemparseplot.parse.orca.neb.opi_parser._OpiGeometry | None#

None

gradient: numpy.ndarray | None#

None

chemparseplot.parse.orca.neb.opi_parser.parse_orca_neb(basename: str, working_dir: pathlib.Path | None = None, *, backend: chemparseplot.parse.orca.neb.opi_parser.Backend = 'auto') chemparseplot.parse.types.OrcaNebResult[source]#

Parse ORCA NEB into :class:OrcaNebResult (public entry point).

Parameters

basename ORCA job basename (without extension). working_dir Directory containing ORCA outputs (default: cwd). backend auto (default): OPI if importable, else legacy .interp. opi: require OPI. legacy: .interp only.

Returns

OrcaNebResult Structured NEB data for :mod:chemparseplot.plot.neb.

Example

from chemparseplot.parse.orca.neb import parse_orca_neb data = parse_orca_neb(“job”, Path(“calc”))

chemparseplot.parse.orca.neb.opi_parser._require_fallback(basename: str, working_dir: pathlib.Path) chemparseplot.parse.types.OrcaNebResult[source]#
chemparseplot.parse.orca.neb.opi_parser._parse_orca_neb_opi(basename: str, working_dir: pathlib.Path) chemparseplot.parse.types.OrcaNebResult[source]#

Parse ORCA NEB using OPI only (internal).

chemparseplot.parse.orca.neb.opi_parser._read_opi_neb_image(output, *, index: int) chemparseplot.parse.orca.neb.opi_parser._OpiNebImage[source]#

Read one NEB image record from an OPI output object.

chemparseplot.parse.orca.neb.opi_parser._geometry_to_atoms(geometry: chemparseplot.parse.orca.neb.opi_parser._OpiGeometry)[source]#

Convert a typed OPI geometry payload to ASE Atoms.

chemparseplot.parse.orca.neb.opi_parser._calculate_rmsd(ref: Any, mobile: Any) float[source]#

Calculate RMSD between two ASE Atoms objects (simple, no alignment).

chemparseplot.parse.orca.neb.opi_parser._compute_synthetic_gradients(rmsd_r, rmsd_p, forces, atoms_list)[source]#

Compute synthetic gradients for landscape plotting.

chemparseplot.parse.orca.neb.opi_parser.parse_orca_neb_fallback(basename: str, working_dir: pathlib.Path | None = None) chemparseplot.parse.types.OrcaNebResult | None[source]#

Parse ORCA NEB using legacy regex parsing (ORCA < 6.1).

Falls back to parsing .interp files if OPI is not available.

Returns

OrcaNebResult or None NEB data if successful, None if parsing fails