
Structures locked in PDFs, scanned reports, supplier catalogues and old spreadsheets become usable in two stages: extraction, which turns a drawing or a name into a machine-readable structure, and standardisation, which makes thousands of such structures comparable with each other. Most projects fail in the second stage, not the first. Extraction with a 90 % hit rate is useful; a collection where the same compound appears as four different records is not, no matter how it was extracted.
The four extraction routes
| Source | Route | Typical reliability |
|---|---|---|
| Structure drawn in a PDF as vector graphics | Extract the drawing primitives, then interpret | High, because bonds and atom labels are real objects |
| Structure as a bitmap (scan, screenshot, image in a paper) | Optical chemical structure recognition | Good for clean single structures, weaker for crowded schemes |
| Chemical name in text | Name to structure conversion | High for systematic IUPAC names, unreliable for trivial and in-house names |
| Identifier in a table (CAS number, catalogue number, internal ID) | Lookup against a database or registry | Exact where the identifier is correct, silent where it is not |
In practice a real document needs all four. A method section gives names, a figure gives drawings, a table gives CAS numbers, and the appendix is a scan.
Choose the route per source, not per project, and keep a record of which route produced each structure. When you later find a wrong structure, the route tells you whether it is a one-off or a systematic problem.
Where extraction goes wrong
- Stereochemistry. Wedge and hash bonds in a bitmap are the first thing to be lost. A structure extracted without stereo descriptors is a different compound from the one in the paper.
- R groups and Markush structures. A generic structure with substituent variables is not a single compound. Extraction tools often return the core with the variable silently dropped.
- Charges, salts and solvates. A hydrochloride in the drawing becomes a free base in the record, or the counterion becomes a separate record.
- Crowded schemes. Reaction arrows, reagents above the arrow and overlapping structures confuse bitmap recognition more than any single molecule does.
- Trivial and internal names. "Compound 7b" resolves to nothing; a trade name may resolve to the wrong salt form.
The practical consequence: extraction needs a confidence flag per structure and a review queue for the low-confidence cases. A pipeline that silently drops or guesses is worse than one that extracts less and says so.
Standardisation: the stage that decides usability
Once structures exist, they have to be brought to one representation. A workable order:
1. Validate. Can the structure be parsed, do valences make sense, are there disconnected fragments that should not be there? 2. Strip salts and solvates into a separate field, keeping the parent structure as the main record. Decide the rule once: largest fragment, or a curated salt list. 3. Neutralise or standardise charges according to one convention, and keep the original form in a second field. 4. Normalise functional groups: nitro, azide, sulfoxide and other groups have several valid drawings. One convention per group. 5. Standardise tautomers for the purpose of duplicate detection, while keeping the original as drawn. A tautomer-standardised key is for matching, not for reporting. 6. Handle stereochemistry explicitly. Mark structures with undefined stereo centres as such. Never let an undefined centre be interpreted as a specific configuration. 7. Generate keys. A canonical structure string plus an InChIKey, and for duplicate detection a tautomer-insensitive key.
Then deduplicate on the keys, not on names. Names are the least reliable identifier in any chemical dataset.
How to check the result
Three checks catch most problems and cost little:
- Round trip. Convert the extracted structure back to a drawing and compare with the source image, for a random sample of 50 to 100 structures. This catches systematic stereo and charge loss immediately.
- Identifier cross-check. Where a CAS number or catalogue number exists alongside the drawing, resolve both and compare. Disagreements point at the source document as often as at the extraction.
- Property plausibility. Molecular weight, atom count and element composition against whatever the source states. A difference of 36.5 is a hydrochloride; a difference of 18 is a hydrate or a drawing error.
Record the sample size and the error rate you found. "95 % of 100 sampled structures matched the source drawing, errors were stereo descriptors in crowded schemes" is a usable statement about data quality. "The extraction works" is not.
What a clean collection enables
Once structures are standardised and keyed, the things that were impossible become routine: deduplicating a supplier catalogue against your own inventory, finding whether a new target has been made before in the company, substructure searching across twenty years of reports, and feeding any computational method with input it can actually use. None of that is possible on a collection of names and images, and all of it is possible on the same data after curation.
Limits of the statement
- Extraction accuracy depends on source quality. A 300 dpi scan of a clean single structure and a photograph of a projected slide are not the same problem.
- Standardisation is a set of conventions, not a truth. Document the conventions; a different project may legitimately choose others, and merging two collections means reconciling them.
- Tautomer and stereo handling is where chemically equivalent decisions can diverge. Keep the original representation always, so a later change of convention does not require re-extraction.
- A curated structure is not a validated structure. Where the identity matters, the record points at analytical evidence, not at the extraction.
Frequently asked questions
Can chemical structures be extracted from a PDF automatically?
Yes, with different reliability depending on how the structure is stored. Vector drawings can be interpreted from the drawing primitives with high reliability; bitmap images need optical chemical structure recognition, which works well for clean single structures and less well for crowded reaction schemes.
What is the most common error in extracted structures?
Lost or wrong stereochemistry, followed by salt and charge handling. Both are invisible in a structure count and change the identity of the compound, which is why a round-trip comparison against the source drawing belongs in every project.
Why deduplicate on InChIKey and not on name?
Because names are unreliable: trivial names, trade names, internal codes and typos all describe the same compound differently. A canonical key computed from the structure gives one identifier per compound, and a tautomer-insensitive variant catches the remaining near-duplicates.
Should tautomers be standardised?
For duplicate detection and searching, yes, using one documented convention. For reporting, keep the structure as it was drawn, because the tautomer may carry information about the context it came from.
How do you measure the quality of a structure dataset?
By sampling: take 50 to 100 records, compare each against its source, and report the error rate with the type of errors found. Supplement with identifier cross-checks and molecular formula plausibility across the whole set.
