atomRDF
[!NOTE]
atomRDFwas previously calledpyscal-rdf.
atomRDF is a Python tool for ontology-based creation, manipulation, and querying of atomic-scale structures and simulation workflows.
The data model is implemented as Pydantic classes generated from the Conceptual Dictionary for Computational Materials Science ontologies maintained by OCDO:
- CMSO — Computational Material Sample Ontology
- CDCO — Crystallographic Defect Core Ontology
- PODO, PLDO, LDO — point-, planar-, and line-defect ontologies
- ASMO — Atomistic Simulation Methods Ontology
This makes every object created by atomRDF round-trippable between Python, JSON/YAML and RDF, with
ontology-conformant semantics out of the box.
Installation
pip install atomrdf
# or via conda-forge
conda install -c conda-forge atomrdf
Optional features ship as extras — install only what you need:
pip install "atomrdf[oxigraph]" # Oxigraph triple-store backend
pip install "atomrdf[sqlalchemy]" # SQLAlchemy-backed store
pip install "atomrdf[materials_project]" # Materials Project lookups (mp-api)
pip install "atomrdf[grainboundary]" # aimsgb + pymatgen for grain boundaries
pip install "atomrdf[dislocation]" # atomman for dislocation builders
Quickstart
from atomrdf import KnowledgeGraph
import atomrdf.build as build
# 1. open a knowledge graph (in-memory by default)
kg = KnowledgeGraph()
# 2. build a sample; it is automatically annotated and added to the graph
fe = build.bulk("Fe", cubic=True, graph=kg)
# 3. ask SPARQL questions
results = kg.query("""
PREFIX cmso: <http://purls.helmholtz-metadaten.de/cmso/>
SELECT ?sample ?n
WHERE { ?sample cmso:hasNumberOfAtoms ?n }
""")
print(results)
# 4. persist
kg.write("fe.ttl", format="turtle")
See examples/ for end-to-end notebooks (getting started, grain
boundaries, working with data, defects, SPARQL queries, …) and the full
documentation at https://atomrdf.pyscal.org.
Upgrading from 0.12.x
1.0 introduces a few breaking changes (most notably Activity.initial_sample
→ input_sample, and a couple of corrected ontology IRIs). See the
migration guide and CHANGELOG.
Citing atomRDF
If you use atomRDF in academic work, please cite:
Guzmán, A. A., Menon, S., Hickel, T., & Sandfeld, S. (2026). Ontology-based knowledge graph infrastructure for interoperable atomistic simulation data. arXiv:2604.06230. https://arxiv.org/abs/2604.06230
BibTeX:
@misc{guzman2026ontologybasedknowledgegraphinfrastructure,
title = {Ontology-based knowledge graph infrastructure for interoperable atomistic simulation data},
author = {Abril Azocar Guzman and Sarath Menon and Tilmann Hickel and Stefan Sandfeld},
year = {2026},
eprint = {2604.06230},
archivePrefix = {arXiv},
primaryClass = {cs.DB},
url = {https://arxiv.org/abs/2604.06230},
}
A software citation (Zenodo DOI) is also available via the badge above and CITATION.cff.
Acknowledgements
This work is supported by the NFDI-Matwerk consortia.
Funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under the National Research Data Infrastructure – NFDI 38/1 – project number 460247524
Metadata
Release files for atomrdf 0.12.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| atomrdf-0.12.3.tar.gz | 141.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| atomrdf-0.12.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 287.2 kB
Release files / atomrdf-0.12.3.tar.gz
| Download URL | atomrdf-0.12.3.tar.gz |
|---|---|
| Size | 141.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b70edac4be393d3c652719f809f011ca891f81a11f83998d57b6f46f21c5b02b
|
|
BLAKE2b-256 checksum How to use checksums |
23e71ab2ea2fcb209865273532dff7184da9edb8d6a91f9098125123a9e15bca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / atomrdf-0.12.3-py3-none-any.whl
| Download URL | atomrdf-0.12.3-py3-none-any.whl |
|---|---|
| Size | 145.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0edc54462db240920f74b2c1bd6054be0112dfb97b99826b632414f3386efd2b
|
|
BLAKE2b-256 checksum How to use checksums |
f493c79f7f296e735d41bfbe762cc7f4a3eae10247c0bc7bfce497dc87c710e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|