File size: 7,339 Bytes
7d0b1c9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
---
license: cc0-1.0
task_categories:
  - text-classification
  - feature-extraction
tags:
  - crystallography
  - chemistry
  - materials-science
  - CIF
  - crystal-structure
size_categories:
  - 100K<n<1M
---

# Crystallography Open Database (COD) — Full Snapshot

A complete mirror of the [Crystallography Open Database](https://www.crystallography.net/) (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 on-hold entries excluded |
| **File format** | Parquet (zstd compressed) |
| **License** | CC0 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

| Column | Type | Description |
|--------|------|-------------|
| `file` | int64 | COD ID (7-digit identifier, e.g. `1553769`) |
| `a`, `b`, `c` | double | Unit cell lengths (Å) |
| `siga`, `sigb`, `sigc` | double | Standard uncertainties on cell lengths |
| `alpha`, `beta`, `gamma` | double | Unit cell angles (°) |
| `sigalpha`, `sigbeta`, `siggamma` | double | Standard uncertainties on cell angles |
| `vol` | double | Unit cell volume (ų) |
| `sigvol` | double | Standard uncertainty on volume |
| `celltemp` | double | Cell measurement temperature (K) |
| `sigcelltemp` | double | SU on cell temperature |
| `diffrtemp` | double | Diffraction measurement temperature (K) |
| `sigdiffrtemp` | double | SU on diffraction temperature |
| `cellpressure` | double | Cell measurement pressure (kPa) |
| `sigcellpressure` | double | SU on cell pressure |
| `diffrpressure` | double | Diffraction measurement pressure (kPa) |
| `sigdiffrpressure` | double | SU on diffraction pressure |
| `thermalhist` | string | Thermal history |
| `pressurehist` | string | Pressure history |
| `compoundsource` | string | Source of compound |
| `nel` | string | Number of distinct elements |
| `sg` | string | Space group (Hermann-Mauguin) |
| `sgHall` | string | Space group (Hall notation) |
| `sgNumber` | int64 | Space group number (1–230) |
| `commonname` | string | Common name |
| `chemname` | string | Chemical name |
| `mineral` | string | Mineral name |
| `formula` | string | Chemical formula (sum) |
| `calcformula` | string | Calculated formula |
| `cellformula` | string | Unit cell formula |
| `Z` | int64 | Number of formula units per unit cell |
| `Zprime` | double | Z′ (Z per asymmetric unit) |
| `acce_code` | string | CCDC accession code |
| `authors` | string | Publication authors |
| `title` | string | Publication title |
| `journal` | string | Journal name |
| `year` | int64 | Publication year |
| `volume` | int64 | Journal volume |
| `issue` | string | Journal issue |
| `firstpage` | string | First page |
| `lastpage` | string | Last page |
| `doi` | string | Digital Object Identifier |
| `method` | string | Structure determination method |
| `radiation` | string | Radiation type |
| `wavelength` | double | Wavelength (Å) |
| `radType` | string | Radiation type (detailed) |
| `radSymbol` | string | Radiation symbol |
| `Rall` | double | R-factor (all reflections) |
| `Robs` | double | R-factor (observed reflections) |
| `Rref` | double | R-factor (refined) |
| `wRall` | double | Weighted R-factor (all) |
| `wRobs` | double | Weighted R-factor (observed) |
| `wRref` | double | Weighted R-factor (refined) |
| `RFsqd` | double | R-factor on F² |
| `RI` | double | R-factor (intensity) |
| `gofall` | double | Goodness of fit (all) |
| `gofobs` | double | Goodness of fit (observed) |
| `gofgt` | double | Goodness of fit (I > 2σ(I)) |
| `gofref` | double | Goodness of fit (refined) |
| `duplicateof` | int64 | COD ID of which this is a duplicate |
| `optimal` | int64 | Flag for optimal structure |
| `status` | string | Status (e.g. `warnings`) |
| `flags` | string | Status flags |
| `text` | string | Concatenated bibliography text |
| `svnrevision` | int64 | SVN revision of the COD entry |
| `date` | string | Deposition date (`YYYY-MM-DD`) |
| `time` | string | Deposition time (`HH:MM:SS`) |
| `onhold` | string | On-hold release date (empty if released) |

### CIF Text Column

| Column | Type | Description |
|--------|------|-------------|
| `cif_text` | string | Full 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](https://creativecommons.org/publicdomain/zero/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/`