vibesketch.document.nmr

Calculated NMR shieldings and shifts of a run’s result (#97).

ORCA prints the isotropic shielding of every nucleus in a summary table (ORCA 6.1 manual, “NMR chemical shifts”, whose ethanol example the tests follow): https://www.faccts.de/docs/orca/6.1/manual/contents/spectroscopyproperties/nmr.html The strict reader keeps it on the result by atom index in the job’s input.

A chemical shift is a difference of shieldings, δ = σ(reference) − σ, with the reference computed at the same level of theory: the reference run (TMS for ¹H and ¹³C, CFCl₃ for ¹⁹F, …) is named and recorded, its job specification must equal the run’s, and its atoms of the element must all be equivalent. No literature constant is ever used in its place. Nuclei equivalent by the molecule’s symmetry (RDKit’s canonical ranking without tie-breaking, on the graph perceived from the run’s geometry) are averaged, as a spectrum shows one line for a methyl group.

Couplings are not read: vibe-sketch’s ORCA writer requests shieldings only.

Functions

nmr_shifts(document, run, *[, reference, nuclei])

One row per set of equivalent nuclei: its atoms, shielding and, with a reference, shift.

nmr_table(document, run, *[, reference, ...])

The per-nucleus line list as CSV (full precision), Markdown or a LaTeX fragment.

orca_shieldings(text, symbols)

The shielding summary of an ORCA 6 output, checked against the input's atoms.

with_nmr_labels(document, run, *, reference)

document with shift labels beside the run species' first drawn structure.

Exceptions

NmrRefused

Shieldings that cannot be read, or shifts that cannot be worked out as asked.

exception vibesketch.document.nmr.NmrRefused[source]

Bases: ValueError

Shieldings that cannot be read, or shifts that cannot be worked out as asked.

vibesketch.document.nmr.nmr_shifts(document, run, *, reference=None, nuclei=None)[source]

One row per set of equivalent nuclei: its atoms, shielding and, with a reference, shift.

Parameters:
Return type:

dict[str, Any]

vibesketch.document.nmr.nmr_table(document, run, *, reference=None, nuclei=None, format='csv')[source]

The per-nucleus line list as CSV (full precision), Markdown or a LaTeX fragment.

Parameters:
Return type:

bytes

vibesketch.document.nmr.orca_shieldings(text, symbols)[source]

The shielding summary of an ORCA 6 output, checked against the input’s atoms.

Parameters:
Return type:

ResultShieldings | None

vibesketch.document.nmr.with_nmr_labels(document, run, *, reference, nuclei=('H', 'C'))[source]

document with shift labels beside the run species’ first drawn structure.

Each heavy atom gets one text: its own shift (δC 18.1) and those of the hydrogens on it (δH 1.17). The run’s atoms are matched to the drawing by graph; equivalent atoms have one shift, so any match gives the same labels.

Parameters:
Return type:

Document