How Are Chemical Structures Represented and Searched in Databases Like ChemSpider?
Updated
Chemical structures are represented in databases in two complementary ways: as 2D/3D structure diagrams for visual interpretation, and as machine-readable line notations — SMILES, InChI, and InChIKey — for exact search, comparison, and cross-database linking. On ChemSpider, a free chemical structure database providing fast text and structure search access to over 130 million structures from hundreds of data sources, you can search by name, synonym, SMILES, InChI, or InChIKey, or draw a structure to run exact, substructure, or similarity searches. The sections below explain what each identifier is for, how to run each search type, and what to check when a search returns nothing or the wrong compound.
The main ways a chemical structure is encoded
| Representation | What it is | Best used for | Main limitation |
|---|---|---|---|
| Structure diagram | 2D or 3D drawing of atoms and bonds | Human reading, publication figures, drawing-based search | Not directly machine-comparable |
| SMILES | Text string describing atoms and bonds | Fast input, substructure/similarity queries, cheminformatics tools | Multiple valid SMILES can describe the same molecule |
| InChI | Standardized layered text identifier | Exact identity checks, cross-database exchange | Long strings; not designed for substructure search |
| InChIKey | 27-character hashed form of InChI | Quick lookup, deduplication, linking records across sources | Hash only — cannot be reversed into a structure |
The practical split: use SMILES when you need to feed a structure into a search box or a script, use InChI when you need an unambiguous identity standard, and use InChIKey when you want a short, stable key to match the same compound across databases.
Why the same compound can have several SMILES
SMILES encodes a traversal of the molecular graph, so different starting atoms or ring-closure orders produce different but equally valid strings. This is why a database record may list one canonical SMILES while a paper or vendor page shows another. InChI was created to remove this ambiguity by normalizing the structure into layers (formula, connectivity, hydrogen, charge, stereochemistry, isotopes).
Searching by text: names, synonyms, and identifiers
- Start with the name or synonym. Enter the common name, IUPAC name, trade name, or a known synonym in the text search field. Databases index synonyms because the same compound appears under many names across sources.
- Switch to an identifier if the name is ambiguous. If a name returns several records, paste the SMILES, InChI, or InChIKey instead — these point to one structure rather than one label.
- Use the InChIKey for cross-source matching. Because it is a fixed-length hash, it is the fastest way to confirm that a record in one database is the same compound as a record in another.
- Check the record's identifiers against your source. A returned record typically lists names, synonyms, SMILES, InChI, InChIKey, properties, vendors, and references — compare these fields, not just the title, before accepting the match.
Expected result: a record page for the compound with its identifiers, computed properties, and links to external sources. If you get multiple hits, the name was not specific enough — move to an identifier search.
Searching by structure
Structure search is the part text search cannot replace, because it works on the molecular graph rather than a label.
- Exact structure search — draw or paste the full structure and require a complete match. Use this to confirm identity.
- Substructure search — specify a fragment or scaffold and retrieve every record containing it. Use this to find analogs, a functional group, or a core ring system.
- Similarity search — provide a query structure and retrieve compounds ranked by structural similarity. Use this when you do not know the exact target and want candidates.
For each, the input is a drawn or pasted structure, the action is selecting the search mode, and the expected result is a result set you can sort and filter. Substructure and similarity searches typically return many more records than an exact search, so treat the result list as candidates to review rather than confirmed identities.
Verifying a hit: what to check on the record
Once a record is returned, confirm it on more than one field:
- Identifiers — do the SMILES, InChI, and InChIKey match the structure you intended?
- Properties — are the listed properties consistent with what you expect for that structure?
- Vendors — supplier links indicate the compound is commercially catalogued; they do not by themselves confirm the structure.
- References — literature links let you trace the structure back to a primary source, which is the strongest check when identity matters.
Common reasons a search fails or returns the wrong compound
- Name ambiguity — a trivial or trade name maps to several structures. Fix: search by InChIKey or SMILES.
- Tautomers and charge states — the same substance drawn with different protonation or tautomeric forms may not match an exact search. Fix: try a substructure search or adjust the drawn form.
- Stereochemistry mismatch — a structure drawn without stereocenters will not exactly match one drawn with defined stereochemistry. Fix: include or deliberately omit stereochemistry depending on what you need.
- Salt vs. free base — a salt and its parent compound are different records. Fix: search the parent structure or the specific salt form.
- Mixtures and polymers — structures that are not single well-defined molecules are poorly represented by these identifiers. Fix: search by name or class instead.
- Over-specific substructure query — too large a fragment returns nothing. Fix: reduce the query to the core feature you care about.
The working rule: use names and synonyms to get started, identifiers to pin down identity, and structure search when the label is unknown or unreliable.