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 weight analysis tool that processes chemical structures and calculates their molecular weights.
Your tool should provide functionality to:
Your tool should accept:
For individual molecules, return:
For batch processing, return structured data containing:
CN1C=NC2=C1C(=O)N(C(=O)N2C)C) and verify it returns approximately 194.19 g/mol @test@generates
def calculate_molecular_weight(smiles: str) -> float:
"""
Calculate the standard molecular weight of a molecule from its SMILES string.
Args:
smiles: SMILES string representing the molecule
Returns:
Standard molecular weight in g/mol
Raises:
ValueError: If the SMILES string is invalid
"""
pass
def calculate_exact_molecular_weight(smiles: str) -> float:
"""
Calculate the exact molecular weight of a molecule from its SMILES string.
Args:
smiles: SMILES string representing the molecule
Returns:
Exact molecular weight in g/mol
Raises:
ValueError: If the SMILES string is invalid
"""
pass
def analyze_molecules(smiles_list: list[str]) -> list[dict]:
"""
Analyze multiple molecules and return their molecular weight information.
Args:
smiles_list: List of SMILES strings
Returns:
List of dictionaries containing:
- 'smiles': the SMILES string
- 'molecular_weight': standard molecular weight
- 'exact_molecular_weight': exact molecular weight
"""
pass
def filter_by_weight(smiles_list: list[str], min_weight: float, max_weight: float) -> list[str]:
"""
Filter molecules by molecular weight range.
Args:
smiles_list: List of SMILES strings
min_weight: Minimum molecular weight threshold (g/mol)
max_weight: Maximum molecular weight threshold (g/mol)
Returns:
List of SMILES strings for molecules within the weight range
"""
passProvides cheminformatics capabilities for molecular analysis.