SmileSherlock
A high-performance, production-grade tool for SMILES validation, PubChem lookup, and chemical structure retrieval.
Features
- SMILES Validation & Canonicalization - Validate and standardize SMILES strings using RDKit
- Multi-format Input - Support for CSV, TSV, XLSX, SMI, SDF, and TXT files
- Smart Auto-detection - Automatically identify SMILES columns
- PubChem Lookup - Search by SMILES, CID, Name, InChI, and InChIKey
- Rich Metadata - Retrieve IUPAC name, molecular formula, mass, descriptors
- Structure Downloads - Get 2D/3D SDF, MOL, PDB, and PNG formats from PubChem
- Offline Molecule Generation (--gen) - Generate 2D and 3D conformations (SDF, MOL, PDB) offline from SMILES via RDKit with forcefield optimization
- Batch Processing - Process hundreds of compounds with progress tracking
- Async/Multithreading - Fast parallel downloads with retry logic
- Caching - SQLite database for storing results locally
- Multiple Exports - Save results as CSV, Excel, or JSON
- Python API - Use directly in your scripts via smilesherlock module
- CLI Tool - Full-featured command-line interface with smilesherlock command
Installation
From PyPI
pip install smilesherlock
Development Installation
Clone the repository and install in editable mode:
git clone https://github.com/AtharvaTilewale/SmileSherlock.git
cd SmileSherlock
pip install -e ".[dev]"
Quick Start
CLI Usage
# Show configuration and status
smilesherlock status
# Initialize directories and database
smilesherlock init
# Lookup a single compound (by SMILES, CID, or Chemical Name)
smilesherlock lookup "c1ccccc1" # Benzene
smilesherlock lookup "aspirin"
smilesherlock lookup 5282253 --type cid
# Batch process a file to retrieve metadata
smilesherlock batch compounds.csv --output results.xlsx --format xlsx
# Download structure from PubChem
smilesherlock download 5282253 --format sdf --3d
# Generate 3D structure offline from SMILES using RDKit (--gen all)
smilesherlock download "CC(=O)OC1=CC=CC=C1C(=O)O" --gen all --3d --format sdf
# Generate 2D MOL structure locally from SMILES
smilesherlock download "c1ccccc1" --gen all --2d --format mol
# Batch download with offline fallback for missing structures (--gen missing)
smilesherlock download --file compounds.csv --gen missing --3d --format sdf --output-dir ./structures/
# Batch generate all structures offline from a SMILES file (--gen all)
smilesherlock download --file compounds.smi --gen all --3d --format pdb --output-dir ./3d_models/
Python API
from smilesherlock import lookup, lookup_file, download_structure, generate_structure, validate_smiles
# Lookup single compound
result = lookup("c1ccccc1")
print(result.cid, result.iupac_name)
# Process batch file
results = lookup_file("compounds.csv", output_format="xlsx")
# Download structure from PubChem
download_structure(5282253, format="sdf", dimension="3d")
# Generate 2D or 3D structure offline from SMILES
generate_structure(
smiles="CC(=O)OC1=CC=CC=C1C(=O)O",
output_path="aspirin_3d.sdf",
format="sdf",
dimension="3d",
title="Aspirin"
)
For more detailed API documentation, see the API Reference page.
Documentation
For complete tutorials and advanced usage examples, see the Practical Guide or visit the official documentation on Read the Docs.
Requirements
- Python 3.10+
- RDKit (cheminformatics library)
- pandas (data handling)
- requests/aiohttp (HTTP)
- typer (CLI framework)
- rich/tqdm (UI/progress)
Configuration
For configuration and architecture details, see the Configuration & Architecture page.
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (git checkout -b feature/amazing-feature)
- Commit changes (git commit -m 'Add amazing feature')
- Push to branch (git push origin feature/amazing-feature)
- Open a Pull Request
For more details, see the Contributing Guide.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Citation
If you use SmileSherlock in your research, please cite:
@software{smilesherlock2026,
author={Atharva Tilewale},
doi={10.5281/zenodo.21763825},
month={8},
title={SmileSherlock: A High-Performance SMILES Validation and PubChem Lookup Tool},
version={1.2.0},
year={2026},
url={https://github.com/AtharvaTilewale/SmileSherlock}
}
Support
- Documentation: https://smilesherlock.readthedocs.io
- Issues: https://github.com/AtharvaTilewale/SmileSherlock/issues
- Discussions: https://github.com/AtharvaTilewale/SmileSherlock/discussions
Changelog
See CHANGELOG.md for version history.
Made with ❤️ for the cheminformatics community
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file smilesherlock-1.2.0.tar.gz.
File metadata
- Download URL: smilesherlock-1.2.0.tar.gz
- Upload date:
- Size: 22.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0817b808e638e3618dc3ce3ec452d1b243f880871b4678f96b263376677a4d8
|
|
| MD5 |
78c22c3bb03ac9d59ddc78408bff97c6
|
|
| BLAKE2b-256 |
683c687bed1b47172fb341f7b404108b45d57c18ca64bc4a609f2e3f355ff8fc
|
Provenance
The following attestation bundles were made for smilesherlock-1.2.0.tar.gz:
Publisher:
publish.yml on AtharvaTilewale/SmileSherlock
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
smilesherlock-1.2.0.tar.gz -
Subject digest:
e0817b808e638e3618dc3ce3ec452d1b243f880871b4678f96b263376677a4d8 - Sigstore transparency entry: 2568130648
- Sigstore integration time:
-
Permalink:
AtharvaTilewale/SmileSherlock@d1e98b2752a4ecbe023484259058f9c5d6184812 -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/AtharvaTilewale
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d1e98b2752a4ecbe023484259058f9c5d6184812 -
Trigger Event:
release
-
Statement type:
File details
Details for the file smilesherlock-1.2.0-py3-none-any.whl.
File metadata
- Download URL: smilesherlock-1.2.0-py3-none-any.whl
- Upload date:
- Size: 24.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c923e68f4a8663544ecc492ce840ae5fe3447bb9143f571da5e445c8b5a8fa0
|
|
| MD5 |
f5647fcf940ccf09c85c503ac2e13ba4
|
|
| BLAKE2b-256 |
71ae8015c1018573df6588a813918afb0778d11a70d2a4c1682e67d84f8515bb
|
Provenance
The following attestation bundles were made for smilesherlock-1.2.0-py3-none-any.whl:
Publisher:
publish.yml on AtharvaTilewale/SmileSherlock
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
smilesherlock-1.2.0-py3-none-any.whl -
Subject digest:
5c923e68f4a8663544ecc492ce840ae5fe3447bb9143f571da5e445c8b5a8fa0 - Sigstore transparency entry: 2568130656
- Sigstore integration time:
-
Permalink:
AtharvaTilewale/SmileSherlock@d1e98b2752a4ecbe023484259058f9c5d6184812 -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/AtharvaTilewale
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d1e98b2752a4ecbe023484259058f9c5d6184812 -
Trigger Event:
release
-
Statement type: