chemparseplot.parse.chemgp_jsonl

Parsers for ChemGP JSONL output formats.

ChemGP Rust examples produce JSONL files with method comparison data, GP quality grids, and RFF approximation benchmarks. This module provides structured parsing into typed containers for downstream plotting.

.. versionadded:: 1.5.0

Module Contents

Classes

OptimizerTrace

Single optimizer trace from a comparison JSONL.

ComparisonData

Parsed optimizer comparison from a single JSONL file.

RFFQualityData

Parsed RFF approximation quality data.

GPQualityGrid

GP quality grid data for a single training set size.

StationaryPoint

A stationary point (minimum or saddle) on the PES.

GPQualityData

Complete GP quality data from mb_gp_quality.jsonl.

Functions

parse_comparison_jsonl

Parse a ChemGP optimizer comparison JSONL file.

parse_rff_quality_jsonl

Parse a ChemGP RFF quality JSONL file.

parse_gp_quality_jsonl

Parse a ChemGP GP quality JSONL file.

API

class chemparseplot.parse.chemgp_jsonl.OptimizerTrace[source]

Single optimizer trace from a comparison JSONL.

Attributes

method : str Optimizer name (e.g. "gp_minimize", "neb", "otgpd"). steps : list[int] Step indices. oracle_calls : list[int] Cumulative oracle call counts. energies : list[float] | None Energy at each step (minimize, dimer). forces : list[float] | None Force norm at each step (dimer: force, NEB: max_force).

method: str

None

steps: list[int]

‘field(…)’

oracle_calls: list[int]

‘field(…)’

energies: list[float] | None

None

forces: list[float] | None

None

class chemparseplot.parse.chemgp_jsonl.ComparisonData[source]

Parsed optimizer comparison from a single JSONL file.

Attributes

traces : dict[str, OptimizerTrace] Keyed by method name. summary : dict | None Summary record if present.

traces: dict[str, chemparseplot.parse.chemgp_jsonl.OptimizerTrace]

‘field(…)’

summary: dict[str, Any] | None

None

chemparseplot.parse.chemgp_jsonl.parse_comparison_jsonl(path: str | pathlib.Path) chemparseplot.parse.chemgp_jsonl.ComparisonData[source]

Parse a ChemGP optimizer comparison JSONL file.

Handles minimize, dimer, and NEB comparison formats. Each line is a JSON object with a method field (or summary: true).

Parameters

path Path to the JSONL file.

Returns

ComparisonData Parsed traces keyed by method name.

class chemparseplot.parse.chemgp_jsonl.RFFQualityData[source]

Parsed RFF approximation quality data.

Attributes

exact_energy_mae : float Exact GP energy MAE vs true surface. exact_gradient_mae : float Exact GP gradient MAE vs true surface. d_rff_values : list[int] RFF feature counts tested. energy_mae_vs_true : list[float] RFF energy MAE vs true surface. gradient_mae_vs_true : list[float] RFF gradient MAE vs true surface. energy_mae_vs_gp : list[float] RFF energy MAE vs exact GP. gradient_mae_vs_gp : list[float] RFF gradient MAE vs exact GP.

exact_energy_mae: float

0.0

exact_gradient_mae: float

0.0

d_rff_values: list[int]

‘field(…)’

energy_mae_vs_true: list[float]

‘field(…)’

gradient_mae_vs_true: list[float]

‘field(…)’

energy_mae_vs_gp: list[float]

‘field(…)’

gradient_mae_vs_gp: list[float]

‘field(…)’

chemparseplot.parse.chemgp_jsonl.parse_rff_quality_jsonl(path: str | pathlib.Path) chemparseplot.parse.chemgp_jsonl.RFFQualityData[source]

Parse a ChemGP RFF quality JSONL file.

Parameters

path Path to the JSONL file.

Returns

RFFQualityData Parsed exact GP and RFF metrics.

class chemparseplot.parse.chemgp_jsonl.GPQualityGrid[source]

GP quality grid data for a single training set size.

Attributes

n_train : int Number of training points. nx : int Grid x resolution. ny : int Grid y resolution. x : list[list[float]] Grid x coordinates (ny x nx). y : list[list[float]] Grid y coordinates (ny x nx). true_e : list[list[float]] True energy on grid. gp_e : list[list[float]] GP predicted energy on grid. gp_var : list[list[float]] GP variance on grid. train_x : list[float] Training point x coordinates. train_y : list[float] Training point y coordinates. train_e : list[float] Training point energies.

n_train: int

0

nx: int

0

ny: int

0

x: list[list[float]]

‘field(…)’

y: list[list[float]]

‘field(…)’

true_e: list[list[float]]

‘field(…)’

gp_e: list[list[float]]

‘field(…)’

gp_var: list[list[float]]

‘field(…)’

train_x: list[float]

‘field(…)’

train_y: list[float]

‘field(…)’

train_e: list[float]

‘field(…)’

class chemparseplot.parse.chemgp_jsonl.StationaryPoint[source]

A stationary point (minimum or saddle) on the PES.

kind: str

None

id: int

None

x: float

None

y: float

None

energy: float

None

class chemparseplot.parse.chemgp_jsonl.GPQualityData[source]

Complete GP quality data from mb_gp_quality.jsonl.

Attributes

meta : dict Grid metadata (nx, ny, x_min, x_max, y_min, y_max). stationary : list[StationaryPoint] Minima and saddle points. grids : dict[int, GPQualityGrid] Grid data keyed by n_train.

meta: dict[str, Any]

‘field(…)’

stationary: list[chemparseplot.parse.chemgp_jsonl.StationaryPoint]

‘field(…)’

grids: dict[int, chemparseplot.parse.chemgp_jsonl.GPQualityGrid]

‘field(…)’

chemparseplot.parse.chemgp_jsonl.parse_gp_quality_jsonl(path: str | pathlib.Path) chemparseplot.parse.chemgp_jsonl.GPQualityData[source]

Parse a ChemGP GP quality JSONL file.

Parameters

path Path to the JSONL file (e.g. mb_gp_quality.jsonl).

Returns

GPQualityData Structured grid data with metadata and stationary points.