Skip to main content

atomRDF

[!NOTE] atomRDF was previously called pyscal-rdf.

codecov Conda Version PyPI - Python Version DOI

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)

Source distribution for atomrdf 0.12.3
File Size Uploaded
atomrdf-0.12.3.tar.gz 141.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for atomrdf 0.12.3
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.12.3 This release

2 release files

0.11.0

2 release files

0.9.17

2 release files

0.9.14

2 release files

0.9.7

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.6.4

2 release files

0.6.0

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page