Skip to main content

ParaNMR-Synth

ParaNMR-Synth generates deterministic, replayable synthetic pNMR datasets for supervised learning and validation of ParaNMR fitting workflows.

Each synthetic case follows the layout of a ParaNMR example. The dataset root also contains one paired ML table:

dataset.csv
manifest.json
cases/<sample_id>/
  DATA/
    PARA/generated_shifts.csv
    HFC/geometry.xyz
    DIA/diamagnetic.csv
    CHI/susceptibility.csv
    LABELS/labels.csv              # optional
  SIMULATIONS/
    FITTING/config.yml

dataset.csv is the canonical supervised-learning artifact. One row contains m1..mN as features and six Cartesian susceptibility components plus p1,p2 as targets. The selected susceptibility unit is recorded in manifest.json.

DATA/DIA/diamagnetic.csv is always atom-resolved and normalized to atom_label,shift, including when the source input was DFT plus a reference. DATA/CHI/susceptibility.csv contains susceptibility truth only; linewidth truth remains exclusively in the root dataset.csv.

Requirements

The dataset pipeline requires ParaNMR with atom-labelled diamagnetic CSV input, fixed-assignment linewidth: estimate: p1_p2, and ParaNMR experiment CSV round-tripping.

python3 -m pip install paranmr
python3 -m pip install -e .[dev]

Dataset YAML

project:
  name: ybl8_moments_v1
  n_cases: 1000
  seed: 42
hyperfine:
  method: pdip
  file: geometries/YbL8.xyz
  paramagnetic_centre: [0.0, 0.0, 0.0]
  spin: 0.5
  orbit: 3
  total_momentum_J: 3.5
nuclei:
  include: H
diamagnetic:
  method: csv
  file: inputs/diamagnetic.csv
signal_labels:                 # optional
  file: inputs/labels.csv
experiment:
  temperature_k: 302.15
  magnetic_field_t: 4.7
moments:
  number_of_moments: 10
linewidth:
  method: r6
susceptibility:
  model: isoaxrho_euler

chi_iso is calculated through ParaNMR's spin-only Curie-law implementation. Synth samples rho_over_ax in [0, 1/3], derives physical bounds for chi_ax, and samples Euler angles in standard ZYZ domains. All χ targets are exported in canonical ParaNMR units of ų.

For linewidth.method: r6, Synth derives p1 from ParaNMR's point-dipole Guéron Curie R2 calculation with the fixed generation policy tau_R = 1 ns. It samples the distance-independent p2 uniformly in [0, 50] Hz, then converts it to the ppm convention required by ParaNMR's R6 forward model. Neither coefficient is a user-facing configuration parameter.

CLI

paranmr-synth dataset generate ybl8.yml --output datasets/yb_v1
cd datasets/yb_v1/cases/<sample_id>/SIMULATIONS/FITTING
MPLBACKEND=Agg paranmr --hide fit_susc config.yml
paranmr-synth dataset validate ../..

validation_report.json records truth, fitted values and errors. It does not silently reject a sample based on rank, condition number or score.

Validation stages

The replay profile uses ParaNMR fixed assignment. It validates the forward data contract and separately recovers R6 p1,p2 from labelled linewidths. Assignment-free GMM moments validation belongs to ParaNMR's own synthetic test suite and is intentionally a later stage.

Development

python3 -m pytest -m 'not integration'
python3 -m pytest -m integration

The integration suite launches the real paranmr executable and must run against the compatible ParaNMR version. Every generated CSV records ParaNMR-Synth version provenance in its comment header.

Release files for ParaNMR-Synth 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ParaNMR-Synth 0.4.0
File Size Uploaded
paranmr_synth-0.4.0.tar.gz 19.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ParaNMR-Synth 0.4.0
File Interpreter ABI Platform
paranmr_synth-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 46.7 kB

Release files / paranmr_synth-0.4.0.tar.gz

Download URL paranmr_synth-0.4.0.tar.gz
Size 19.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8148c21cb73eb672202213cd61a67d527dce3d5ceb961ee6ec51a540278c405d
BLAKE2b-256 checksum
How to use checksums
42bf83004ff1b212382d854cf74be5755f21fc70acd3d9b03f62eb37fd21cba4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.

Transparency log

Release files / paranmr_synth-0.4.0-py3-none-any.whl

Download URL paranmr_synth-0.4.0-py3-none-any.whl
Size 27.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b31ba5549a60bce98c4898dd9197b8f04af5120c4793a1be6435981a8d5ad9ed
BLAKE2b-256 checksum
How to use checksums
0ec810ad4a173eaf43d7f9b18f188d7fa804f5c195e1773937c49b2c4d8a11b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page