SMARTS Reaction Rule Encoding
Summary
Encode chemical reaction transformation patterns as SMARTS strings for use in iterative network expansion workflows. SMARTS rules capture generalized reaction templates that can be applied programmatically to predict reactions across compound libraries.
When to use
When you have a set of known chemical reactions (e.g., from MetaCyc or KEGG) that you want to generalize into reusable transformation rules for predicting novel reactions on new compound sets. Use this skill if you need to convert reaction patterns into a machine-readable format suitable for RDKit-based cheminformatic tools.
When NOT to use
- Input reactions are already encoded as SMARTS and only need to be loaded—skip to rule application.
- You need arbitrary reaction prediction without reference to a known reaction database—SMARTS rules require grounding in observed chemistry.
- Reaction data is in non-standard formats (e.g., reaction arrow notation without atom mappings) and cannot be reliably parsed into SMARTS.
Inputs
- Reaction dataset (e.g., MetaCyc, KEGG reactions with SMILES or structure format)
- Reference reactants and products (SMILES strings or chemical structure notation)
- Reaction mechanism or transformation description
Outputs
- SMARTS-encoded rule TSV file (columns: rule_id, SMARTS_string, optionally metadata)
- Validated rule set suitable for RDKit pattern matching
- Coverage metrics (percentage of reference reactions matched by rule set)
How to apply
Analyze the reactants and products of reference reactions to identify conserved transformation patterns—atom mappings, bond changes, and functional group modifications. Encode these patterns as SMARTS strings, which represent the reaction in a format RDKit can parse and match. Organize encoded rules into a TSV file with rule identifiers and SMARTS strings. Test rule specificity and coverage by applying them to reference compounds; coverage benchmarks (e.g., 272 rules → 90% MetaCyc coverage) help calibrate rule set size. Load the SMARTS rules into Pickaxe alongside coreactant specifications for iterative application across generations.
Related tools
- RDKit (Parses SMARTS strings and performs chemical pattern matching and reaction transformation computation) — https://rdkit.org
- Pickaxe (Loads and iteratively applies SMARTS-encoded rules to compound sets for network expansion) — https://github.com/tyo-nu/MINE-Database
- Python (Implementation language for rule encoding, curation, and testing workflows)
Examples
# Load SMARTS rules from TSV and initialize Pickaxe with 272 rules (90% MetaCyc coverage)
pickaxe = Pickaxe(starting_compounds='iML1515_ecoli_GEM.csv', rules='metacyc_generalized_rules.tsv', coreactants='metacyc_coreactants.tsv', generations=1)
Evaluation signals
- SMARTS strings are syntactically valid and parseable by RDKit without errors
- Rule set coverage matches or exceeds expected threshold (e.g., 272 rules achieve ≥90% coverage of MetaCyc reference reactions)
- When applied to test compound sets, encoded rules reproduce known reactions or generate chemically plausible products
- Rule-generated compounds can be validated against external databases (MetaCyc, KEGG) or experimental metabolomics peaks
- No duplicate or contradictory rules in the final TSV file; each rule ID is unique and deterministic
Limitations
- SMARTS rule quality depends on quality of reference reaction data; errors or ambiguities in reactant/product annotation propagate into rules.
- Rule coverage plateaus: 100% coverage of MetaCyc requires all 1221 rules; smaller rule sets (e.g., 20 rules) achieve only ~50% coverage, forcing trade-offs between specificity and breadth.
- Reaction selectivity and regiochemistry cannot always be captured in SMARTS rules; rules may predict multiple products or fail to distinguish regioisomers.
- SMARTS encoding requires domain expertise in cheminformatics notation; subtle errors in atom mapping or bond specification can produce non-functional rules.
Evidence
- [intro] Rules are generated using
SMARTS which represent reactions in a string: "Rules are generated using SMARTS which represent reactions in a string"
- [intro] Pickaxe applies reaction rules, representing reaction transformation patterns, to a list of user-specified compounds in order to predict reactions: "Pickaxe applies reaction rules, representing reaction transformation patterns, to a list of user-specified compounds in order to predict reactions"
- [intro] A set of biological reaction rules and cofactors are provided by default. These consist of approximately 70,000 MetaCyc reactions condensed into generic rules: "A set of biological reaction rules and cofactors are provided by default. These consist of approximately 70,000 MetaCyc reactions condensed into generic rules"
- [intro] Selecting 20 rules provides 50% coverage of MetaCyc reactions; 100 rules provide 78% coverage; 272 rules provide 90% coverage; 500 rules provide 95% coverage; 956 rules provide 99% coverage; 1221 rules provide 100% coverage: "Selecting 20 rules provides 50% coverage of MetaCyc reactions; 100 rules provide 78% coverage; 272 rules provide 90% coverage; 500 rules provide 95% coverage; 956 rules provide 99% coverage; 1221"
- [intro] which set of reaction rules you would like to use: "which set of reaction rules you would like to use"
- [other] Load coreactant list and reaction rules (SMARTS-encoded) from TSV files: "Load coreactant list and reaction rules (SMARTS-encoded) from TSV files"
1---2name: smarts-reaction-rule-encoding3description: Use when when you have a set of known chemical reactions (e.g., from MetaCyc or KEGG) that you want to generalize into reusable transformation rules for predicting novel reactions on new compound sets.4license: CC-BY-4.05---67# SMARTS Reaction Rule Encoding89## Summary1011Encode chemical reaction transformation patterns as SMARTS strings for use in iterative network expansion workflows. SMARTS rules capture generalized reaction templates that can be applied programmatically to predict reactions across compound libraries.1213## When to use1415When you have a set of known chemical reactions (e.g., from MetaCyc or KEGG) that you want to generalize into reusable transformation rules for predicting novel reactions on new compound sets. Use this skill if you need to convert reaction patterns into a machine-readable format suitable for RDKit-based cheminformatic tools.1617## When NOT to use1819- Input reactions are already encoded as SMARTS and only need to be loaded—skip to rule application.20- You need arbitrary reaction prediction without reference to a known reaction database—SMARTS rules require grounding in observed chemistry.21- Reaction data is in non-standard formats (e.g., reaction arrow notation without atom mappings) and cannot be reliably parsed into SMARTS.2223## Inputs2425- Reaction dataset (e.g., MetaCyc, KEGG reactions with SMILES or structure format)26- Reference reactants and products (SMILES strings or chemical structure notation)27- Reaction mechanism or transformation description2829## Outputs3031- SMARTS-encoded rule TSV file (columns: rule_id, SMARTS_string, optionally metadata)32- Validated rule set suitable for RDKit pattern matching33- Coverage metrics (percentage of reference reactions matched by rule set)3435## How to apply3637Analyze the reactants and products of reference reactions to identify conserved transformation patterns—atom mappings, bond changes, and functional group modifications. Encode these patterns as SMARTS strings, which represent the reaction in a format RDKit can parse and match. Organize encoded rules into a TSV file with rule identifiers and SMARTS strings. Test rule specificity and coverage by applying them to reference compounds; coverage benchmarks (e.g., 272 rules → 90% MetaCyc coverage) help calibrate rule set size. Load the SMARTS rules into Pickaxe alongside coreactant specifications for iterative application across generations.3839## Related tools4041- **RDKit** (Parses SMARTS strings and performs chemical pattern matching and reaction transformation computation) — https://rdkit.org42- **Pickaxe** (Loads and iteratively applies SMARTS-encoded rules to compound sets for network expansion) — https://github.com/tyo-nu/MINE-Database43- **Python** (Implementation language for rule encoding, curation, and testing workflows)4445## Examples4647```48# Load SMARTS rules from TSV and initialize Pickaxe with 272 rules (90% MetaCyc coverage)49pickaxe = Pickaxe(starting_compounds='iML1515_ecoli_GEM.csv', rules='metacyc_generalized_rules.tsv', coreactants='metacyc_coreactants.tsv', generations=1)50```5152## Evaluation signals5354- SMARTS strings are syntactically valid and parseable by RDKit without errors55- Rule set coverage matches or exceeds expected threshold (e.g., 272 rules achieve ≥90% coverage of MetaCyc reference reactions)56- When applied to test compound sets, encoded rules reproduce known reactions or generate chemically plausible products57- Rule-generated compounds can be validated against external databases (MetaCyc, KEGG) or experimental metabolomics peaks58- No duplicate or contradictory rules in the final TSV file; each rule ID is unique and deterministic5960## Limitations6162- SMARTS rule quality depends on quality of reference reaction data; errors or ambiguities in reactant/product annotation propagate into rules.63- Rule coverage plateaus: 100% coverage of MetaCyc requires all 1221 rules; smaller rule sets (e.g., 20 rules) achieve only ~50% coverage, forcing trade-offs between specificity and breadth.64- Reaction selectivity and regiochemistry cannot always be captured in SMARTS rules; rules may predict multiple products or fail to distinguish regioisomers.65- SMARTS encoding requires domain expertise in cheminformatics notation; subtle errors in atom mapping or bond specification can produce non-functional rules.6667## Evidence6869- [intro] Rules are generated using `SMARTS` which represent reactions in a string: "Rules are generated using `SMARTS` which represent reactions in a string"70- [intro] Pickaxe applies reaction rules, representing reaction transformation patterns, to a list of user-specified compounds in order to predict reactions: "Pickaxe applies reaction rules, representing reaction transformation patterns, to a list of user-specified compounds in order to predict reactions"71- [intro] A set of biological reaction rules and cofactors are provided by default. These consist of approximately 70,000 MetaCyc reactions condensed into generic rules: "A set of biological reaction rules and cofactors are provided by default. These consist of approximately 70,000 MetaCyc reactions condensed into generic rules"72- [intro] Selecting 20 rules provides 50% coverage of MetaCyc reactions; 100 rules provide 78% coverage; 272 rules provide 90% coverage; 500 rules provide 95% coverage; 956 rules provide 99% coverage; 1221 rules provide 100% coverage: "Selecting 20 rules provides 50% coverage of MetaCyc reactions; 100 rules provide 78% coverage; 272 rules provide 90% coverage; 500 rules provide 95% coverage; 956 rules provide 99% coverage; 1221"73- [intro] which set of reaction rules you would like to use: "which set of reaction rules you would like to use"74- [other] Load coreactant list and reaction rules (SMARTS-encoded) from TSV files: "Load coreactant list and reaction rules (SMARTS-encoded) from TSV files"