matchms.filtering.metadata_processing.require_parent_mass_match_smiles module¶
- matchms.filtering.metadata_processing.require_parent_mass_match_smiles.require_parent_mass_match_smiles(spectrum_in: Spectrum, mass_tolerance) Spectrum | None [source]¶
Validates if the parent mass of the given spectrum matches the mass calculated from its associated SMILES string within a specified tolerance.
- Parameters:
- Returns:
The validated spectrum if its parent mass matches the SMILES mass within the specified tolerance, or None otherwise.
- Return type:
Spectrum or None