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¶
Single optimizer trace from a comparison JSONL. |
|
Parsed optimizer comparison from a single JSONL file. |
|
Parsed RFF approximation quality data. |
|
GP quality grid data for a single training set size. |
|
A stationary point (minimum or saddle) on the PES. |
|
Complete GP quality data from mb_gp_quality.jsonl. |
Functions¶
Parse a ChemGP optimizer comparison JSONL file. |
|
Parse a ChemGP RFF quality JSONL file. |
|
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).
- 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(…)’
- 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
methodfield (orsummary: 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.
- 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.
- class chemparseplot.parse.chemgp_jsonl.StationaryPoint[source]¶
A stationary point (minimum or saddle) on the PES.
- 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.
- 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.