Platform wheels for RDKit - a comprehensive cheminformatics and machine-learning library with Python bindings
89
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.
Your solution should:
The optimizer should output:
The following test cases should be implemented:
@generates
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)
"""
passProvides cheminformatics and molecular modeling capabilities.
Install with Tessl CLI
npx tessl i tessl/pypi-rdkitevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10