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
- 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
smilesherlockmodule - CLI Tool - Full-featured command-line interface with
smilesherlockcommand
Installation
From PyPI (coming soon)
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
smilesherlock lookup "c1ccccc1" # Benzene
smilesherlock lookup 5282253 --cid
# Batch process a file
smilesherlock batch compounds.csv --output results.xlsx --format xlsx
# Download structure
smilesherlock download 5282253 --format sdf --3d
Python API (coming in Phase 2)
from smilesherlock import lookup, lookup_file, download_structure
# Lookup single compound
result = lookup("c1ccccc1")
print(result.cid, result.iupac_name)
# Process file
results = lookup_file("compounds.csv", output_format="xlsx")
# Download structure
download_structure(5282253, format="sdf", dimension="3d")
Requirements
- Python 3.10+
- RDKit (cheminformatics library)
- pandas (data handling)
- requests/aiohttp (HTTP)
- typer (CLI framework)
- rich/tqdm (UI/progress)
Configuration
SmileSherlock respects environment variables for configuration:
export SMILESHERLOCK_CACHE_DIR=/custom/cache
export SMILESHERLOCK_LOG_LEVEL=DEBUG
export SMILESHERLOCK_MAX_WORKERS=8
Configuration is read from (in order):
- Environment variables (prefix:
SMILESHERLOCK_) .envfile in current directory- Built-in defaults
Project Structure
SmileSherlock/
├── smilesherlock/ # Main package
│ ├── __init__.py # Public API
│ ├── config.py # Configuration management
│ ├── logging_config.py # Logging setup
│ ├── cli.py # CLI entry point
│ ├── cli/
│ │ ├── __init__.py
│ │ └── main.py # Typer CLI application
│ ├── core/ # Core functionality (Phase 2)
│ │ ├── smiles.py # SMILES validation
│ │ ├── pubchem.py # PubChem API
│ │ └── database.py # SQLite caching
│ └── utils/ # Utilities (Phase 2)
│ ├── file_io.py # File parsing
│ ├── export.py # Export formats
│ └── parsers.py # Input parsers
├── tests/ # Test suite
├── docs/ # Documentation
├── pyproject.toml # Package metadata & dependencies
├── README.md # This file
└── LICENSE # MIT License
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
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},
title={SmileSherlock: High-performance SMILES validation and PubChem lookup},
version={1.0.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.0.0.tar.gz.
File metadata
- Download URL: smilesherlock-1.0.0.tar.gz
- Upload date:
- Size: 21.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7144dc4ed4e4049caec73c66e1704db8fc6ad9c993876c2e1a09812615e56ac0
|
|
| MD5 |
26059bcf5a7ee87f194ac713f40d6901
|
|
| BLAKE2b-256 |
1c6fa66219c2f9df69f5ca3d5c32eb65c44055d5446f0a781cbdba04fe993b46
|
Provenance
The following attestation bundles were made for smilesherlock-1.0.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.0.0.tar.gz -
Subject digest:
7144dc4ed4e4049caec73c66e1704db8fc6ad9c993876c2e1a09812615e56ac0 - Sigstore transparency entry: 2323423500
- Sigstore integration time:
-
Permalink:
AtharvaTilewale/SmileSherlock@6081630ccc38305e635aa4392e450128d7dc4fd6 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/AtharvaTilewale
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6081630ccc38305e635aa4392e450128d7dc4fd6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file smilesherlock-1.0.0-py3-none-any.whl.
File metadata
- Download URL: smilesherlock-1.0.0-py3-none-any.whl
- Upload date:
- Size: 23.1 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 |
7f16cc82b2403e508d925f256372839d86067e93b53a6541a59bc3056cb59fa8
|
|
| MD5 |
04b1bbea3b0da6f87e1bc864ada1d428
|
|
| BLAKE2b-256 |
04ce8b2921b0d79f4e49a9153b0e46d2a7a85b0523a1d936e4b430f1e6e4c71a
|
Provenance
The following attestation bundles were made for smilesherlock-1.0.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.0.0-py3-none-any.whl -
Subject digest:
7f16cc82b2403e508d925f256372839d86067e93b53a6541a59bc3056cb59fa8 - Sigstore transparency entry: 2323423567
- Sigstore integration time:
-
Permalink:
AtharvaTilewale/SmileSherlock@6081630ccc38305e635aa4392e450128d7dc4fd6 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/AtharvaTilewale
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6081630ccc38305e635aa4392e450128d7dc4fd6 -
Trigger Event:
release
-
Statement type: