search_compound
Search reaction JSON files for a SMILES compound, returning exact and similar matches above a Tanimoto threshold to locate related experiments or confirm prior synthesis.
Instructions
Search for a compound across experiment JSON files by SMILES similarity.
Scans a directory of reaction JSON files (from parse_reaction) and returns exact matches and structurally similar compounds above the given Tanimoto threshold. Useful for finding related experiments, checking if a compound has been made before, or tracing a compound through a multi-step synthesis.
This module is under active development. If unavailable, the tool returns a graceful error rather than crashing.
Args: smiles: SMILES string of the compound to search for. Use resolve_name to get a validated SMILES first. experiment_dir: Directory containing reaction JSON files to search. similarity_threshold: Tanimoto similarity cutoff (0–1). Default 0.85.
Returns: Dict with keys: ok, query_smiles, exact_matches (list), similar_matches (list with similarity scores), total_files_searched. Returns {ok: False, error: "..."} if module unavailable or search fails.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| smiles | Yes | ||
| experiment_dir | Yes | ||
| similarity_threshold | No |