{"library":"rdkit-pypi","title":"RDKit for Python (PyPI)","description":"RDKit is a collection of chemoinformatics and machine-learning software written in C++ and Python. The `rdkit-pypi` package provides pre-built wheels for the RDKit library, enabling easy installation via pip on various platforms and Python versions. This addresses common build issues encountered with the upstream RDKit PyPI package, which often only provides source distributions. It follows a rapid release cadence, syncing with RDKit's development.","language":"python","status":"active","last_verified":"Fri Apr 17","install":{"commands":["pip install rdkit-pypi"],"cli":null},"imports":["from rdkit import Chem","from rdkit.Chem import AllChem","from rdkit import DataStructs","from rdkit.Chem.Draw import MolsToGridImage","from rdkit.Chem.Draw import IPythonConsole"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from rdkit import Chem\nfrom rdkit.Chem.Draw import MolsToGridImage\n\n# Create a molecule from SMILES string\nmol1 = Chem.MolFromSmiles('CCO')\nmol2 = Chem.MolFromSmiles('c1ccccc1')\n\nprint(f\"SMILES for ethanol: {Chem.MolToSmiles(mol1)}\")\nprint(f\"SMILES for benzene: {Chem.MolToSmiles(mol2)}\")\n\n# Generate an image grid (requires matplotlib and pillow, often pre-installed)\nimg = MolsToGridImage([mol1, mol2], molsPerRow=2, subImgSize=(200, 200))\n# In a Jupyter environment, img would display directly\n# If not in Jupyter, you might save it: img.save('molecules.png')","lang":"python","description":"This example demonstrates how to create RDKit molecule objects from SMILES strings, convert them back to SMILES, and visualize them as a grid image. Ensure you have matplotlib and pillow installed for image generation.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}