Skip to main content
from Ligand2SMILES

Ligand2SMILES

A lightweight Python module for looking up SMILES strings from compound and ligand names. Built from Wikidata (P2017/P233) and PubChem, with a curated list of phosphine ligands including the full Buchwald monophosphine family, bisphosphines, NHC ligands, and more.

Installation

git clone https://github.com/Pedro-DR-TH/Ligand2SMILES
cd Ligand2SMILES
pip install .

No dependencies beyond the Python standard library. The lookup database is included, no setup or any scraping is required.

All entries are validated through RDKit and cross-checked against source molecular weights (entries with a discrepancy of ≥1 Da were removed) before inclusion in the database.

Usage

Exact name lookup

from Ligand2SMILES import name_to_smiles

smiles = name_to_smiles("XPhos")
# 'CC(C)C1=CC(=C(C(=C1)C(C)C)...'

smiles = name_to_smiles("triphenylphosphine")
# 'C1=CC=C(C=C1)P(C2=CC=CC=C2)C3=CC=CC=C3'

smiles = name_to_smiles("unknown")
# None
from Ligand2SMILES import search

results = search("phos")
# [{'name': 'XPhos', 'smiles': '...'}, {'name': 'SPhos', 'smiles': '...'}, ...]

List all available names

from Ligand2SMILES import available_names

names = available_names()
# ['1,10-phenanthroline', 'BINAP', 'BrettPhos', 'XPhos', ...]
from Ligand2SMILES import fuzzy_search

fuzzy_search("xphos")
# [{'name': 'XPhos', 'smiles': '...', 'score': 1.0}]

fuzzy_search("triphenylphospine")  # typo
# [{'name': 'triphenylphosphine', 'smiles': '...', 'score': 0.97}]

fuzzy_search("j-Pr")  # OCR error for i-Pr
# returns closest phosphine matches

Coverage

~12000+ compounds including:

  • Buchwald monophosphines (XPhos, SPhos, RuPhos, BrettPhos, DavePhos, JohnPhos, ...)
  • Bisphosphines (BINAP, DPPF, dppe, Xantphos, SEGPHOS, ...)
  • NHC ligands (IMes, IPr, SIMes, SIPr, ...)
  • SelectPhos family (SelectPhos, CySelectPhos, PhSelectPhos)
  • Nitrogen donors (1,10-phenanthroline, 2,2-bipyridine, ...)
  • General compounds from Wikidata

Data sources

  • Wikidata: SPARQL queries for P2017 (isomeric SMILES) and P233 (canonical SMILES)
  • PubChem: CAS number and systematic name lookups for specialty phosphine ligands not in Wikidata

Found something wrong? Let me know here: https://forms.gle/jbzANwcuArx13yis5

Thank you!

Metadata

Release files for Ligand2SMILES 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Ligand2SMILES 0.1.0
File Size Uploaded
ligand2smiles-0.1.0.tar.gz 260.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Ligand2SMILES 0.1.0
File Interpreter ABI Platform
ligand2smiles-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 530.7 kB

Release files / ligand2smiles-0.1.0.tar.gz

Download URL ligand2smiles-0.1.0.tar.gz
Size 260.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7890dfbaa4a94d338c15d53e5ff6c31b1d21ee65eef9a58d013f7acdf6a6da11
BLAKE2b-256 checksum
How to use checksums
d23f3f7ec2b77bf55b81a57e8b1e8fa3195fbe1511e8ed599f7243cbcab9af20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / ligand2smiles-0.1.0-py3-none-any.whl

Download URL ligand2smiles-0.1.0-py3-none-any.whl
Size 269.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
12f47ad3fb6fe6fb969f334deae1e43cfc8392ecdf1757182f984b8fbf62892f
BLAKE2b-256 checksum
How to use checksums
4c477b8055426451400f2fbecaa728b9f7110f6332ccfd62601c8b7b36b82ed8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page