2026-08-19
Book: X-RAY DIFFRACTION ANALYSIS OF MICRO QUANTITIES OF CHEMICAL SUBSTANCES by CIA Reading Room (1964)
Read it: Internet Archive
Buried in the table of contents of a Cold War CIA technical report — a document so sensitive its author begged the recipient to "destroy the old copy" — sits an entry that reads like a forgotten incantation:
J. Termatrex System for Filing and Retrieving Data
The report itself, Project No. 1158-5, dated March 18, 1964, describes a technique for identifying unknown chemical substances from vanishingly small samples using X-ray diffraction. Spies could scrape a smear of powder from a captured document, an enemy's coat, or an assassination victim, bombard it with X-rays, and match the resulting diffraction pattern against a library of known substances. But how do you search a library of thousands of diffraction fingerprints in 1964, when the nearest mainframe was the size of a walk-in closet and searching it meant queuing up punched cards?
The answer was Termatrex — and it was beautifully analog.
A Termatrex system used large translucent cards, each representing one attribute (say, "peak at 3.14 Angstroms"). Every substance in the database had a numbered position on every card. If a substance exhibited that feature, a hole was drilled through the card at its number. To search, an analyst pulled the cards for the features they'd measured — five or six diffraction peaks, perhaps — stacked them on a lightbox, and looked for holes that lined up. Wherever light shone through all cards simultaneously, they had a candidate match. A visual AND-query, executed at the speed of eyesight.
This wasn't a CIA invention. Termatrex (originally "Term-a-Trex") was a commercial optical-coincidence system sold by Jonker Business Machines in the 1950s and 60s. Libraries, patent offices, and intelligence agencies used it for what we would now call faceted search. A skilled operator could query a database of 10,000 records in seconds, without electricity, and the "index" was as easy to update as a hole punch.
What's striking is how modern the underlying idea is:
The CIA analysts of 1964 had figured out something librarians would spend the next sixty years re-implementing in software: the fastest way to search a small database of high-dimensional fingerprints is to invert the index and intersect the results. They just did it with cardboard and sunlight.
Somewhere, in a warehouse of declassified equipment, there are probably still boxes of Termatrex cards indexing the chemical signatures of Soviet inks, poisons, and explosives — a lightbox-powered search engine, waiting patiently for its next query.
