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-8/

Aromatic System Analyzer

Build a tool that analyzes and reports on aromatic systems in chemical structures.

Requirements

Your implementation should:

  1. Accept molecules in SMILES format as input
  2. Identify and count the number of aromatic ring systems present
  3. Provide the ability to convert aromatic representations to their explicit single/double bond forms
  4. Export molecules in both aromatic and non-aromatic (explicit bond) representations

Implementation

@generates

API

def count_aromatic_rings(smiles: str) -> int:
    """
    Count the number of aromatic rings in a molecule.

    Parameters:
    - smiles: SMILES string representing the molecule

    Returns:
    Integer count of aromatic rings

    Raises:
    ValueError: If the SMILES string is invalid
    """

def to_kekule_smiles(smiles: str) -> str:
    """
    Convert a molecule to Kekule form SMILES (explicit single/double bonds).

    Parameters:
    - smiles: Input SMILES string (may be aromatic)

    Returns:
    SMILES string in Kekule form with explicit bond types

    Raises:
    ValueError: If the SMILES string is invalid
    """

def to_aromatic_smiles(smiles: str) -> str:
    """
    Convert a molecule to aromatic form SMILES (using aromatic notation).

    Parameters:
    - smiles: Input SMILES string (may be in Kekule form)

    Returns:
    SMILES string in aromatic form

    Raises:
    ValueError: If the SMILES string is invalid
    """

Test Cases

Basic Aromatic Ring Counting

  • Benzene ("c1ccccc1") contains exactly 1 aromatic ring @test
  • Naphthalene ("c1ccc2ccccc2c1") contains exactly 2 aromatic rings @test
  • Pyridine ("c1ccncc1") contains exactly 1 aromatic ring @test

Kekule Conversion

  • Benzene in aromatic form ("c1ccccc1") converts to Kekule form containing explicit single and double bonds (e.g., "C1=CC=CC=C1") @test
  • Naphthalene ("c1ccc2ccccc2c1") converts to Kekule form with explicit alternating bonds @test

Aromatic Conversion

  • Benzene in Kekule form ("C1=CC=CC=C1") converts to aromatic notation (lowercase letters, e.g., "c1ccccc1") @test

Error Handling

  • Invalid SMILES string raises ValueError @test

Dependencies { .dependencies }

rdkit { .dependency }

Provides cheminformatics functionality for molecular manipulation and analysis.