or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/rdkit@2024.9.x
tile.json

tessl/pypi-rdkit

tessl install tessl/pypi-rdkit@2024.9.0

Platform 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%

task.mdevals/scenario-9/

Molecular Fragment Analyzer

Build a tool that analyzes chemical compounds by breaking them down into meaningful structural fragments and provides insights about their composition.

Requirements

Your tool should:

  1. Accept a molecule in SMILES format as input
  2. Break down the molecule into chemically meaningful fragments based on common synthetic disconnection points
  3. Return a list of unique fragment SMILES strings (each unique structure appearing once)
  4. Count the total number of unique fragments
  5. Handle invalid input appropriately by returning an error message

Input

  • A SMILES string representing a chemical structure

Output

Your program should provide:

  • A list of unique fragment SMILES strings (each unique structure should appear only once)
  • The total count of unique fragments
  • Appropriate error messages for invalid molecules (when error is None, fragments should be present)

Test Cases

Test Case 1: Simple Molecule { @test }

Input: CCO (ethanol) Expected behavior: Should successfully fragment the molecule and return a list of fragments

@test

Test Case 2: Complex Drug-like Molecule { @test }

Input: CC(C)Cc1ccc(cc1)C(C)C(O)=O (ibuprofen) Expected behavior: Should fragment into multiple chemically sensible fragments

@test

Test Case 3: Invalid SMILES { @test }

Input: INVALID (invalid SMILES string) Expected behavior: Should handle the error gracefully and return an appropriate message

@test

Implementation

@generates

API

def fragment_molecule(smiles: str) -> dict:
    """
    Fragments a molecule into chemically meaningful pieces.

    Args:
        smiles: A SMILES string representing the molecule

    Returns:
        A dictionary containing:
        - 'fragments': list of unique fragment SMILES strings (empty list if error)
        - 'count': total number of unique fragments (0 if error)
        - 'error': error message string if input is invalid, None otherwise
    """
    pass

Dependencies { .dependencies }

rdkit { .dependency }

Provides cheminformatics capabilities for molecular analysis and fragmentation.