Ontology-based creation, manipulation and querying of atomic-scale structures and simulation workflows, with Pydantic data models generated from the OCDO Conceptual Dictionary (CMSO, CDCO, PODO, PLDO, LDO, ASMO).
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file atomrdf-0.12.3.tar.gz.
File metadata
- Download URL: atomrdf-0.12.3.tar.gz
- Upload date:
- Size: 141.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b70edac4be393d3c652719f809f011ca891f81a11f83998d57b6f46f21c5b02b
|
|
| MD5 |
a2d181956d4a601fb73b0c89c9396754
|
|
| BLAKE2b-256 |
23e71ab2ea2fcb209865273532dff7184da9edb8d6a91f9098125123a9e15bca
|
File details
Details for the file atomrdf-0.12.3-py3-none-any.whl.
File metadata
- Download URL: atomrdf-0.12.3-py3-none-any.whl
- Upload date:
- Size: 145.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0edc54462db240920f74b2c1bd6054be0112dfb97b99826b632414f3386efd2b
|
|
| MD5 |
2ccb44788fab7db1d3d9671fb6893840
|
|
| BLAKE2b-256 |
f493c79f7f296e735d41bfbe762cc7f4a3eae10247c0bc7bfce497dc87c710e1
|