This repository contains parsing and data-structuring tools intended for researchers who hold a legal copy of Ihsan Barin's Thermochemical Data of Pure Substances (3rd Edition, 1995). This repository does not distribute any copyrighted text, images, or extracted datasets.
read_all_thermodata_pdf.py OCRs each page's thermodynamic table into structured per-phase data; query_mp_cifs_from_toc.py / query_cod_cifs_from_toc.py then pair that with a matching crystal structure. Here's what the extracted data looks like for one compound, olivine (Ca2SiO4), plotted straight from the pipeline's output across all four of its phases (SOL-C, SOL-A1, SOL-A, LIQ):
For reference, here's the column layout Barin's tables use -- cropped to just the header row and two data rows, with no title, formula, page number, or copyright mark, since the source book itself is copyrighted and this repo doesn't redistribute it:
Install the dependencies (numpy, pandas, pdfplumber, opencv, pytesseract + the tesseract binary, Pillow, tqdm, pymatgen, mp-api) into a single environment. The easiest way is to reproduce the exact, tested environment from thermodata.yml:
conda env create -f thermodata.yml
conda activate thermodata
Then export a free Materials Project API key (from https://next.materialsproject.org/api):
export MP_API_KEY=your_key_here
Nothing else needs to be edited in any of the scripts below -- paths are resolved relative to each script's own location.
-
OCR the Barin PDF into per-formula thermodynamic data (the only required CLI input is your local copy of the PDF); this step can take about an hour since it involves OCR:
python read_all_thermodata_pdf.py --input-pdf /path/to/local/barin_1995.pdf --output-dir ./barin_json_data/ -
Retrieve CIF crystal structures for every phase in
toc_barin.csv, first from Materials Project:python query_mp_cifs_from_toc.py -
Then fill in what Materials Project didn't have from the free Crystallography Open Database:
python query_cod_cifs_from_toc.pyWhatever's left in
cif_unmatched_final.csvneeds a manual lookup in ICSD (no public/scriptable API exists for it).
Corresponding crystal structures are first filtered by stoichiometry, using the "Formula" column in toc_barin.csv. A match of stoichiometry to a specific phase is then performed:
- Priority is given to known named phases with a hardcoded space group (e.g.
$\alpha$ -spodumene corresponds with LiAlSi2O6 and has the space group C2/c). - For some non-stoichiometric compounds (e.g. pyrrhotite, Fe0.877S), phase names are instead matched between the "Name" column in
toc_barin.csvand the "User remarks" listed on the MP entry. - Otherwise, the crystal structure with the lowest energy above hull among candidates that have an experimentally-verified ICSD match is used; if no candidate has one, the lowest energy above hull among all candidates (including purely computational ones) is used instead. A "theoretical" MP entry doesn't necessarily mean the structure has never been observed -- MP's ICSD linkage isn't fully comprehensive -- but it does mean this pipeline found no independent experimental confirmation for it.
Every generated .cif file starts with a # Source: ... comment line naming the exact MP ID or COD ID it came from. Look that ID up on materialsproject.org (for MP entries, check the "Experimental Observations" / ICSD IDs on the material's page) or crystallography.net/cod (for COD entries) to verify a specific structure's provenance yourself before relying on it. However, beware that the incorrect polymorph may be selected in some instances relative to the actual phase whose thermodynamic data is reported in the Barin dataset since this may miss entropically-stabilized high-temperature phases.
The columns containing toc_barin.csv.
