SMILES-formula representation chemistry
Summary
Convert between SMILES strings and molecular formulas to represent chemical structures in transformation product prediction and suspect screening workflows. This dual-representation approach enables both structure-based algorithms (requiring SMILES) and formula-based algorithms (requiring elemental composition) to operate on the same parent and TP datasets.
When to use
When obtaining transformation products through mixed algorithmic backends (library, CTS, BioTransformer, metabolic logic rules) that require different chemical representations: structure-based algorithms need SMILES strings with optional log P values, while formula-based algorithms need elemental transformations or annotation candidates. Apply this skill when your parent input is a suspect list, matched feature groups, or compounds object that must be routed to heterogeneous prediction backends within a single generateTPs workflow.
When NOT to use
- Input data already contains only pre-computed TP libraries without requiring algorithm dispatch or conversion between SMILES and formula representations.
- Analysis workflow does not include transformation product screening or only uses single algorithm backend (e.g., only PubChem library, no mixed algorithmic sources).
- Parent compounds lack both structural information (SMILES) and elemental composition data needed to route to appropriate algorithm backends.
Inputs
- suspect list (data.frame with SMILES or formula columns)
- matched feature groups from suspect screening (with chemical identifiers)
- compounds object from annotation (with structural or formula information)
- parents parameter input to generateTPs function
Outputs
- TP object containing parent names, SMILES strings (for structure-based results), molecular formulas (for formula-based results), and corresponding TP data
- ranked TP candidates with TP Score values (for annotation-based methods)
- multi-generation TP data (TPs of TPs) when generations parameter > 1
How to apply
Accept parent input from suspect lists, matched feature groups from suspect screening, or annotation candidate compounds objects. For structure-based prediction algorithms (BioTransformer, CTS, PubChem library, ann_comp), ensure parents are represented as SMILES strings with optional log P values; retrieve or predict TPs with structural information. For formula-based algorithms (formula library, ann_form, logic rules), represent parents as molecular formulas and calculate TPs from elemental transformations or ranking annotation candidates by TP Score (incorporating structural similarity and suspect matching). Apply the generations parameter to extend predictions to multi-step transformations (TPs of TPs) where applicable. Return a TP object containing parent names with both SMILES and formula data as appropriate for the downstream suspect screening and componentization steps.
Related tools
- patRoon (R package providing generateTPs function that dispatches parent chemical representations to heterogeneous TP prediction backends and manages dual SMILES/formula representations) — https://github.com/rickhelmus/patRoon
- BioTransformer (Structure-based TP prediction algorithm requiring SMILES input; invoked via generateTPs(algorithm = 'biotransformer', ...))
- CTS (Structure-based TP prediction algorithm requiring SMILES input; invoked via generateTPs(algorithm = 'cts', ...))
- PubChem (Library-based TP data source for structure-based queries; accessed via generateTPs(algorithm = 'library', ...) with optional custom library support)
- MetFrag (Compound annotation tool that consumes TP datasets with structural information (SMILES); convertToMFDB generates MetFrag databases for all TPs with structural information)
Examples
TPsBT <- generateTPs(algorithm = "biotransformer", parents = patRoonData::suspectsPos, type = "env")
Evaluation signals
- All parents successfully routed to appropriate algorithm backend: structure-based parents have SMILES strings, formula-based parents have elemental composition data with no routing errors.
- Output TP object contains consistent parent-TP linkages with proper representation format: SMILES-derived TPs include structural data; formula-derived TPs include elemental transformation records.
- Multi-generation TPs (when generations > 1) show nested parent-TP relationships without duplicate or orphaned records.
- TP Score rankings (for ann_comp and ann_form methods) incorporate both structural similarity and suspect matching criteria as specified in patRoon documentation.
- Downstream suspect screening (screenSuspects function) successfully matches TP candidates from both SMILES-based and formula-based sources to experimental features without format conversion failures.
Limitations
- Some parent compounds may lack complete structural or formula information, forcing fallback to suboptimal algorithm backends or exclusion from prediction.
- Multi-generation TP prediction (generations > 1) exponentially increases computational burden; no automatic stopping criterion is provided for poorly predictive intermediate TPs.
- Formula-based algorithms (logic rules, formula library) cannot predict positional or stereochemical isomers that differ only in connectivity; TP Score filtering may remove isomeric candidates important for suspect screening.
- Conversion between SMILES and formula representations is lossy in one direction; SMILES to formula loses stereochemistry and connectivity details; formula to SMILES is ambiguous (multiple isomers per formula).
Evidence
- [other] Accept parent input from one of three sources: a suspect list (data.frame), matched feature groups from suspect screening, or a compounds object from annotation. Validate algorithm selection and route to the appropriate backend (BioTransformer, CTS, PubChem library, formula library, metabolic logic rules, or annotation candidates).: "Accept parent input from one of three sources: a suspect list (data.frame), matched feature groups from suspect screening, or a compounds object from annotation. Validate algorithm selection and"
- [other] For structure-based algorithms (biotransformer, cts, library, ann_comp), retrieve or predict TPs with SMILES and optional log P values; for formula-based algorithms (library_formula, ann_form, logic), calculate TPs from elemental transformations or annotation candidates.: "For structure-based algorithms (biotransformer, cts, library, ann_comp), retrieve or predict TPs with SMILES and optional log P values; for formula-based algorithms (library_formula, ann_form,"
- [other] For ann_comp and ann_form, rank candidates by TP Score incorporating structural similarity and suspect matching.: "For ann_comp and ann_form, rank candidates by TP Score incorporating structural similarity and suspect matching."
- [other] Return a TP object containing parent names, SMILES/formulas, and corresponding TP data, formatted for downstream suspect screening and componentization.: "Return a TP object containing parent names, SMILES/formulas, and corresponding TP data, formatted for downstream suspect screening and componentization."
- [other] Data is obtained of potential TPs for the parents of interest. The TPs may originate from a library or predicted in-silico.: "Data is obtained of potential TPs for the parents of interest. The TPs may originate from a library or predicted in-silico."
1---2name: smiles-formula-representation-chemistry3description: Use when when obtaining transformation products through mixed algorithmic backends (library, CTS, BioTransformer, metabolic logic rules) that require different chemical representations: structure-based algorithms need SMILES strings with optional log P values, while formula-based algorithms need.4license: CC-BY-4.05---67# SMILES-formula representation chemistry89## Summary1011Convert between SMILES strings and molecular formulas to represent chemical structures in transformation product prediction and suspect screening workflows. This dual-representation approach enables both structure-based algorithms (requiring SMILES) and formula-based algorithms (requiring elemental composition) to operate on the same parent and TP datasets.1213## When to use1415When obtaining transformation products through mixed algorithmic backends (library, CTS, BioTransformer, metabolic logic rules) that require different chemical representations: structure-based algorithms need SMILES strings with optional log P values, while formula-based algorithms need elemental transformations or annotation candidates. Apply this skill when your parent input is a suspect list, matched feature groups, or compounds object that must be routed to heterogeneous prediction backends within a single generateTPs workflow.1617## When NOT to use1819- Input data already contains only pre-computed TP libraries without requiring algorithm dispatch or conversion between SMILES and formula representations.20- Analysis workflow does not include transformation product screening or only uses single algorithm backend (e.g., only PubChem library, no mixed algorithmic sources).21- Parent compounds lack both structural information (SMILES) and elemental composition data needed to route to appropriate algorithm backends.2223## Inputs2425- suspect list (data.frame with SMILES or formula columns)26- matched feature groups from suspect screening (with chemical identifiers)27- compounds object from annotation (with structural or formula information)28- parents parameter input to generateTPs function2930## Outputs3132- TP object containing parent names, SMILES strings (for structure-based results), molecular formulas (for formula-based results), and corresponding TP data33- ranked TP candidates with TP Score values (for annotation-based methods)34- multi-generation TP data (TPs of TPs) when generations parameter > 13536## How to apply3738Accept parent input from suspect lists, matched feature groups from suspect screening, or annotation candidate compounds objects. For structure-based prediction algorithms (BioTransformer, CTS, PubChem library, ann_comp), ensure parents are represented as SMILES strings with optional log P values; retrieve or predict TPs with structural information. For formula-based algorithms (formula library, ann_form, logic rules), represent parents as molecular formulas and calculate TPs from elemental transformations or ranking annotation candidates by TP Score (incorporating structural similarity and suspect matching). Apply the generations parameter to extend predictions to multi-step transformations (TPs of TPs) where applicable. Return a TP object containing parent names with both SMILES and formula data as appropriate for the downstream suspect screening and componentization steps.3940## Related tools4142- **patRoon** (R package providing generateTPs function that dispatches parent chemical representations to heterogeneous TP prediction backends and manages dual SMILES/formula representations) — https://github.com/rickhelmus/patRoon43- **BioTransformer** (Structure-based TP prediction algorithm requiring SMILES input; invoked via generateTPs(algorithm = 'biotransformer', ...))44- **CTS** (Structure-based TP prediction algorithm requiring SMILES input; invoked via generateTPs(algorithm = 'cts', ...))45- **PubChem** (Library-based TP data source for structure-based queries; accessed via generateTPs(algorithm = 'library', ...) with optional custom library support)46- **MetFrag** (Compound annotation tool that consumes TP datasets with structural information (SMILES); convertToMFDB generates MetFrag databases for all TPs with structural information)4748## Examples4950```51TPsBT <- generateTPs(algorithm = "biotransformer", parents = patRoonData::suspectsPos, type = "env")52```5354## Evaluation signals5556- All parents successfully routed to appropriate algorithm backend: structure-based parents have SMILES strings, formula-based parents have elemental composition data with no routing errors.57- Output TP object contains consistent parent-TP linkages with proper representation format: SMILES-derived TPs include structural data; formula-derived TPs include elemental transformation records.58- Multi-generation TPs (when generations > 1) show nested parent-TP relationships without duplicate or orphaned records.59- TP Score rankings (for ann_comp and ann_form methods) incorporate both structural similarity and suspect matching criteria as specified in patRoon documentation.60- Downstream suspect screening (screenSuspects function) successfully matches TP candidates from both SMILES-based and formula-based sources to experimental features without format conversion failures.6162## Limitations6364- Some parent compounds may lack complete structural or formula information, forcing fallback to suboptimal algorithm backends or exclusion from prediction.65- Multi-generation TP prediction (generations > 1) exponentially increases computational burden; no automatic stopping criterion is provided for poorly predictive intermediate TPs.66- Formula-based algorithms (logic rules, formula library) cannot predict positional or stereochemical isomers that differ only in connectivity; TP Score filtering may remove isomeric candidates important for suspect screening.67- Conversion between SMILES and formula representations is lossy in one direction; SMILES to formula loses stereochemistry and connectivity details; formula to SMILES is ambiguous (multiple isomers per formula).6869## Evidence7071- [other] Accept parent input from one of three sources: a suspect list (data.frame), matched feature groups from suspect screening, or a compounds object from annotation. Validate algorithm selection and route to the appropriate backend (BioTransformer, CTS, PubChem library, formula library, metabolic logic rules, or annotation candidates).: "Accept parent input from one of three sources: a suspect list (data.frame), matched feature groups from suspect screening, or a compounds object from annotation. Validate algorithm selection and"72- [other] For structure-based algorithms (biotransformer, cts, library, ann_comp), retrieve or predict TPs with SMILES and optional log P values; for formula-based algorithms (library_formula, ann_form, logic), calculate TPs from elemental transformations or annotation candidates.: "For structure-based algorithms (biotransformer, cts, library, ann_comp), retrieve or predict TPs with SMILES and optional log P values; for formula-based algorithms (library_formula, ann_form,"73- [other] For ann_comp and ann_form, rank candidates by TP Score incorporating structural similarity and suspect matching.: "For ann_comp and ann_form, rank candidates by TP Score incorporating structural similarity and suspect matching."74- [other] Return a TP object containing parent names, SMILES/formulas, and corresponding TP data, formatted for downstream suspect screening and componentization.: "Return a TP object containing parent names, SMILES/formulas, and corresponding TP data, formatted for downstream suspect screening and componentization."75- [other] Data is obtained of potential TPs for the parents of interest. The TPs may originate from a library or predicted _in-silico_.: "Data is obtained of potential TPs for the parents of interest. The TPs may originate from a library or predicted _in-silico_."