Checking the database everyone builds on
Crystallographic databases hold hundreds of thousands of structures, and they now feed machine learning as well as people. Nobody can check them all by hand, so I wrote an open-source tool to check them automatically. Most failures pointed to the yardstick or to the limits of the method, not to the structures; a small number pointed to real problems in the records themselves.
From my own published papers, all open access, so you can read the working. Client work stays confidential.
My part: writing Eir and doing the analysis for the first two papers, which are sole-authored. The third is joint work with a colleague, using Eir and MaplePy, a tool we wrote together.
The question
A crystal structure records where the atoms sit. Databases of them are used to identify materials, as starting points for new analyses and, more and more, to train machine learning models that predict new materials. Errors in the records spread into everything built on them.
One quick physical check is the bond valence sum. Each bond between a metal and its neighbours counts for more the shorter it is; add them up, and the total should match the metal's charge. Calcium should come out at 2. It's simple enough to run on every structure in a database, but nobody had done it systematically to see what the failures mean.
What I did
- Wrote Eir, an open-source Python tool that runs the check on thousands of structures and sorts the results, rather than giving a bare pass or fail.
- Ran it on several hundred structures with the rock salt arrangement, one of the simplest there is, then followed up every failure.
- Used the same kind of screening on 1,244 spinel structures and, with a colleague, on the oldest entries in the database, from 1913 to 1929.
What I found
About half of the rock salt structures measured in ordinary conditions passed, and almost every failure could be traced to a cause.
When every measurement fails the same way, suspect the yardstick. Fifteen calcium oxide structures, measured from 1922 to 2023, all came out about 11% low. A 2023 measurement was no better than a 1922 one. The structures are very probably fine; the reference values the check relies on look wrong, for calcium, strontium and barium oxides and some others.
The sulphides point the same way. Calcium sulphide, with the same metal in the same arrangement, passes 16 times out of 17 (the figure at the top of the page), and barium and europium behave the same way. If the problem were the metal, the sulphides would fail too.
A few records weren't suitable as references. One nickel oxide structure was refined, quite properly, as a trace impurity (under 1%) in a battery study; in the database it sits among pure samples, with nothing machine-readable to tell them apart. A palladium oxide entry came from a thin film studied by electron diffraction, but is listed as powder data.
The oldest structures were mostly right. The Braggs' 1913 structure of rock salt still stands. A few weren't: some record the wrong structure type, and in one case the atomic positions are wrong. The right structures are in the database as separate entries, but the only warning on the wrong ones is an old free-text comment that software can't read.
- Compound
- SnTe, tin telluride
- Determined
- 1927
- Structure type
- zinc blende
- Quality
- standard
See ICSD52489 in Fm3-m (NaCl-type).Free-text comment: software doesn't read it.The same information, now in a form software can act on.
Spinels gave rules, not just flags. Across 1,244 spinel structures from 1915 to 2025, the same kind of screening gave quantitative rules for which arrangement a new composition is likely to take, and benchmark values for 20 compositions.
Why it matters
A database entry that passed peer review isn't automatically fit to be a reference for a calculation or a training set. Checking at scale, then reading the failures as evidence rather than verdicts, separates three different problems:
- Do measurements years apart all fail by about the same amount?Suspect the yardstick. Revise the reference values, not the structures.Calcium, strontium and barium oxides
- Is the structure an average, such as two metals sharing a site, or squeezed under pressure?The method has reached its limits. Use a check that suits the structure.Lithium and a 3+ metal on one site; high-pressure data
- How, and why, was it measured?Look at the record. Flag it for the uses it doesn't suit.A trace impurity; a thin film listed as powder
The proposed fix doesn't need anything deleted. The third paper proposes six automated fitness-for-purpose flags that would let software see these cases while leaving every historical record as it is.
What it couldn't tell us
- A bond valence check tests whether a structure is chemically plausible, not whether it's correct. Passing isn't proof, and some failures reflect the method's limits rather than the structure's, for example where diffraction averages over disorder.
- No calcium, strontium or barium sulphide structure has been measured since 2006. Modern synchrotron data on them is the experiment that would settle the yardstick question.
- Some combinations of element and charge have no reference values at all, so those structures can't be checked this way yet.
For crystallographers
The numbers
- Rock salt study (Eir 1.2): bond valence parameters from Gagné & Hawthorne (2015) with Brown (2020) updates. A structure was accepted where every cation site was within 10% of its formal valence and |d1| < 0.10 v.u.; 10–15% with |d1| < 0.15 v.u. was borderline, for manual review. The spinel and early-entry studies used later versions of Eir with tiered screening and the global instability index.
- Rock salt failures traced to parameter inadequacy (Type 1), limits of diffraction-averaged geometry (Types 3–5) and database quality (Type 6); structures with no available parameters (Type 2) were excluded before assessment.
- Mean bond valence sum deviations, ambient conditions: MgO −2.6 ± 3.2%, ZnO −7.9 ± 0.6%, CdO −10.9 ± 1.3%, CaO −11.0 ± 1.0% (15 structures, 1922–2023), BaO −21.4 ± 0.9%. CaS 16 of 17 accepted; CaO 0 of 15.
- Spinels: 1,244 ambient structures, 338 compositions, 1915–2025. Fd3m 86%, I41/amd 8%, P4332 5%; the mean anion parameter shifts by only 0.002 across the full range of cation inversion; median Voct/Vtet 2.9.
- Early entries (1913–1929) assessed with Eir and MaplePy. In the version analysed, BeO was entered in the NaCl type and SnTe in the zinc blende type; the correct structures exist as separate entries, and the only link between them is in long-standing free-text comments.
- Eir was written with an AI-assisted coding workflow and validated against manually calculated reference structures, as the first paper describes.
Read the papers
Reeves-McLaren, N. (2026). Automated bond valence sum analysis for crystallographic database quality assessment: a systematic study of rock salt oxides, halides, and chalcogenides. Dalton Trans. 55, 2868.
Reeves-McLaren, N. (2026). The structure of spinels: a quantitative assessment of the AB2X4 family. J. Am. Ceram. Soc. 109, e71073.
Gross, P. & Reeves-McLaren, N. (2026). A century of structures: historical fidelity and computational fitness in the Inorganic Crystal Structure Database (ICSD). Acta Cryst. B 82.
Building on database structures?
If you're using database structures as references or training data, I can screen them and tell you which look sound, which to treat with care, and why. Tell me what you're building in a few lines.