# COD Synthetic Powder X-Ray Diffraction (XRD) Patterns: 436,196 Simulated Diffractograms from the Crystallography Open Database

## Facts

- Provider: ohlstrom (Hugging Face); structures from the Crystallography Open Database
- License: CC0-1.0 (https://huggingface.co/datasets/ohlstrom/Crystallography-Open-Database-XRD-Patterns)
- Size: 7 files
- Stored at: Hugging Face, https://huggingface.co/datasets/ohlstrom/Crystallography-Open-Database-XRD-Patterns
- Access: public, readable without an account
- Category: Chemistry & Materials
- Source: https://www.crystallography.net/cod/
- Page: https://scigantic.com/archive/e6dda98d-9170-5c52-9b09-9c07b62e4b83
- Keywords: Chemistry & Materials, Hugging Face

## About

Simulated powder X-ray diffraction (PXRD) patterns for every CIF crystal structure in the Crystallography Open Database (COD): 436,196 diffractograms spanning metals, minerals, organic molecular crystals and metal-organic frameworks. Each pattern was computed with the pymatgen XRDCalculator for Cu K-alpha radiation (1.54184 angstrom) over 2-theta 0 to 90 degrees at a 0.02 degree step, giving a 4,500-point intensity vector min-max scaled to [0, 1]. Files are PyTorch .pt dictionaries holding a patterns tensor of shape (N, 4500) and the matching COD CIF filenames, so each pattern links back to its structure at crystallography.net by COD ID. The full set ships with random subsets of 1,000, 10,000, 50,000 and 100,000 patterns for prototyping. No measured diffractograms are included. Use it to train phase identification, crystal system and space group classifiers, or diffraction-to-structure models; load with torch.load. License CC0 1.0, the same as COD. Cite Grazulis et al., Crystallography Open Database, J. Appl. Cryst. 42, 726 (2009), and pymatgen (Ong et al. 2013).

## Load the data

```python
from huggingface_hub import hf_hub_download
path = hf_hub_download(repo_id="ohlstrom/Crystallography-Open-Database-XRD-Patterns", filename="COD_xrd_patterns_1000.pt", repo_type="dataset")
print(path)
```

## Data structure

Example file: `COD_xrd_patterns_1000.pt`

## Open it

- In a hosted notebook with the data mounted: https://scigantic.com/archive/e6dda98d-9170-5c52-9b09-9c07b62e4b83
- Full record as JSON (schema card included): https://api.scigantic.com/api/archives/e6dda98d-9170-5c52-9b09-9c07b62e4b83
- Over MCP: `get_schema_card` with id `e6dda98d-9170-5c52-9b09-9c07b62e4b83` at https://api.scigantic.com/mcp

## Related topics

- [Chemistry & Materials datasets](https://scigantic.com/topics/chemistry-and-materials)
