
Chemical substructure search
Find compounds matching a SMARTS query with optional stereochemistry matching.
How to find molecules with a chemical substructure?
Enter a library of SMILES and a SMARTS query describing the atom and bond pattern to find. Chemical substructure search returns matching compounds, match counts and atom indices. Download the matches as SMILES or SDF, or inspect which compounds contain a ring or functional group.
- Paste the compounds to search, one SMILES per line.
- Enter the pattern in
SMARTS query. The default finds a benzene ring. - Run the search.
- Review match counts and download the matching structures.
Worked example
Input SMILES:
Cc1ccccc1 toluene
CCO ethanolThe default SMARTS c1ccccc1 finds the benzene ring in toluene, while ethanol does not match:
Name SMILES Match count Atom matches
toluene Cc1ccccc1 1 [[1, 2, 3, 4, 5, 6]]Input
| Input | Accepted format | Requirements |
|---|---|---|
| Molecules | Pasted SMILES or .smiles, .smi, .txt upload | One SMILES followed by an optional name per line. Maximum file size: 50 MiB. |
Put the SMILES first, for example CCO ethanol, rather than a header row or name-first column. Blank lines are ignored. Unnamed molecules receive generated identifiers. Invalid SMILES fail the job instead of being silently dropped.
Settings
| Setting | Default | What it does |
|---|---|---|
SMARTS query | c1ccccc1 | Chemical pattern to find, written in SMARTS. For example, c1ccccc1 matches a benzene ring. SMARTS supports atom and bond conditions beyond SMILES. |
Match stereochemistry | Off | Require the stereochemistry specified in the SMARTS query to match the molecule. Off ignores stereochemical constraints. |
Unique matches | On | Remove equivalent atom mappings for the same substructure. Turning this off can increase the match count for symmetric molecules. |
Maximum matches per molecule | 1000 | Maximum atom mappings returned for each molecule. A molecule still appears once in the result table when it has any match. |
Results
| Output | Contents |
|---|---|
| Results table | Name, SMILES, Match count, Atom matches. |
results.smi | Returned molecules or states as SMILES and identifiers. |
results.sdf | Returned chemical structures with row properties; 3D coordinates are not guaranteed. |
results.tsv | Tab-separated table with the same rows and values. |
report.json | Result rows, resolved settings and warnings. |
run.log | Tool, settings, result count and warnings; failures include their error. |
Downloads are available from Files. The exported records retain returned row order.
SMARTS patterns versus SMILES molecules
SMILES describes a molecule. SMARTS describes a query pattern with atom alternatives, aromaticity, charge, bond types and logical conditions. This tool reads the library as SMILES and the query as SMARTS.
| SMARTS | Pattern |
|---|---|
c1ccccc1 | Six-membered aromatic carbon ring. |
C(=O)O | Carbonyl carbon attached to an oxygen. |
[N;H1,H2] | Nitrogen with one or two attached hydrogens. |
Encode the distinctions needed for the search. A broad carbonyl-and-oxygen pattern can match acids or esters; add atom and bond conditions when those differences matter.
Atom mappings use zero-based RDKit indices in the parsed molecule, not PDB serial numbers. Each mapping lists target atoms in query-atom order. Symmetry can produce equivalent mappings; Unique matches determines whether they are retained. Each matched compound appears once in the table.
Substructure search or chemical similarity search?
Use molecular similarity search for approximate resemblance even when an exact motif is absent. Use Butina clustering to group the whole library rather than filter it.
FAQ
Does this search a public chemical database?
It searches only the compounds you submit. It does not query an external database.
What happens if no compounds match?
The job completes with an empty table and empty molecule exports. No match is a valid search result.
Does substructure search require matching stereochemistry?
Only when Match stereochemistry is on and the SMARTS specifies it. Otherwise stereochemical constraints are ignored.
Related tools
Butina clustering
Group molecules by fingerprint distance using RDKit Butina clustering.
Molecular similarity search
Rank compounds by molecular fingerprint Tanimoto similarity to a query molecule.
Lipinski's rule of 5
Screen compounds for oral bioavailability using molecular weight, LogP, hydrogen bond donor, and acceptor limits.
ADMET-AI
Predict absorption, distribution, metabolism, excretion, and toxicity properties for compound libraries.
Admetica
Profile small-molecule ADMET properties across 22 Chemprop-based prediction models.
AF2BIND
Predict protein ligand-binding residues from AlphaFold2 pair representations
Brenk filter
Identify toxic and reactive fragments using Brenk structural alert filter.
eToxPred
Estimate toxicity risk and synthetic accessibility scores from SMILES for compound prioritization.
Lead-likeness filter
Screen for lead-like compounds using stricter molecular descriptor criteria for early optimization.
PAINS filter
Screen compounds for Pan-Assay Interference patterns using PAINS_A, PAINS_B, and PAINS_C filters.