Adduct
Class for adduct calculations.
- class dget.adduct.Adduct(base: Formula, adduct: str)
Class used to create a
molmass.Formulafrom a basemolmass.Formulaand an adduct string. This string should be in the format [nM+nX-nY]n+ where M is the base molecule and X, Y are gains / losses. Some valid examples are:[M]+
[M-H]-
[M+Na]+
[2M-H]-
[M+2H]+
[M+K-2H]-
- adduct
adduct string in the form [nM+nX-nY]n+
- base
formula of the base molecule, represented by M in adduct
- num_base
number of base molecules in adduct
- formula
formula of the adduct
- __init__(base: Formula, adduct: str)
Initialisation function.
- Parameters:
base – formula of the base molecule, represented by M in adduct
adduct – adduct string in the form [nM+nX-nY]n+
- property composition: Composition
The composition of the adduct.
- static is_valid_adduct(adduct: str) bool
Test to see if adduct string is valid.
Tests string against
Adduct.regexand makes sure any +/- adducts matchAdduct.regex_split.- Parameters:
adduct – adduct string in the form [nM+nX-nY]n+
- Returns:
True if valid
- mz_range(min_fraction: float = 0.0) Tuple[float, float]
Return the spectrum mz range.
- property spectrum: Spectrum
The spectrum of the adduct.