tessl install tessl/pypi-rdkit@2024.9.0Platform wheels for RDKit - a comprehensive cheminformatics and machine-learning library with Python bindings
Agent Success
Agent success rate when using this tile
89%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.01x
Baseline
Agent success rate without this tile
88%
Build a molecular similarity search tool that can find structurally similar molecules from a dataset based on their chemical fingerprints. The tool should accept a query molecule and return the most similar molecules ranked by similarity score.
Your implementation should:
Given a query molecule "CCO" (ethanol) and a dataset containing ["CCCO", "CC", "c1ccccc1"], when searching with threshold 0.3:
@test
Given a query molecule "CC(=O)O" (acetic acid), a target list containing similar molecules, and custom parameters (radius=3, nbits=1024):
@test
Given a query molecule "CCO", a target list ["c1ccccc1", "c1ccc2ccccc2c1"], and threshold=0.8:
@test
@generates
def find_similar_molecules(
query_smiles: str,
target_smiles_list: list[str],
threshold: float = 0.5,
radius: int = 2,
nbits: int = 2048
) -> list[dict]:
"""
Find molecules similar to the query molecule.
Args:
query_smiles: SMILES string of the query molecule
target_smiles_list: List of SMILES strings to search
threshold: Minimum similarity score (0-1) to include in results
radius: Fingerprint radius parameter (default: 2)
nbits: Fingerprint bit length (default: 2048)
Returns:
List of dicts with keys 'smiles' and 'similarity', sorted by similarity descending
"""
passProvides cheminformatics functionality for molecular fingerprint generation and similarity calculations.