Computational Magnetic Materials Ontology: an OWL 2 domain ontology aligned to EMMO. It describes magnetic materials and the simulations performed on them at four length scales: electronic, atomistic, mesoscopic and continuum.
Simulation codes at different scales (DFT, atomistic spin dynamics, micromagnetics, phase field) each carry their own data formats and vocabularies, which makes their results hard to combine. ComMagMO gives them a shared description: models, solvers, settings, input and calculated properties, and the scale-bridging steps that turn the output of one scale into the input of another, for example converting exchange constants into an exchange stiffness.
Scales are assigned by the entities a model describes, following RoMM and OSMO. Micromagnetics treats the magnetisation as a continuous field, but it is classed as mesoscopic, as both sources do.
Current release: 1.3.1 (tag ontology-v1.3.1). Namespace: https://w3id.org/emmo/domain/commagmo#.
It imports one upstream ontology, EMMO 1.0.4.
| File | Ontology IRI | Content |
|---|---|---|
ontology/commagmo.ttl |
…/commagmo |
root: imports the two modules below |
ontology/material.ttl |
…/commagmo/material |
39 classes, 5 object properties |
ontology/simulation.ttl |
…/commagmo/simulation |
50 classes, 15 object properties |
ontology/maps/ |
— | concept maps (.dot source + .png) |
Open ontology/commagmo.ttl in Protégé, or load it with rdflib:
from rdflib import Graph
g = Graph().parse("ontology/commagmo.ttl")
g.parse("ontology/material.ttl")
g.parse("ontology/simulation.ttl")
print(len(g), "triples")ontology/
src/ YAML source (the only source of truth) + upstream-cache.json
*.ttl, maps/ generated from src/ — do not hand-edit
shapes/ hand-written SHACL shapes (data obligations the OWL axioms do not state)
tools/commagmo_build/ the generator (YAML → ttl and concept maps)
build.py entry point
tests/shacl/ valid / invalid example data that every shape is checked against
docs/
review-criteria.md criteria for judging a class or relation, used when reviewing the YAML
The ontology is authored in YAML and compiled to Turtle; edit ontology/src/*.yaml, never the
.ttl files.
conda env create -f environment.yml # once: python, pyyaml, rdflib, pyshacl, graphviz
conda run -n commagmo-bin python build.py # regenerate ontology/*.ttl and ontology/maps/*
conda run -n commagmo-bin python build.py --check # verify the committed files match the YAML and parse as Turtle,
# and that the SHACL shapes accept tests/shacl/valid.ttl and reject each invalid-*.ttlSHACL is validated without RDFS inference (inference='none'): the range of
hasSimulatedMaterial would otherwise type every object as emmo:Material and make the type
check vacuous. Superclasses are taken from the generated .ttl plus the named superclasses in
upstream-cache.json. Name invalid examples invalid-<ShapeName>-<case>.ttl; each must violate
exactly that shape.
Without conda: pip install -r requirements.txt and put graphviz's dot on PATH, or pass
--no-render to skip the png maps.
Earlier versions (v0.0.1 – v1.1.0) were developed in a separate research repository; this repository starts from v1.2.0.
The ontology (ontology/) is licensed under CC BY 4.0.
The build tooling (tools/, build.py) is licensed under the MIT License.
Mian Dai, Institute of Materials Science, TU Darmstadt.
