isotope_distribution
Compute the natural isotopic pattern of any chemical formula: returns isotopologue masses, relative intensities, and m/z for charged species, using offline NIST data.
Instructions
Compute the natural isotopic pattern (isotope distribution) of a formula.
Returns the set of isotopologue peaks a mass spectrometer would see: each
peak's neutral mass (and mz when charge is non-zero), its
intensity relative to the base peak, and its absolute abundance.
Also reports the monoisotopic_mass (most-abundant isotope of each
element) and the average_mass. Backed by the bundled NIST Atomic Weights
and Isotopic Compositions database -- offline and deterministic.
Peaks below threshold percent of the base peak are dropped; at most
limit are returned. grouping selects nominal-mass (unit) or
fully resolved (exact) peaks.
Raises ValueError for an unparseable formula or an unknown element.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| formula | Yes | Chemical formula whose isotopic pattern to compute. Same syntax as molecular_weight_calculator: element symbols, integer multipliers, nested groups, isotope labels D/T, Unicode subscripts. Examples: 'CHCl3', 'C6H5Br', 'C254H377N65O75S6'. | |
| charge | No | Ion charge. 0 (default) reports neutral isotopologue masses. A non-zero n reports m/z for the [M+nH] ion (positive) or [M-nH] ion (negative): (mass +/- n*proton)/|n|. | |
| threshold | No | Drop peaks below this percent of the base (most intense) peak. | |
| limit | No | Maximum number of peaks to return, most intense first. | |
| grouping | No | 'unit' (default) collapses peaks to nominal integer masses (intensity-weighted centroid) -- the low-resolution spectrum a chemist eyeballs. 'exact' keeps every resolved isotopologue. | unit |