CoolFace
Datasetpublic

LMucko/crystallography-open-database

Crystallography Open Database (COD) — Full Snapshot A complete mirror of the Crystallography Open Database (COD) as a single Parquet file, combining all crystallographic metadata with the raw CIF file content in one queryable dataset. Snapshot Details Field Value Snapshot date 2026-07-06 Metadata fetched 2026-07-06 18:51 (UTC+2) — 533,486 entries CIF files downloaded 2026-07-06 18:34–21:58 — 533,862 files Total rows 533,486 (metadata) — 411… See the full description on the dataset page: https://huggingface.co/datasets/LMucko/crystallography-open-database.

sourceHugging Facecc0-1.0updated 3mo agoView on Hugging Face
0likes1.3kdownloads
Dataset Card

Crystallography Open Database (COD) — Full Snapshot

A complete mirror of the Crystallography Open Database (COD) as a single Parquet file, combining all crystallographic metadata with the raw CIF file content in one queryable dataset.

Snapshot Details

FieldValue
Snapshot date2026-07-06
Metadata fetched2026-07-06 18:51 (UTC+2) — 533,486 entries
CIF files downloaded2026-07-06 18:34–21:58 — 533,862 files
Total rows533,486 (metadata) — 411 on-hold entries excluded
File formatParquet (zstd compressed)
LicenseCC0 1.0 (Public Domain)

Dataset Structure

One Parquet file (cod_full.parquet) with 75 columns — the 74 COD metadata fields plus a cif_text column containing the full raw CIF file content as a string.

Metadata Columns

ColumnTypeDescription
fileint64COD ID (7-digit identifier, e.g. 1553769)
a, b, cdoubleUnit cell lengths (Å)
siga, sigb, sigcdoubleStandard uncertainties on cell lengths
alpha, beta, gammadoubleUnit cell angles (°)
sigalpha, sigbeta, siggammadoubleStandard uncertainties on cell angles
voldoubleUnit cell volume (ų)
sigvoldoubleStandard uncertainty on volume
celltempdoubleCell measurement temperature (K)
sigcelltempdoubleSU on cell temperature
diffrtempdoubleDiffraction measurement temperature (K)
sigdiffrtempdoubleSU on diffraction temperature
cellpressuredoubleCell measurement pressure (kPa)
sigcellpressuredoubleSU on cell pressure
diffrpressuredoubleDiffraction measurement pressure (kPa)
sigdiffrpressuredoubleSU on diffraction pressure
thermalhiststringThermal history
pressurehiststringPressure history
compoundsourcestringSource of compound
nelstringNumber of distinct elements
sgstringSpace group (Hermann-Mauguin)
sgHallstringSpace group (Hall notation)
sgNumberint64Space group number (1–230)
commonnamestringCommon name
chemnamestringChemical name
mineralstringMineral name
formulastringChemical formula (sum)
calcformulastringCalculated formula
cellformulastringUnit cell formula
Zint64Number of formula units per unit cell
ZprimedoubleZ′ (Z per asymmetric unit)
acce_codestringCCDC accession code
authorsstringPublication authors
titlestringPublication title
journalstringJournal name
yearint64Publication year
volumeint64Journal volume
issuestringJournal issue
firstpagestringFirst page
lastpagestringLast page
doistringDigital Object Identifier
methodstringStructure determination method
radiationstringRadiation type
wavelengthdoubleWavelength (Å)
radTypestringRadiation type (detailed)
radSymbolstringRadiation symbol
RalldoubleR-factor (all reflections)
RobsdoubleR-factor (observed reflections)
RrefdoubleR-factor (refined)
wRalldoubleWeighted R-factor (all)
wRobsdoubleWeighted R-factor (observed)
wRrefdoubleWeighted R-factor (refined)
RFsqddoubleR-factor on F²
RIdoubleR-factor (intensity)
gofalldoubleGoodness of fit (all)
gofobsdoubleGoodness of fit (observed)
gofgtdoubleGoodness of fit (I > 2σ(I))
gofrefdoubleGoodness of fit (refined)
duplicateofint64COD ID of which this is a duplicate
optimalint64Flag for optimal structure
statusstringStatus (e.g. warnings)
flagsstringStatus flags
textstringConcatenated bibliography text
svnrevisionint64SVN revision of the COD entry
datestringDeposition date (YYYY-MM-DD)
timestringDeposition time (HH:MM:SS)
onholdstringOn-hold release date (empty if released)

CIF Text Column

ColumnTypeDescription
cif_textstringFull raw CIF file content (text)

Each CIF contains:

  • Unit cell parameters and standard uncertainties
  • Space group information (Hermann-Mauguin, Hall, IT number)
  • Atomic site coordinates (fractional) with displacement parameters
  • SHELX .res file (refinement details, atom lists, restraints)
  • SHELX .hkl file (observed structure factors — Fobs)
  • Publication metadata and COD database codes

Loading

python
from datasets import load_dataset

ds = load_dataset("your-username/cod", split="train")
print(ds[0]["formula"])      # e.g. "C16 H11 F N2 O"
print(ds[0]["sg"])           # e.g. "P 1 21/c 1"
print(ds[0]["cif_text"][:200])  # first 200 chars of the CIF

Or directly with PyArrow / DuckDB for out-of-core querying:

python
import pyarrow.parquet as pq

table = pq.read_table("cod_full.parquet", columns=["file", "formula", "sg", "year"])
sql
SELECT file, formula, sg, year
FROM 'cod_full.parquet'
WHERE year >= 2020 AND sgNumber = 14
LIMIT 10;

Parsing CIF Text

For crystallographic analysis, parse cif_text with:

python
# gemmi (fastest, C++ bindings)
import gemmi
doc = gemmi.cif.read_string(row["cif_text"])
block = doc[0]

# pymatgen (full crystallography)
from pymatgen.core import Structure
import io
struct = Structure.from_str(row["cif_text"], fmt="cif")

Coverage

  • Earliest publication: 1915
  • Peak deposition years: 2012–2015 (~25–28K structures/year)
  • Recent deposits: ~10K/year
  • Compound types: organic, inorganic, metal-organic, minerals (excluding biopolymers)
  • Data sources: CCDC, AMCSD, IUCr journals, direct depositions

License

All data in the COD is dedicated to the public domain under CC0 1.0.

Users of the data should acknowledge the original authors of the structural data. The authors, title, journal, year, and doi columns are provided for this purpose.

Citation

If you use this dataset, please cite the COD:

Grazulis, S., Chateigner, D., Downs, R. T., Yokochi, A. F. T., Quirós, M., Lutterotti, L., Manakova, E., Butkus, J., Moeck, P. & Le Bail, A. (2009). Crystallography Open Database – an open-access collection of crystal structures. J. Appl. Cryst. 42, 726–729. doi:10.1107/S0021889809016690
Merkys, A., Vaitkus, A., Butkus, J., Okulič-Kazarinas, V., Kairys, V. & Gražulis, S. (2016). COD::CIF::Parser: an error-correcting CIF parser for the Perl language. J. Appl. Cryst. 49, 292–301. doi:10.1107/S1600576716000414

Source

  • Website: https://www.crystallography.net/
  • SQL database: sql.crystallography.net (user: cod_reader, database: cod)
  • Rsync: rsync://www.crystallography.net/cif/