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

Molecular Geometry Optimizer

Build a tool that optimizes the 3D geometry of molecules using force field calculations. The tool should generate initial 3D structures and then refine them to find low-energy conformations.

Requirements

Your solution should:

  1. Parse molecular structures from SMILES strings
  2. Generate initial 3D coordinates for molecules
  3. Optimize the 3D geometry to minimize energy
  4. Calculate and report the energy before and after optimization
  5. Handle multiple molecules and report statistics

The optimizer should output:

  • The initial energy of the molecule
  • The final energy after optimization
  • Whether the optimization converged successfully

Test Cases

The following test cases should be implemented:

  • Given the SMILES string "CCO" (ethanol), generate 3D coordinates and optimize the geometry, returning both initial and final energies @test
  • Given the SMILES string "c1ccccc1" (benzene), optimize the 3D structure and verify that the final energy is lower than the initial energy @test
  • Given the SMILES string "CC(C)C" (isobutane), optimize the geometry and verify the optimization converges successfully @test
  • Given an invalid SMILES string "XYZ123", handle the error gracefully and return an appropriate error message @test

Implementation

@generates

API

def optimize_molecule(smiles: str) -> dict:
    """
    Optimize the 3D geometry of a molecule from a SMILES string.

    Args:
        smiles: A SMILES string representing the molecule

    Returns:
        A dictionary containing:
        - 'initial_energy': The energy before optimization (float)
        - 'final_energy': The energy after optimization (float)
        - 'converged': Whether optimization converged successfully (bool)
        - 'error': Error message if parsing failed (str or None)
    """
    pass

def optimize_batch(smiles_list: list) -> dict:
    """
    Optimize multiple molecules and return aggregate statistics.

    Args:
        smiles_list: A list of SMILES strings

    Returns:
        A dictionary containing:
        - 'results': List of individual optimization results
        - 'average_energy_reduction': Average energy reduction across all molecules (float)
        - 'success_rate': Fraction of molecules successfully optimized (float)
    """
    pass

Dependencies { .dependencies }

rdkit { .dependency }

Provides cheminformatics and molecular modeling capabilities.