Repository files navigation

conceptual_dictionary

A Python dictionary template for storing serializable computational-materials-science metadata. The schema and controlled vocabularies are kept in lock-step with atomRDF, so YAML/JSON files produced with conceptual_dictionary can be parsed directly by atomRDF's WorkflowParser.

  • Strongly-typed templates for samples, workflows, properties, operations, defects, datasets and math operations.
  • Controlled vocabularies mirrored from atomRDF (methods, ensembles, potentials, XC functionals, …) with optional runtime validation.
  • A dict subclass (ConceptualDict) with YAML/JSON I/O that automatically cleans numpy types and is round-trip safe.

Installation

pip install conceptual-dictionary

From source:

pip install -e .

Quick start

importcopyfromconceptual_dictionaryimport (
ConceptualDict, sample_template, workflow_template,
property_template, dataset_template,
)
cd=ConceptualDict()
# Samplesample=copy.deepcopy(sample_template)
sample["id"] ="Al_fcc"sample["material"]["element_ratio"] = {"Al": 1.0}
sample["material"]["crystal_structure"]["spacegroup_symbol"] ="Fm-3m"sample["material"]["crystal_structure"]["spacegroup_number"] =225sample["material"]["crystal_structure"]["unit_cell"]["lattice_parameter"] = [4.05, 4.05, 4.05]
sample["material"]["crystal_structure"]["unit_cell"]["angle"] = [90.0, 90.0, 90.0]
cd["computational_sample"].append(sample)
# Workflowwf=copy.deepcopy(workflow_template)
wf["method"] ="MolecularStatics"wf["interatomic_potential"] = {"potential_type": "eam/alloy",
"uri": "https://doi.org/10.1103/physrevb.59.3393"}
wf["input_sample"] = ["Al_fcc"]
wf["output_sample"] = ["Al_fcc"]
energy=copy.deepcopy(property_template)
energy.update({"label": "EquilibriumEnergy", "value": -3.36, "unit": "EV",
"associate_to_sample": ["Al_fcc"]})
wf["calculated_property"] = [energy]
cd["workflow"].append(wf)
# Optional dataset provenanceds=copy.deepcopy(dataset_template)
ds["title"] ="Al FCC reference"ds["samples"] = ["Al_fcc"]
cd["dataset"] =dscd.validate(strict=True) # raises on first vocab violationcd.to_yaml("metadata.yaml")
cd.to_json("metadata.json", indent=2)

Templates

Every template is a plain dict. Use copy.deepcopy before mutating, then populate only the fields that apply (everything is optional unless marked Required).

ImportPurpose
sample_templateA computational sample (material + simulation cell + atoms)
property_templateA single calculated/input/output property
workflow_templateA simulation/calculation step
dataset_templateDCAT dataset provenance (creators, publication, sample IDs)
operation_templateAtomic-scale transform (DeleteAtom, Rotate, Translate, Shear, …)
math_operation_templateArithmetic activity (Subtraction, Addition, Multiplication, Division, Exponentiation)
vacancy_template, substitutional_template, interstitial_templatePoint defects
stacking_fault_templateStacking fault
grain_boundary_templateGrain boundary (5 YAML key variants)
dislocation_templateDislocation (4 YAML key variants)
defect_complex_templateMulti-defect complex
full_sample_template, full_yaml_templateReference templates with every supported field

ConceptualDict

A dict subclass pre-populated with the four top-level sections atomRDF reads:

ConceptualDict() == {
"computational_sample": [],
"workflow": [],
"operation": [],
"math_operation": [],
}

Add an optional "dataset" key (or anything else) at any time.

Methods

MethodNotes
to_yaml(filepath, sort_keys=False)numpy → native conversion, preserves insertion order by default
from_yaml(filepath)(classmethod)Loads any partial YAML (missing top-level keys keep their default empty lists)
to_json(filepath, sort_keys=False, indent=2)Same numpy cleanup as YAML
from_json(filepath)(classmethod)Symmetric counterpart
validate(strict=False)Returns a list of violation dicts {section, index, field, value, allowed}. With strict=True raises ValueError on the first violation
generate_id(length=7)Collision-resistant random ID using os.urandom (safe against third-party random.seed())

Numpy-friendly serialization

Both to_yaml and to_json recursively convert np.ndarray, np.floating, np.integer, np.bool_ and any unknown object (via str(obj)) to JSON/YAML native types — so values coming from ASE / pyiron / LAMMPS need no pre-processing.

File layout produced

The full top-level YAML/JSON shape consumed by atomRDF:

dataset: # optional, dcat:Dataset provenanceidentifier: ...title: ...creators: [{id, name}, ...]publication: {id, identifier, title}samples: [<sample id>, ...]computational_sample: # list of sample dicts
- id: ...material: {...}simulation_cell: {...}atom_attribute: {...}calculated_property: [...]# optional defect blocks (see Defects below)workflow: # list of workflow steps
- method: ...algorithm: ......operation: # list of atomic-scale transforms (legacy alias: 'activity')
- method: ...input_sample: ...output_sample: ...math_operation: # list of arithmetic activities
- type: ...result: {...}

Controlled vocabularies (cross-referenced with atomRDF)

The following sections enumerate every string atomRDF accepts for each field. Aliases are marked → canonical. Anything outside these sets is rejected by ConceptualDict.validate() (and silently ignored or errored by atomRDF depending on the field).

The frozen sets are also importable and useful for building UIs:

fromconceptual_dictionaryimport (
METHOD, ALGORITHM, DEGREES_OF_FREEDOM, THERMODYNAMIC_ENSEMBLE,
POTENTIAL_TYPE, XC_FUNCTIONAL, OPERATION_METHOD,
MATH_OPERATION_TYPE, GRAIN_BOUNDARY_TYPE, YAML_TOP_LEVEL_KEYS,
CONTROLLED_VALUES,
)

Workflow

FieldAccepted valuesatomRDF source
workflow.methodMolecularDynamics, MolecularStatics, DensityFunctionalTheoryatomrdf/datamodels/workflow/method.py (method_map)
workflow.algorithmEquationOfStateFit, QuasiHarmonicApproximation, ThermodynamicIntegration, ANNNIModel, TensileTest, CompressionTest; alias UniaxialTensionTensileTestatomrdf/datamodels/workflow/algorithm.py (algorithm_map)
workflow.degrees_of_freedom(list)AtomicPositionRelaxation, CellVolumeRelaxation, CellShapeRelaxationatomrdf/datamodels/workflow/dof.py (dof_map)
workflow.thermodynamic_ensembleCanonicalEnsemble (NVT), MicrocanonicalEnsemble (NVE), IsothermalIsobaricEnsemble (NPT), IsoenthalpicIsobaricEnsemble (NPH), GrandCanonicalEnsemble (μVT)atomrdf/datamodels/workflow/ensemble.py (ensemble_map)
workflow.xc_functionalLDA, GGA, PBE (→ GGA), LocalDensityApproximation, GeneralizedGradientApproximation, PerdewBurkeErnzerhof (→ GGA), HybridFunctional, HybridGeneralizedGradientApproximation, HybridMetaGeneralizedGradientApproximation, MetaGeneralizedGradientApproximationatomrdf/datamodels/workflow/xcfunctional.py (xc_map)

Interatomic potential type

workflow.interatomic_potential.potential_type accepts the canonical class name or any short alias atomRDF understands:

FamilyCanonicalAliases
GenericInteratomicPotential
EAMEmbeddedAtomModelEAM, eam, eam/alloy, eam/fs
MEAMModifiedEmbeddedAtomModelMEAM, meam
Lennard–JonesLennardJonesPotentialLJ, lj
Machine learningMachineLearningPotentialACE, pace, HDNNP, hdnnp, GRACE, grace

Source: atomrdf/datamodels/workflow/potential.py (potential_map).

Operation methods

operation.method (legacy top-level key activity is also accepted):

DeleteAtom, SubstituteAtom, AddAtom, Rotate (alias Rotation), Translate (alias Translation), Shear.

Source: atomrdf/io/workflow_parser.py (OPERATION_MAP).

Math operations

math_operation.type: Subtraction, Addition, Multiplication, Division, Exponentiation. Operands are either a scalar or a property id string referencing a previously declared calculated_property / input_parameter / output_parameter:

typeOperand fields
Subtractionminuend, subtrahend
Additionaddend(list)
Multiplicationfactor(list)
Divisiondividend, divisor
Exponentiationbase, exponent

Source: atomrdf/datamodels/workflow/math_operations.py.

Property label / basename

label and basename on a property are not validated as a closed enum, but at RDF generation time atomRDF resolves basename against the ASMO ontology via getattr(ASMO, basename), so the value should match an ASMO class. The following terms appear in atomRDF's source / parsers / visualizer and are known to round-trip correctly:

CategoryRecognised terms
EnergiesTotalEnergy, Energy, EquilibriumEnergy, CohesiveEnergy, FormationEnergy, VacancyFormationEnergy, GrainBoundaryEnergy, SurfaceEnergy, StackingFaultEnergy, SegregationEnergy, WorkOfSeparation, MigrationEnergy
MechanicalBulkModulus, ElasticConstant, C11, C12, C44, Stress, Pressure
GeometricVolume, EquilibriumVolume, LatticeConstant
Thermo / stateTemperature
Generic wrappersCalculatedProperty, Property, AtomAttribute

Custom strings outside this list will still be written to the YAML/JSON verbatim — they just won't resolve to a known ASMO class when loaded into an RDF graph. Sources: atomrdf/datamodels/workflow/property.py, atomrdf/visualize.py, atomrdf/io/reconstruct.py, atomrdf/parsers/pyiron.py.

Property unit

The unit string is suffixed onto http://qudt.org/vocab/unit/{unit} and stored as a QUDT URI — there is no closed enum in atomRDF, so any valid QUDT unit code is accepted. Examples that appear in atomRDF or its examples:

QuantityCommon QUDT codes
EnergyEV, J, KiloCAL
LengthANGSTROM, M, NanoM
VolumeANGSTROM3, M3
TemperatureK, DEG_C
Pressure / stressPA, GigaPA, BAR
ForceN, EV-PER-ANGSTROM
AngleRAD, DEG

Source: atomrdf/datamodels/workflow/property.py line 93.

Defects (sample-level YAML keys)

Place at most one of these as a key inside a sample dict.

FamilyYAML keysTemplateFields
Point defectvacancy, substitutional, interstitialvacancy_template, substitutional_template, interstitial_templateconcentration (atomic fraction), number
Stacking faultstacking_faultstacking_fault_templateplane (Miller indices), displacement (3-vector)
Grain boundarygrain_boundary, tilt_grain_boundary, twist_grain_boundary, symmetric_tilt_grain_boundary, mixed_grain_boundarygrain_boundary_templatesigma, plane, misorientation_angle, rotation_axis
Dislocationdislocation, edge_dislocation, screw_dislocation, mixed_dislocationdislocation_templateline_direction, burgers_vector, slip_system.{slip_direction, slip_plane.normal}, plus character_angle for mixed_dislocation
Defect complexdefect_complexdefect_complex_templateids (list of defect key names), relative_distance

Source: atomrdf/datamodels/structure.py, atomrdf/datamodels/defects/{pointdefects,grainboundary,dislocation,stackingfault,complex}.py.

The frozen set GRAIN_BOUNDARY_TYPE enumerates the five GB key variants.

Material / crystal structure

FieldNotes
material.element_ratio{symbol: fraction}, e.g. {"Fe": 0.8, "Cr": 0.2}
material.crystal_structure.spacegroup_symbolHermann–Mauguin (e.g. "Fm-3m") — no validation
material.crystal_structure.spacegroup_number1–230 — no validation
material.crystal_structure.unit_cell.bravais_latticeURI string. Common values used in atomRDF: https://www.wikidata.org/wiki/Q851536 (bcc), Q3006714 (fcc), Q663314 (hcp), Q2242450 (sc), Q503601 (tetragonal), Q648961 (orthorhombic), Q624543 (monoclinic), Q13362463 (rhombohedral)
material.crystal_structure.unit_cell.lattice_parameter[a, b, c] in Å
material.crystal_structure.unit_cell.angle[α, β, γ] in degrees

Atom attribute

FieldNotes
positionList of [x, y, z] (Å) — for inline small systems
speciesList of element symbols, parallel to position
file_pathPath to a structure file (resolved relative to the YAML file). Preferred for large MD snapshots
file_formatASE format string (e.g. "lammps-data", "lammps-dump-text", "vasp", "aims"); auto-detected when None
file_speciesSpecies order for LAMMPS numeric atom types (e.g. ["Al"])

Source: atomrdf/io/workflow_parser.py_resolve_atom_attribute_from_file.

Software / workflow manager

software:
- uri: https://doi.org/10.1016/j.cpc.2021.108171label: LAMMPSversion: "29Sep2021"workflow_manager:
uri: ...label: ...version: ...

Source: atomrdf/datamodels/workflow/software.py.

Top-level keys

YAML_TOP_LEVEL_KEYS = {computational_sample, workflow, operation, activity (legacy), math_operation}. Plus dataset (DCAT provenance, parsed by atomRDF if present).

Cross-referencing properties in math_operation

A property may carry an id; later math operations reference it by string:

e_def=copy.deepcopy(property_template)
e_def.update({"id": "E_def", "label": "TotalEnergy", "value": -3.20, "unit": "EV"})
e_perf=copy.deepcopy(property_template)
e_perf.update({"id": "E_perf", "label": "TotalEnergy", "value": -3.36, "unit": "EV"})
cd["workflow"][0]["calculated_property"] = [e_def, e_perf]
cd["math_operation"].append({
"type": "Subtraction",
"minuend": "E_def",
"subtrahend": "E_perf",
"result": {"id": "E_form", "label": "FormationEnergy", "unit": "EV",
"associate_to_sample": ["Al_fcc_with_vacancy"]},
})

Validation

violations=cd.validate() # warns on each violation, returns the listcd.validate(strict=True) # raises ValueError on the first violation

validate() currently checks workflow.method, workflow.algorithm, workflow.degrees_of_freedom, workflow.thermodynamic_ensemble, workflow.xc_functional, workflow.interatomic_potential.potential_type, operation.method and math_operation.type. Each violation dict has keys section, index, field, value, allowed.

Examples

Working YAML/JSON examples live in examples/:

  • single_structure_with_workflow.yaml / .json
  • grain_boundary.yaml / .json
  • examples.ipynb — end-to-end notebook

Citation

If you use conceptual_dictionary in your research, please cite the associated paper:

A. Azocar Guzman, S. Menon, T. Hickel, S. Sandfeld. Ontology-based knowledge graph infrastructure for interoperable atomistic simulation data. arXiv:2604.06230 (2026). 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},
}

License

MIT License — see LICENSE.

About

A python dictionary template for storing serialisable metadata

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Repository files navigation

conceptual_dictionary

A Python dictionary template for storing serializable computational-materials-science metadata. The schema and controlled vocabularies are kept in lock-step with atomRDF, so YAML/JSON files produced with conceptual_dictionary can be parsed directly by atomRDF's WorkflowParser.

  • Strongly-typed templates for samples, workflows, properties, operations, defects, datasets and math operations.
  • Controlled vocabularies mirrored from atomRDF (methods, ensembles, potentials, XC functionals, …) with optional runtime validation.
  • A dict subclass (ConceptualDict) with YAML/JSON I/O that automatically cleans numpy types and is round-trip safe.

Installation

pip install conceptual-dictionary

From source:

pip install -e .

Quick start

importcopyfromconceptual_dictionaryimport (
ConceptualDict, sample_template, workflow_template,
property_template, dataset_template,
)
cd=ConceptualDict()
# Samplesample=copy.deepcopy(sample_template)
sample["id"] ="Al_fcc"sample["material"]["element_ratio"] = {"Al": 1.0}
sample["material"]["crystal_structure"]["spacegroup_symbol"] ="Fm-3m"sample["material"]["crystal_structure"]["spacegroup_number"] =225sample["material"]["crystal_structure"]["unit_cell"]["lattice_parameter"] = [4.05, 4.05, 4.05]
sample["material"]["crystal_structure"]["unit_cell"]["angle"] = [90.0, 90.0, 90.0]
cd["computational_sample"].append(sample)
# Workflowwf=copy.deepcopy(workflow_template)
wf["method"] ="MolecularStatics"wf["interatomic_potential"] = {"potential_type": "eam/alloy",
"uri": "https://doi.org/10.1103/physrevb.59.3393"}
wf["input_sample"] = ["Al_fcc"]
wf["output_sample"] = ["Al_fcc"]
energy=copy.deepcopy(property_template)
energy.update({"label": "EquilibriumEnergy", "value": -3.36, "unit": "EV",
"associate_to_sample": ["Al_fcc"]})
wf["calculated_property"] = [energy]
cd["workflow"].append(wf)
# Optional dataset provenanceds=copy.deepcopy(dataset_template)
ds["title"] ="Al FCC reference"ds["samples"] = ["Al_fcc"]
cd["dataset"] =dscd.validate(strict=True) # raises on first vocab violationcd.to_yaml("metadata.yaml")
cd.to_json("metadata.json", indent=2)

Templates

Every template is a plain dict. Use copy.deepcopy before mutating, then populate only the fields that apply (everything is optional unless marked Required).

ImportPurpose
sample_templateA computational sample (material + simulation cell + atoms)
property_templateA single calculated/input/output property
workflow_templateA simulation/calculation step
dataset_templateDCAT dataset provenance (creators, publication, sample IDs)
operation_templateAtomic-scale transform (DeleteAtom, Rotate, Translate, Shear, …)
math_operation_templateArithmetic activity (Subtraction, Addition, Multiplication, Division, Exponentiation)
vacancy_template, substitutional_template, interstitial_templatePoint defects
stacking_fault_templateStacking fault
grain_boundary_templateGrain boundary (5 YAML key variants)
dislocation_templateDislocation (4 YAML key variants)
defect_complex_templateMulti-defect complex
full_sample_template, full_yaml_templateReference templates with every supported field

ConceptualDict

A dict subclass pre-populated with the four top-level sections atomRDF reads:

ConceptualDict() == {
"computational_sample": [],
"workflow": [],
"operation": [],
"math_operation": [],
}

Add an optional "dataset" key (or anything else) at any time.

Methods

MethodNotes
to_yaml(filepath, sort_keys=False)numpy → native conversion, preserves insertion order by default
from_yaml(filepath)(classmethod)Loads any partial YAML (missing top-level keys keep their default empty lists)
to_json(filepath, sort_keys=False, indent=2)Same numpy cleanup as YAML
from_json(filepath)(classmethod)Symmetric counterpart
validate(strict=False)Returns a list of violation dicts {section, index, field, value, allowed}. With strict=True raises ValueError on the first violation
generate_id(length=7)Collision-resistant random ID using os.urandom (safe against third-party random.seed())

Numpy-friendly serialization

Both to_yaml and to_json recursively convert np.ndarray, np.floating, np.integer, np.bool_ and any unknown object (via str(obj)) to JSON/YAML native types — so values coming from ASE / pyiron / LAMMPS need no pre-processing.

File layout produced

The full top-level YAML/JSON shape consumed by atomRDF:

dataset: # optional, dcat:Dataset provenanceidentifier: ...title: ...creators: [{id, name}, ...]publication: {id, identifier, title}samples: [<sample id>, ...]computational_sample: # list of sample dicts
- id: ...material: {...}simulation_cell: {...}atom_attribute: {...}calculated_property: [...]# optional defect blocks (see Defects below)workflow: # list of workflow steps
- method: ...algorithm: ......operation: # list of atomic-scale transforms (legacy alias: 'activity')
- method: ...input_sample: ...output_sample: ...math_operation: # list of arithmetic activities
- type: ...result: {...}

Controlled vocabularies (cross-referenced with atomRDF)

The following sections enumerate every string atomRDF accepts for each field. Aliases are marked → canonical. Anything outside these sets is rejected by ConceptualDict.validate() (and silently ignored or errored by atomRDF depending on the field).

The frozen sets are also importable and useful for building UIs:

fromconceptual_dictionaryimport (
METHOD, ALGORITHM, DEGREES_OF_FREEDOM, THERMODYNAMIC_ENSEMBLE,
POTENTIAL_TYPE, XC_FUNCTIONAL, OPERATION_METHOD,
MATH_OPERATION_TYPE, GRAIN_BOUNDARY_TYPE, YAML_TOP_LEVEL_KEYS,
CONTROLLED_VALUES,
)

Workflow

FieldAccepted valuesatomRDF source
workflow.methodMolecularDynamics, MolecularStatics, DensityFunctionalTheoryatomrdf/datamodels/workflow/method.py (method_map)
workflow.algorithmEquationOfStateFit, QuasiHarmonicApproximation, ThermodynamicIntegration, ANNNIModel, TensileTest, CompressionTest; alias UniaxialTensionTensileTestatomrdf/datamodels/workflow/algorithm.py (algorithm_map)
workflow.degrees_of_freedom(list)AtomicPositionRelaxation, CellVolumeRelaxation, CellShapeRelaxationatomrdf/datamodels/workflow/dof.py (dof_map)
workflow.thermodynamic_ensembleCanonicalEnsemble (NVT), MicrocanonicalEnsemble (NVE), IsothermalIsobaricEnsemble (NPT), IsoenthalpicIsobaricEnsemble (NPH), GrandCanonicalEnsemble (μVT)atomrdf/datamodels/workflow/ensemble.py (ensemble_map)
workflow.xc_functionalLDA, GGA, PBE (→ GGA), LocalDensityApproximation, GeneralizedGradientApproximation, PerdewBurkeErnzerhof (→ GGA), HybridFunctional, HybridGeneralizedGradientApproximation, HybridMetaGeneralizedGradientApproximation, MetaGeneralizedGradientApproximationatomrdf/datamodels/workflow/xcfunctional.py (xc_map)

Interatomic potential type

workflow.interatomic_potential.potential_type accepts the canonical class name or any short alias atomRDF understands:

FamilyCanonicalAliases
GenericInteratomicPotential
EAMEmbeddedAtomModelEAM, eam, eam/alloy, eam/fs
MEAMModifiedEmbeddedAtomModelMEAM, meam
Lennard–JonesLennardJonesPotentialLJ, lj
Machine learningMachineLearningPotentialACE, pace, HDNNP, hdnnp, GRACE, grace

Source: atomrdf/datamodels/workflow/potential.py (potential_map).

Operation methods

operation.method (legacy top-level key activity is also accepted):

DeleteAtom, SubstituteAtom, AddAtom, Rotate (alias Rotation), Translate (alias Translation), Shear.

Source: atomrdf/io/workflow_parser.py (OPERATION_MAP).

Math operations

math_operation.type: Subtraction, Addition, Multiplication, Division, Exponentiation. Operands are either a scalar or a property id string referencing a previously declared calculated_property / input_parameter / output_parameter:

typeOperand fields
Subtractionminuend, subtrahend
Additionaddend(list)
Multiplicationfactor(list)
Divisiondividend, divisor
Exponentiationbase, exponent

Source: atomrdf/datamodels/workflow/math_operations.py.

Property label / basename

label and basename on a property are not validated as a closed enum, but at RDF generation time atomRDF resolves basename against the ASMO ontology via getattr(ASMO, basename), so the value should match an ASMO class. The following terms appear in atomRDF's source / parsers / visualizer and are known to round-trip correctly:

CategoryRecognised terms
EnergiesTotalEnergy, Energy, EquilibriumEnergy, CohesiveEnergy, FormationEnergy, VacancyFormationEnergy, GrainBoundaryEnergy, SurfaceEnergy, StackingFaultEnergy, SegregationEnergy, WorkOfSeparation, MigrationEnergy
MechanicalBulkModulus, ElasticConstant, C11, C12, C44, Stress, Pressure
GeometricVolume, EquilibriumVolume, LatticeConstant
Thermo / stateTemperature
Generic wrappersCalculatedProperty, Property, AtomAttribute

Custom strings outside this list will still be written to the YAML/JSON verbatim — they just won't resolve to a known ASMO class when loaded into an RDF graph. Sources: atomrdf/datamodels/workflow/property.py, atomrdf/visualize.py, atomrdf/io/reconstruct.py, atomrdf/parsers/pyiron.py.

Property unit

The unit string is suffixed onto http://qudt.org/vocab/unit/{unit} and stored as a QUDT URI — there is no closed enum in atomRDF, so any valid QUDT unit code is accepted. Examples that appear in atomRDF or its examples:

QuantityCommon QUDT codes
EnergyEV, J, KiloCAL
LengthANGSTROM, M, NanoM
VolumeANGSTROM3, M3
TemperatureK, DEG_C
Pressure / stressPA, GigaPA, BAR
ForceN, EV-PER-ANGSTROM
AngleRAD, DEG

Source: atomrdf/datamodels/workflow/property.py line 93.

Defects (sample-level YAML keys)

Place at most one of these as a key inside a sample dict.

FamilyYAML keysTemplateFields
Point defectvacancy, substitutional, interstitialvacancy_template, substitutional_template, interstitial_templateconcentration (atomic fraction), number
Stacking faultstacking_faultstacking_fault_templateplane (Miller indices), displacement (3-vector)
Grain boundarygrain_boundary, tilt_grain_boundary, twist_grain_boundary, symmetric_tilt_grain_boundary, mixed_grain_boundarygrain_boundary_templatesigma, plane, misorientation_angle, rotation_axis
Dislocationdislocation, edge_dislocation, screw_dislocation, mixed_dislocationdislocation_templateline_direction, burgers_vector, slip_system.{slip_direction, slip_plane.normal}, plus character_angle for mixed_dislocation
Defect complexdefect_complexdefect_complex_templateids (list of defect key names), relative_distance

Source: atomrdf/datamodels/structure.py, atomrdf/datamodels/defects/{pointdefects,grainboundary,dislocation,stackingfault,complex}.py.

The frozen set GRAIN_BOUNDARY_TYPE enumerates the five GB key variants.

Material / crystal structure

FieldNotes
material.element_ratio{symbol: fraction}, e.g. {"Fe": 0.8, "Cr": 0.2}
material.crystal_structure.spacegroup_symbolHermann–Mauguin (e.g. "Fm-3m") — no validation
material.crystal_structure.spacegroup_number1–230 — no validation
material.crystal_structure.unit_cell.bravais_latticeURI string. Common values used in atomRDF: https://www.wikidata.org/wiki/Q851536 (bcc), Q3006714 (fcc), Q663314 (hcp), Q2242450 (sc), Q503601 (tetragonal), Q648961 (orthorhombic), Q624543 (monoclinic), Q13362463 (rhombohedral)
material.crystal_structure.unit_cell.lattice_parameter[a, b, c] in Å
material.crystal_structure.unit_cell.angle[α, β, γ] in degrees

Atom attribute

FieldNotes
positionList of [x, y, z] (Å) — for inline small systems
speciesList of element symbols, parallel to position
file_pathPath to a structure file (resolved relative to the YAML file). Preferred for large MD snapshots
file_formatASE format string (e.g. "lammps-data", "lammps-dump-text", "vasp", "aims"); auto-detected when None
file_speciesSpecies order for LAMMPS numeric atom types (e.g. ["Al"])

Source: atomrdf/io/workflow_parser.py_resolve_atom_attribute_from_file.

Software / workflow manager

software:
- uri: https://doi.org/10.1016/j.cpc.2021.108171label: LAMMPSversion: "29Sep2021"workflow_manager:
uri: ...label: ...version: ...

Source: atomrdf/datamodels/workflow/software.py.

Top-level keys

YAML_TOP_LEVEL_KEYS = {computational_sample, workflow, operation, activity (legacy), math_operation}. Plus dataset (DCAT provenance, parsed by atomRDF if present).

Cross-referencing properties in math_operation

A property may carry an id; later math operations reference it by string:

e_def=copy.deepcopy(property_template)
e_def.update({"id": "E_def", "label": "TotalEnergy", "value": -3.20, "unit": "EV"})
e_perf=copy.deepcopy(property_template)
e_perf.update({"id": "E_perf", "label": "TotalEnergy", "value": -3.36, "unit": "EV"})
cd["workflow"][0]["calculated_property"] = [e_def, e_perf]
cd["math_operation"].append({
"type": "Subtraction",
"minuend": "E_def",
"subtrahend": "E_perf",
"result": {"id": "E_form", "label": "FormationEnergy", "unit": "EV",
"associate_to_sample": ["Al_fcc_with_vacancy"]},
})

Validation

violations=cd.validate() # warns on each violation, returns the listcd.validate(strict=True) # raises ValueError on the first violation

validate() currently checks workflow.method, workflow.algorithm, workflow.degrees_of_freedom, workflow.thermodynamic_ensemble, workflow.xc_functional, workflow.interatomic_potential.potential_type, operation.method and math_operation.type. Each violation dict has keys section, index, field, value, allowed.

Examples

Working YAML/JSON examples live in examples/:

  • single_structure_with_workflow.yaml / .json
  • grain_boundary.yaml / .json
  • examples.ipynb — end-to-end notebook

Citation

If you use conceptual_dictionary in your research, please cite the associated paper:

A. Azocar Guzman, S. Menon, T. Hickel, S. Sandfeld. Ontology-based knowledge graph infrastructure for interoperable atomistic simulation data. arXiv:2604.06230 (2026). 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},
}

License

MIT License — see LICENSE.

About

A python dictionary template for storing serialisable metadata

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

conceptual_dictionary

A Python dictionary template for storing serializable computational-materials-science metadata. The schema and controlled vocabularies are kept in lock-step with atomRDF, so YAML/JSON files produced with conceptual_dictionary can be parsed directly by atomRDF's WorkflowParser.

  • Strongly-typed templates for samples, workflows, properties, operations, defects, datasets and math operations.
  • Controlled vocabularies mirrored from atomRDF (methods, ensembles, potentials, XC functionals, …) with optional runtime validation.
  • A dict subclass (ConceptualDict) with YAML/JSON I/O that automatically cleans numpy types and is round-trip safe.

Installation

pip install conceptual-dictionary

From source:

pip install -e .

Quick start

importcopyfromconceptual_dictionaryimport (
ConceptualDict, sample_template, workflow_template,
property_template, dataset_template,
)
cd=ConceptualDict()
# Samplesample=copy.deepcopy(sample_template)
sample["id"] ="Al_fcc"sample["material"]["element_ratio"] = {"Al": 1.0}
sample["material"]["crystal_structure"]["spacegroup_symbol"] ="Fm-3m"sample["material"]["crystal_structure"]["spacegroup_number"] =225sample["material"]["crystal_structure"]["unit_cell"]["lattice_parameter"] = [4.05, 4.05, 4.05]
sample["material"]["crystal_structure"]["unit_cell"]["angle"] = [90.0, 90.0, 90.0]
cd["computational_sample"].append(sample)
# Workflowwf=copy.deepcopy(workflow_template)
wf["method"] ="MolecularStatics"wf["interatomic_potential"] = {"potential_type": "eam/alloy",
"uri": "https://doi.org/10.1103/physrevb.59.3393"}
wf["input_sample"] = ["Al_fcc"]
wf["output_sample"] = ["Al_fcc"]
energy=copy.deepcopy(property_template)
energy.update({"label": "EquilibriumEnergy", "value": -3.36, "unit": "EV",
"associate_to_sample": ["Al_fcc"]})
wf["calculated_property"] = [energy]
cd["workflow"].append(wf)
# Optional dataset provenanceds=copy.deepcopy(dataset_template)
ds["title"] ="Al FCC reference"ds["samples"] = ["Al_fcc"]
cd["dataset"] =dscd.validate(strict=True) # raises on first vocab violationcd.to_yaml("metadata.yaml")
cd.to_json("metadata.json", indent=2)

Templates

Every template is a plain dict. Use copy.deepcopy before mutating, then populate only the fields that apply (everything is optional unless marked Required).

ImportPurpose
sample_templateA computational sample (material + simulation cell + atoms)
property_templateA single calculated/input/output property
workflow_templateA simulation/calculation step
dataset_templateDCAT dataset provenance (creators, publication, sample IDs)
operation_templateAtomic-scale transform (DeleteAtom, Rotate, Translate, Shear, …)
math_operation_templateArithmetic activity (Subtraction, Addition, Multiplication, Division, Exponentiation)
vacancy_template, substitutional_template, interstitial_templatePoint defects
stacking_fault_templateStacking fault
grain_boundary_templateGrain boundary (5 YAML key variants)
dislocation_templateDislocation (4 YAML key variants)
defect_complex_templateMulti-defect complex
full_sample_template, full_yaml_templateReference templates with every supported field

ConceptualDict

A dict subclass pre-populated with the four top-level sections atomRDF reads:

ConceptualDict() == {
"computational_sample": [],
"workflow": [],
"operation": [],
"math_operation": [],
}

Add an optional "dataset" key (or anything else) at any time.

Methods

MethodNotes
to_yaml(filepath, sort_keys=False)numpy → native conversion, preserves insertion order by default
from_yaml(filepath)(classmethod)Loads any partial YAML (missing top-level keys keep their default empty lists)
to_json(filepath, sort_keys=False, indent=2)Same numpy cleanup as YAML
from_json(filepath)(classmethod)Symmetric counterpart
validate(strict=False)Returns a list of violation dicts {section, index, field, value, allowed}. With strict=True raises ValueError on the first violation
generate_id(length=7)Collision-resistant random ID using os.urandom (safe against third-party random.seed())

Numpy-friendly serialization

Both to_yaml and to_json recursively convert np.ndarray, np.floating, np.integer, np.bool_ and any unknown object (via str(obj)) to JSON/YAML native types — so values coming from ASE / pyiron / LAMMPS need no pre-processing.

File layout produced

The full top-level YAML/JSON shape consumed by atomRDF:

dataset: # optional, dcat:Dataset provenanceidentifier: ...title: ...creators: [{id, name}, ...]publication: {id, identifier, title}samples: [<sample id>, ...]computational_sample: # list of sample dicts
- id: ...material: {...}simulation_cell: {...}atom_attribute: {...}calculated_property: [...]# optional defect blocks (see Defects below)workflow: # list of workflow steps
- method: ...algorithm: ......operation: # list of atomic-scale transforms (legacy alias: 'activity')
- method: ...input_sample: ...output_sample: ...math_operation: # list of arithmetic activities
- type: ...result: {...}

Controlled vocabularies (cross-referenced with atomRDF)

The following sections enumerate every string atomRDF accepts for each field. Aliases are marked → canonical. Anything outside these sets is rejected by ConceptualDict.validate() (and silently ignored or errored by atomRDF depending on the field).

The frozen sets are also importable and useful for building UIs:

fromconceptual_dictionaryimport (
METHOD, ALGORITHM, DEGREES_OF_FREEDOM, THERMODYNAMIC_ENSEMBLE,
POTENTIAL_TYPE, XC_FUNCTIONAL, OPERATION_METHOD,
MATH_OPERATION_TYPE, GRAIN_BOUNDARY_TYPE, YAML_TOP_LEVEL_KEYS,
CONTROLLED_VALUES,
)

Workflow

FieldAccepted valuesatomRDF source
workflow.methodMolecularDynamics, MolecularStatics, DensityFunctionalTheoryatomrdf/datamodels/workflow/method.py (method_map)
workflow.algorithmEquationOfStateFit, QuasiHarmonicApproximation, ThermodynamicIntegration, ANNNIModel, TensileTest, CompressionTest; alias UniaxialTensionTensileTestatomrdf/datamodels/workflow/algorithm.py (algorithm_map)
workflow.degrees_of_freedom(list)AtomicPositionRelaxation, CellVolumeRelaxation, CellShapeRelaxationatomrdf/datamodels/workflow/dof.py (dof_map)
workflow.thermodynamic_ensembleCanonicalEnsemble (NVT), MicrocanonicalEnsemble (NVE), IsothermalIsobaricEnsemble (NPT), IsoenthalpicIsobaricEnsemble (NPH), GrandCanonicalEnsemble (μVT)atomrdf/datamodels/workflow/ensemble.py (ensemble_map)
workflow.xc_functionalLDA, GGA, PBE (→ GGA), LocalDensityApproximation, GeneralizedGradientApproximation, PerdewBurkeErnzerhof (→ GGA), HybridFunctional, HybridGeneralizedGradientApproximation, HybridMetaGeneralizedGradientApproximation, MetaGeneralizedGradientApproximationatomrdf/datamodels/workflow/xcfunctional.py (xc_map)

Interatomic potential type

workflow.interatomic_potential.potential_type accepts the canonical class name or any short alias atomRDF understands:

FamilyCanonicalAliases
GenericInteratomicPotential
EAMEmbeddedAtomModelEAM, eam, eam/alloy, eam/fs
MEAMModifiedEmbeddedAtomModelMEAM, meam
Lennard–JonesLennardJonesPotentialLJ, lj
Machine learningMachineLearningPotentialACE, pace, HDNNP, hdnnp, GRACE, grace

Source: atomrdf/datamodels/workflow/potential.py (potential_map).

Operation methods

operation.method (legacy top-level key activity is also accepted):

DeleteAtom, SubstituteAtom, AddAtom, Rotate (alias Rotation), Translate (alias Translation), Shear.

Source: atomrdf/io/workflow_parser.py (OPERATION_MAP).

Math operations

math_operation.type: Subtraction, Addition, Multiplication, Division, Exponentiation. Operands are either a scalar or a property id string referencing a previously declared calculated_property / input_parameter / output_parameter:

typeOperand fields
Subtractionminuend, subtrahend
Additionaddend(list)
Multiplicationfactor(list)
Divisiondividend, divisor
Exponentiationbase, exponent

Source: atomrdf/datamodels/workflow/math_operations.py.

Property label / basename

label and basename on a property are not validated as a closed enum, but at RDF generation time atomRDF resolves basename against the ASMO ontology via getattr(ASMO, basename), so the value should match an ASMO class. The following terms appear in atomRDF's source / parsers / visualizer and are known to round-trip correctly:

CategoryRecognised terms
EnergiesTotalEnergy, Energy, EquilibriumEnergy, CohesiveEnergy, FormationEnergy, VacancyFormationEnergy, GrainBoundaryEnergy, SurfaceEnergy, StackingFaultEnergy, SegregationEnergy, WorkOfSeparation, MigrationEnergy
MechanicalBulkModulus, ElasticConstant, C11, C12, C44, Stress, Pressure
GeometricVolume, EquilibriumVolume, LatticeConstant
Thermo / stateTemperature
Generic wrappersCalculatedProperty, Property, AtomAttribute

Custom strings outside this list will still be written to the YAML/JSON verbatim — they just won't resolve to a known ASMO class when loaded into an RDF graph. Sources: atomrdf/datamodels/workflow/property.py, atomrdf/visualize.py, atomrdf/io/reconstruct.py, atomrdf/parsers/pyiron.py.

Property unit

The unit string is suffixed onto http://qudt.org/vocab/unit/{unit} and stored as a QUDT URI — there is no closed enum in atomRDF, so any valid QUDT unit code is accepted. Examples that appear in atomRDF or its examples:

QuantityCommon QUDT codes
EnergyEV, J, KiloCAL
LengthANGSTROM, M, NanoM
VolumeANGSTROM3, M3
TemperatureK, DEG_C
Pressure / stressPA, GigaPA, BAR
ForceN, EV-PER-ANGSTROM
AngleRAD, DEG

Source: atomrdf/datamodels/workflow/property.py line 93.

Defects (sample-level YAML keys)

Place at most one of these as a key inside a sample dict.

FamilyYAML keysTemplateFields
Point defectvacancy, substitutional, interstitialvacancy_template, substitutional_template, interstitial_templateconcentration (atomic fraction), number
Stacking faultstacking_faultstacking_fault_templateplane (Miller indices), displacement (3-vector)
Grain boundarygrain_boundary, tilt_grain_boundary, twist_grain_boundary, symmetric_tilt_grain_boundary, mixed_grain_boundarygrain_boundary_templatesigma, plane, misorientation_angle, rotation_axis
Dislocationdislocation, edge_dislocation, screw_dislocation, mixed_dislocationdislocation_templateline_direction, burgers_vector, slip_system.{slip_direction, slip_plane.normal}, plus character_angle for mixed_dislocation
Defect complexdefect_complexdefect_complex_templateids (list of defect key names), relative_distance

Source: atomrdf/datamodels/structure.py, atomrdf/datamodels/defects/{pointdefects,grainboundary,dislocation,stackingfault,complex}.py.

The frozen set GRAIN_BOUNDARY_TYPE enumerates the five GB key variants.

Material / crystal structure

FieldNotes
material.element_ratio{symbol: fraction}, e.g. {"Fe": 0.8, "Cr": 0.2}
material.crystal_structure.spacegroup_symbolHermann–Mauguin (e.g. "Fm-3m") — no validation
material.crystal_structure.spacegroup_number1–230 — no validation
material.crystal_structure.unit_cell.bravais_latticeURI string. Common values used in atomRDF: https://www.wikidata.org/wiki/Q851536 (bcc), Q3006714 (fcc), Q663314 (hcp), Q2242450 (sc), Q503601 (tetragonal), Q648961 (orthorhombic), Q624543 (monoclinic), Q13362463 (rhombohedral)
material.crystal_structure.unit_cell.lattice_parameter[a, b, c] in Å
material.crystal_structure.unit_cell.angle[α, β, γ] in degrees

Atom attribute

FieldNotes
positionList of [x, y, z] (Å) — for inline small systems
speciesList of element symbols, parallel to position
file_pathPath to a structure file (resolved relative to the YAML file). Preferred for large MD snapshots
file_formatASE format string (e.g. "lammps-data", "lammps-dump-text", "vasp", "aims"); auto-detected when None
file_speciesSpecies order for LAMMPS numeric atom types (e.g. ["Al"])

Source: atomrdf/io/workflow_parser.py_resolve_atom_attribute_from_file.

Software / workflow manager

software:
- uri: https://doi.org/10.1016/j.cpc.2021.108171label: LAMMPSversion: "29Sep2021"workflow_manager:
uri: ...label: ...version: ...

Source: atomrdf/datamodels/workflow/software.py.

Top-level keys

YAML_TOP_LEVEL_KEYS = {computational_sample, workflow, operation, activity (legacy), math_operation}. Plus dataset (DCAT provenance, parsed by atomRDF if present).

Cross-referencing properties in math_operation

A property may carry an id; later math operations reference it by string:

e_def=copy.deepcopy(property_template)
e_def.update({"id": "E_def", "label": "TotalEnergy", "value": -3.20, "unit": "EV"})
e_perf=copy.deepcopy(property_template)
e_perf.update({"id": "E_perf", "label": "TotalEnergy", "value": -3.36, "unit": "EV"})
cd["workflow"][0]["calculated_property"] = [e_def, e_perf]
cd["math_operation"].append({
"type": "Subtraction",
"minuend": "E_def",
"subtrahend": "E_perf",
"result": {"id": "E_form", "label": "FormationEnergy", "unit": "EV",
"associate_to_sample": ["Al_fcc_with_vacancy"]},
})

Validation

violations=cd.validate() # warns on each violation, returns the listcd.validate(strict=True) # raises ValueError on the first violation

validate() currently checks workflow.method, workflow.algorithm, workflow.degrees_of_freedom, workflow.thermodynamic_ensemble, workflow.xc_functional, workflow.interatomic_potential.potential_type, operation.method and math_operation.type. Each violation dict has keys section, index, field, value, allowed.

Examples

Working YAML/JSON examples live in examples/:

  • single_structure_with_workflow.yaml / .json
  • grain_boundary.yaml / .json
  • examples.ipynb — end-to-end notebook

Citation

If you use conceptual_dictionary in your research, please cite the associated paper:

A. Azocar Guzman, S. Menon, T. Hickel, S. Sandfeld. Ontology-based knowledge graph infrastructure for interoperable atomistic simulation data. arXiv:2604.06230 (2026). 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},
}

License

MIT License — see LICENSE.

About

A python dictionary template for storing serialisable metadata

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

conceptual_dictionary

A Python dictionary template for storing serializable computational-materials-science metadata. The schema and controlled vocabularies are kept in lock-step with atomRDF, so YAML/JSON files produced with conceptual_dictionary can be parsed directly by atomRDF's WorkflowParser.

  • Strongly-typed templates for samples, workflows, properties, operations, defects, datasets and math operations.
  • Controlled vocabularies mirrored from atomRDF (methods, ensembles, potentials, XC functionals, …) with optional runtime validation.
  • A dict subclass (ConceptualDict) with YAML/JSON I/O that automatically cleans numpy types and is round-trip safe.

Installation

pip install conceptual-dictionary

From source:

pip install -e .

Quick start

importcopyfromconceptual_dictionaryimport (
ConceptualDict, sample_template, workflow_template,
property_template, dataset_template,
)
cd=ConceptualDict()
# Samplesample=copy.deepcopy(sample_template)
sample["id"] ="Al_fcc"sample["material"]["element_ratio"] = {"Al": 1.0}
sample["material"]["crystal_structure"]["spacegroup_symbol"] ="Fm-3m"sample["material"]["crystal_structure"]["spacegroup_number"] =225sample["material"]["crystal_structure"]["unit_cell"]["lattice_parameter"] = [4.05, 4.05, 4.05]
sample["material"]["crystal_structure"]["unit_cell"]["angle"] = [90.0, 90.0, 90.0]
cd["computational_sample"].append(sample)
# Workflowwf=copy.deepcopy(workflow_template)
wf["method"] ="MolecularStatics"wf["interatomic_potential"] = {"potential_type": "eam/alloy",
"uri": "https://doi.org/10.1103/physrevb.59.3393"}
wf["input_sample"] = ["Al_fcc"]
wf["output_sample"] = ["Al_fcc"]
energy=copy.deepcopy(property_template)
energy.update({"label": "EquilibriumEnergy", "value": -3.36, "unit": "EV",
"associate_to_sample": ["Al_fcc"]})
wf["calculated_property"] = [energy]
cd["workflow"].append(wf)
# Optional dataset provenanceds=copy.deepcopy(dataset_template)
ds["title"] ="Al FCC reference"ds["samples"] = ["Al_fcc"]
cd["dataset"] =dscd.validate(strict=True) # raises on first vocab violationcd.to_yaml("metadata.yaml")
cd.to_json("metadata.json", indent=2)

Templates

Every template is a plain dict. Use copy.deepcopy before mutating, then populate only the fields that apply (everything is optional unless marked Required).

ImportPurpose
sample_templateA computational sample (material + simulation cell + atoms)
property_templateA single calculated/input/output property
workflow_templateA simulation/calculation step
dataset_templateDCAT dataset provenance (creators, publication, sample IDs)
operation_templateAtomic-scale transform (DeleteAtom, Rotate, Translate, Shear, …)
math_operation_templateArithmetic activity (Subtraction, Addition, Multiplication, Division, Exponentiation)
vacancy_template, substitutional_template, interstitial_templatePoint defects
stacking_fault_templateStacking fault
grain_boundary_templateGrain boundary (5 YAML key variants)
dislocation_templateDislocation (4 YAML key variants)
defect_complex_templateMulti-defect complex
full_sample_template, full_yaml_templateReference templates with every supported field

ConceptualDict

A dict subclass pre-populated with the four top-level sections atomRDF reads:

ConceptualDict() == {
"computational_sample": [],
"workflow": [],
"operation": [],
"math_operation": [],
}

Add an optional "dataset" key (or anything else) at any time.

Methods

MethodNotes
to_yaml(filepath, sort_keys=False)numpy → native conversion, preserves insertion order by default
from_yaml(filepath)(classmethod)Loads any partial YAML (missing top-level keys keep their default empty lists)
to_json(filepath, sort_keys=False, indent=2)Same numpy cleanup as YAML
from_json(filepath)(classmethod)Symmetric counterpart
validate(strict=False)Returns a list of violation dicts {section, index, field, value, allowed}. With strict=True raises ValueError on the first violation
generate_id(length=7)Collision-resistant random ID using os.urandom (safe against third-party random.seed())

Numpy-friendly serialization

Both to_yaml and to_json recursively convert np.ndarray, np.floating, np.integer, np.bool_ and any unknown object (via str(obj)) to JSON/YAML native types — so values coming from ASE / pyiron / LAMMPS need no pre-processing.

File layout produced

The full top-level YAML/JSON shape consumed by atomRDF:

dataset: # optional, dcat:Dataset provenanceidentifier: ...title: ...creators: [{id, name}, ...]publication: {id, identifier, title}samples: [<sample id>, ...]computational_sample: # list of sample dicts
- id: ...material: {...}simulation_cell: {...}atom_attribute: {...}calculated_property: [...]# optional defect blocks (see Defects below)workflow: # list of workflow steps
- method: ...algorithm: ......operation: # list of atomic-scale transforms (legacy alias: 'activity')
- method: ...input_sample: ...output_sample: ...math_operation: # list of arithmetic activities
- type: ...result: {...}

Controlled vocabularies (cross-referenced with atomRDF)

The following sections enumerate every string atomRDF accepts for each field. Aliases are marked → canonical. Anything outside these sets is rejected by ConceptualDict.validate() (and silently ignored or errored by atomRDF depending on the field).

The frozen sets are also importable and useful for building UIs:

fromconceptual_dictionaryimport (
METHOD, ALGORITHM, DEGREES_OF_FREEDOM, THERMODYNAMIC_ENSEMBLE,
POTENTIAL_TYPE, XC_FUNCTIONAL, OPERATION_METHOD,
MATH_OPERATION_TYPE, GRAIN_BOUNDARY_TYPE, YAML_TOP_LEVEL_KEYS,
CONTROLLED_VALUES,
)

Workflow

FieldAccepted valuesatomRDF source
workflow.methodMolecularDynamics, MolecularStatics, DensityFunctionalTheoryatomrdf/datamodels/workflow/method.py (method_map)
workflow.algorithmEquationOfStateFit, QuasiHarmonicApproximation, ThermodynamicIntegration, ANNNIModel, TensileTest, CompressionTest; alias UniaxialTensionTensileTestatomrdf/datamodels/workflow/algorithm.py (algorithm_map)
workflow.degrees_of_freedom(list)AtomicPositionRelaxation, CellVolumeRelaxation, CellShapeRelaxationatomrdf/datamodels/workflow/dof.py (dof_map)
workflow.thermodynamic_ensembleCanonicalEnsemble (NVT), MicrocanonicalEnsemble (NVE), IsothermalIsobaricEnsemble (NPT), IsoenthalpicIsobaricEnsemble (NPH), GrandCanonicalEnsemble (μVT)atomrdf/datamodels/workflow/ensemble.py (ensemble_map)
workflow.xc_functionalLDA, GGA, PBE (→ GGA), LocalDensityApproximation, GeneralizedGradientApproximation, PerdewBurkeErnzerhof (→ GGA), HybridFunctional, HybridGeneralizedGradientApproximation, HybridMetaGeneralizedGradientApproximation, MetaGeneralizedGradientApproximationatomrdf/datamodels/workflow/xcfunctional.py (xc_map)

Interatomic potential type

workflow.interatomic_potential.potential_type accepts the canonical class name or any short alias atomRDF understands:

FamilyCanonicalAliases
GenericInteratomicPotential
EAMEmbeddedAtomModelEAM, eam, eam/alloy, eam/fs
MEAMModifiedEmbeddedAtomModelMEAM, meam
Lennard–JonesLennardJonesPotentialLJ, lj
Machine learningMachineLearningPotentialACE, pace, HDNNP, hdnnp, GRACE, grace

Source: atomrdf/datamodels/workflow/potential.py (potential_map).

Operation methods

operation.method (legacy top-level key activity is also accepted):

DeleteAtom, SubstituteAtom, AddAtom, Rotate (alias Rotation), Translate (alias Translation), Shear.

Source: atomrdf/io/workflow_parser.py (OPERATION_MAP).

Math operations

math_operation.type: Subtraction, Addition, Multiplication, Division, Exponentiation. Operands are either a scalar or a property id string referencing a previously declared calculated_property / input_parameter / output_parameter:

typeOperand fields
Subtractionminuend, subtrahend
Additionaddend(list)
Multiplicationfactor(list)
Divisiondividend, divisor
Exponentiationbase, exponent

Source: atomrdf/datamodels/workflow/math_operations.py.

Property label / basename

label and basename on a property are not validated as a closed enum, but at RDF generation time atomRDF resolves basename against the ASMO ontology via getattr(ASMO, basename), so the value should match an ASMO class. The following terms appear in atomRDF's source / parsers / visualizer and are known to round-trip correctly:

CategoryRecognised terms
EnergiesTotalEnergy, Energy, EquilibriumEnergy, CohesiveEnergy, FormationEnergy, VacancyFormationEnergy, GrainBoundaryEnergy, SurfaceEnergy, StackingFaultEnergy, SegregationEnergy, WorkOfSeparation, MigrationEnergy
MechanicalBulkModulus, ElasticConstant, C11, C12, C44, Stress, Pressure
GeometricVolume, EquilibriumVolume, LatticeConstant
Thermo / stateTemperature
Generic wrappersCalculatedProperty, Property, AtomAttribute

Custom strings outside this list will still be written to the YAML/JSON verbatim — they just won't resolve to a known ASMO class when loaded into an RDF graph. Sources: atomrdf/datamodels/workflow/property.py, atomrdf/visualize.py, atomrdf/io/reconstruct.py, atomrdf/parsers/pyiron.py.

Property unit

The unit string is suffixed onto http://qudt.org/vocab/unit/{unit} and stored as a QUDT URI — there is no closed enum in atomRDF, so any valid QUDT unit code is accepted. Examples that appear in atomRDF or its examples:

QuantityCommon QUDT codes
EnergyEV, J, KiloCAL
LengthANGSTROM, M, NanoM
VolumeANGSTROM3, M3
TemperatureK, DEG_C
Pressure / stressPA, GigaPA, BAR
ForceN, EV-PER-ANGSTROM
AngleRAD, DEG

Source: atomrdf/datamodels/workflow/property.py line 93.

Defects (sample-level YAML keys)

Place at most one of these as a key inside a sample dict.

FamilyYAML keysTemplateFields
Point defectvacancy, substitutional, interstitialvacancy_template, substitutional_template, interstitial_templateconcentration (atomic fraction), number
Stacking faultstacking_faultstacking_fault_templateplane (Miller indices), displacement (3-vector)
Grain boundarygrain_boundary, tilt_grain_boundary, twist_grain_boundary, symmetric_tilt_grain_boundary, mixed_grain_boundarygrain_boundary_templatesigma, plane, misorientation_angle, rotation_axis
Dislocationdislocation, edge_dislocation, screw_dislocation, mixed_dislocationdislocation_templateline_direction, burgers_vector, slip_system.{slip_direction, slip_plane.normal}, plus character_angle for mixed_dislocation
Defect complexdefect_complexdefect_complex_templateids (list of defect key names), relative_distance

Source: atomrdf/datamodels/structure.py, atomrdf/datamodels/defects/{pointdefects,grainboundary,dislocation,stackingfault,complex}.py.

The frozen set GRAIN_BOUNDARY_TYPE enumerates the five GB key variants.

Material / crystal structure

FieldNotes
material.element_ratio{symbol: fraction}, e.g. {"Fe": 0.8, "Cr": 0.2}
material.crystal_structure.spacegroup_symbolHermann–Mauguin (e.g. "Fm-3m") — no validation
material.crystal_structure.spacegroup_number1–230 — no validation
material.crystal_structure.unit_cell.bravais_latticeURI string. Common values used in atomRDF: https://www.wikidata.org/wiki/Q851536 (bcc), Q3006714 (fcc), Q663314 (hcp), Q2242450 (sc), Q503601 (tetragonal), Q648961 (orthorhombic), Q624543 (monoclinic), Q13362463 (rhombohedral)
material.crystal_structure.unit_cell.lattice_parameter[a, b, c] in Å
material.crystal_structure.unit_cell.angle[α, β, γ] in degrees

Atom attribute

FieldNotes
positionList of [x, y, z] (Å) — for inline small systems
speciesList of element symbols, parallel to position
file_pathPath to a structure file (resolved relative to the YAML file). Preferred for large MD snapshots
file_formatASE format string (e.g. "lammps-data", "lammps-dump-text", "vasp", "aims"); auto-detected when None
file_speciesSpecies order for LAMMPS numeric atom types (e.g. ["Al"])

Source: atomrdf/io/workflow_parser.py_resolve_atom_attribute_from_file.

Software / workflow manager

software:
- uri: https://doi.org/10.1016/j.cpc.2021.108171label: LAMMPSversion: "29Sep2021"workflow_manager:
uri: ...label: ...version: ...

Source: atomrdf/datamodels/workflow/software.py.

Top-level keys

YAML_TOP_LEVEL_KEYS = {computational_sample, workflow, operation, activity (legacy), math_operation}. Plus dataset (DCAT provenance, parsed by atomRDF if present).

Cross-referencing properties in math_operation

A property may carry an id; later math operations reference it by string:

e_def=copy.deepcopy(property_template)
e_def.update({"id": "E_def", "label": "TotalEnergy", "value": -3.20, "unit": "EV"})
e_perf=copy.deepcopy(property_template)
e_perf.update({"id": "E_perf", "label": "TotalEnergy", "value": -3.36, "unit": "EV"})
cd["workflow"][0]["calculated_property"] = [e_def, e_perf]
cd["math_operation"].append({
"type": "Subtraction",
"minuend": "E_def",
"subtrahend": "E_perf",
"result": {"id": "E_form", "label": "FormationEnergy", "unit": "EV",
"associate_to_sample": ["Al_fcc_with_vacancy"]},
})

Validation

violations=cd.validate() # warns on each violation, returns the listcd.validate(strict=True) # raises ValueError on the first violation

validate() currently checks workflow.method, workflow.algorithm, workflow.degrees_of_freedom, workflow.thermodynamic_ensemble, workflow.xc_functional, workflow.interatomic_potential.potential_type, operation.method and math_operation.type. Each violation dict has keys section, index, field, value, allowed.

Examples

Working YAML/JSON examples live in examples/:

  • single_structure_with_workflow.yaml / .json
  • grain_boundary.yaml / .json
  • examples.ipynb — end-to-end notebook

Citation

If you use conceptual_dictionary in your research, please cite the associated paper:

A. Azocar Guzman, S. Menon, T. Hickel, S. Sandfeld. Ontology-based knowledge graph infrastructure for interoperable atomistic simulation data. arXiv:2604.06230 (2026). 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},
}

License

MIT License — see LICENSE.

About

A python dictionary template for storing serialisable metadata

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Repository files navigation

conceptual_dictionary

A Python dictionary template for storing serializable computational-materials-science metadata. The schema and controlled vocabularies are kept in lock-step with atomRDF, so YAML/JSON files produced with conceptual_dictionary can be parsed directly by atomRDF's WorkflowParser.

  • Strongly-typed templates for samples, workflows, properties, operations, defects, datasets and math operations.
  • Controlled vocabularies mirrored from atomRDF (methods, ensembles, potentials, XC functionals, …) with optional runtime validation.
  • A dict subclass (ConceptualDict) with YAML/JSON I/O that automatically cleans numpy types and is round-trip safe.

Installation

pip install conceptual-dictionary

From source:

pip install -e .

Quick start

importcopyfromconceptual_dictionaryimport (
ConceptualDict, sample_template, workflow_template,
property_template, dataset_template,
)
cd=ConceptualDict()
# Samplesample=copy.deepcopy(sample_template)
sample["id"] ="Al_fcc"sample["material"]["element_ratio"] = {"Al": 1.0}
sample["material"]["crystal_structure"]["spacegroup_symbol"] ="Fm-3m"sample["material"]["crystal_structure"]["spacegroup_number"] =225sample["material"]["crystal_structure"]["unit_cell"]["lattice_parameter"] = [4.05, 4.05, 4.05]
sample["material"]["crystal_structure"]["unit_cell"]["angle"] = [90.0, 90.0, 90.0]
cd["computational_sample"].append(sample)
# Workflowwf=copy.deepcopy(workflow_template)
wf["method"] ="MolecularStatics"wf["interatomic_potential"] = {"potential_type": "eam/alloy",
"uri": "https://doi.org/10.1103/physrevb.59.3393"}
wf["input_sample"] = ["Al_fcc"]
wf["output_sample"] = ["Al_fcc"]
energy=copy.deepcopy(property_template)
energy.update({"label": "EquilibriumEnergy", "value": -3.36, "unit": "EV",
"associate_to_sample": ["Al_fcc"]})
wf["calculated_property"] = [energy]
cd["workflow"].append(wf)
# Optional dataset provenanceds=copy.deepcopy(dataset_template)
ds["title"] ="Al FCC reference"ds["samples"] = ["Al_fcc"]
cd["dataset"] =dscd.validate(strict=True) # raises on first vocab violationcd.to_yaml("metadata.yaml")
cd.to_json("metadata.json", indent=2)

Templates

Every template is a plain dict. Use copy.deepcopy before mutating, then populate only the fields that apply (everything is optional unless marked Required).

ImportPurpose
sample_templateA computational sample (material + simulation cell + atoms)
property_templateA single calculated/input/output property
workflow_templateA simulation/calculation step
dataset_templateDCAT dataset provenance (creators, publication, sample IDs)
operation_templateAtomic-scale transform (DeleteAtom, Rotate, Translate, Shear, …)
math_operation_templateArithmetic activity (Subtraction, Addition, Multiplication, Division, Exponentiation)
vacancy_template, substitutional_template, interstitial_templatePoint defects
stacking_fault_templateStacking fault
grain_boundary_templateGrain boundary (5 YAML key variants)
dislocation_templateDislocation (4 YAML key variants)
defect_complex_templateMulti-defect complex
full_sample_template, full_yaml_templateReference templates with every supported field

ConceptualDict

A dict subclass pre-populated with the four top-level sections atomRDF reads:

ConceptualDict() == {
"computational_sample": [],
"workflow": [],
"operation": [],
"math_operation": [],
}

Add an optional "dataset" key (or anything else) at any time.

Methods

MethodNotes
to_yaml(filepath, sort_keys=False)numpy → native conversion, preserves insertion order by default
from_yaml(filepath)(classmethod)Loads any partial YAML (missing top-level keys keep their default empty lists)
to_json(filepath, sort_keys=False, indent=2)Same numpy cleanup as YAML
from_json(filepath)(classmethod)Symmetric counterpart
validate(strict=False)Returns a list of violation dicts {section, index, field, value, allowed}. With strict=True raises ValueError on the first violation
generate_id(length=7)Collision-resistant random ID using os.urandom (safe against third-party random.seed())

Numpy-friendly serialization

Both to_yaml and to_json recursively convert np.ndarray, np.floating, np.integer, np.bool_ and any unknown object (via str(obj)) to JSON/YAML native types — so values coming from ASE / pyiron / LAMMPS need no pre-processing.

File layout produced

The full top-level YAML/JSON shape consumed by atomRDF:

dataset: # optional, dcat:Dataset provenanceidentifier: ...title: ...creators: [{id, name}, ...]publication: {id, identifier, title}samples: [<sample id>, ...]computational_sample: # list of sample dicts
- id: ...material: {...}simulation_cell: {...}atom_attribute: {...}calculated_property: [...]# optional defect blocks (see Defects below)workflow: # list of workflow steps
- method: ...algorithm: ......operation: # list of atomic-scale transforms (legacy alias: 'activity')
- method: ...input_sample: ...output_sample: ...math_operation: # list of arithmetic activities
- type: ...result: {...}

Controlled vocabularies (cross-referenced with atomRDF)

The following sections enumerate every string atomRDF accepts for each field. Aliases are marked → canonical. Anything outside these sets is rejected by ConceptualDict.validate() (and silently ignored or errored by atomRDF depending on the field).

The frozen sets are also importable and useful for building UIs:

fromconceptual_dictionaryimport (
METHOD, ALGORITHM, DEGREES_OF_FREEDOM, THERMODYNAMIC_ENSEMBLE,
POTENTIAL_TYPE, XC_FUNCTIONAL, OPERATION_METHOD,
MATH_OPERATION_TYPE, GRAIN_BOUNDARY_TYPE, YAML_TOP_LEVEL_KEYS,
CONTROLLED_VALUES,
)

Workflow

FieldAccepted valuesatomRDF source
workflow.methodMolecularDynamics, MolecularStatics, DensityFunctionalTheoryatomrdf/datamodels/workflow/method.py (method_map)
workflow.algorithmEquationOfStateFit, QuasiHarmonicApproximation, ThermodynamicIntegration, ANNNIModel, TensileTest, CompressionTest; alias UniaxialTensionTensileTestatomrdf/datamodels/workflow/algorithm.py (algorithm_map)
workflow.degrees_of_freedom(list)AtomicPositionRelaxation, CellVolumeRelaxation, CellShapeRelaxationatomrdf/datamodels/workflow/dof.py (dof_map)
workflow.thermodynamic_ensembleCanonicalEnsemble (NVT), MicrocanonicalEnsemble (NVE), IsothermalIsobaricEnsemble (NPT), IsoenthalpicIsobaricEnsemble (NPH), GrandCanonicalEnsemble (μVT)atomrdf/datamodels/workflow/ensemble.py (ensemble_map)
workflow.xc_functionalLDA, GGA, PBE (→ GGA), LocalDensityApproximation, GeneralizedGradientApproximation, PerdewBurkeErnzerhof (→ GGA), HybridFunctional, HybridGeneralizedGradientApproximation, HybridMetaGeneralizedGradientApproximation, MetaGeneralizedGradientApproximationatomrdf/datamodels/workflow/xcfunctional.py (xc_map)

Interatomic potential type

workflow.interatomic_potential.potential_type accepts the canonical class name or any short alias atomRDF understands:

FamilyCanonicalAliases
GenericInteratomicPotential
EAMEmbeddedAtomModelEAM, eam, eam/alloy, eam/fs
MEAMModifiedEmbeddedAtomModelMEAM, meam
Lennard–JonesLennardJonesPotentialLJ, lj
Machine learningMachineLearningPotentialACE, pace, HDNNP, hdnnp, GRACE, grace

Source: atomrdf/datamodels/workflow/potential.py (potential_map).

Operation methods

operation.method (legacy top-level key activity is also accepted):

DeleteAtom, SubstituteAtom, AddAtom, Rotate (alias Rotation), Translate (alias Translation), Shear.

Source: atomrdf/io/workflow_parser.py (OPERATION_MAP).

Math operations

math_operation.type: Subtraction, Addition, Multiplication, Division, Exponentiation. Operands are either a scalar or a property id string referencing a previously declared calculated_property / input_parameter / output_parameter:

typeOperand fields
Subtractionminuend, subtrahend
Additionaddend(list)
Multiplicationfactor(list)
Divisiondividend, divisor
Exponentiationbase, exponent

Source: atomrdf/datamodels/workflow/math_operations.py.

Property label / basename

label and basename on a property are not validated as a closed enum, but at RDF generation time atomRDF resolves basename against the ASMO ontology via getattr(ASMO, basename), so the value should match an ASMO class. The following terms appear in atomRDF's source / parsers / visualizer and are known to round-trip correctly:

CategoryRecognised terms
EnergiesTotalEnergy, Energy, EquilibriumEnergy, CohesiveEnergy, FormationEnergy, VacancyFormationEnergy, GrainBoundaryEnergy, SurfaceEnergy, StackingFaultEnergy, SegregationEnergy, WorkOfSeparation, MigrationEnergy
MechanicalBulkModulus, ElasticConstant, C11, C12, C44, Stress, Pressure
GeometricVolume, EquilibriumVolume, LatticeConstant
Thermo / stateTemperature
Generic wrappersCalculatedProperty, Property, AtomAttribute

Custom strings outside this list will still be written to the YAML/JSON verbatim — they just won't resolve to a known ASMO class when loaded into an RDF graph. Sources: atomrdf/datamodels/workflow/property.py, atomrdf/visualize.py, atomrdf/io/reconstruct.py, atomrdf/parsers/pyiron.py.

Property unit

The unit string is suffixed onto http://qudt.org/vocab/unit/{unit} and stored as a QUDT URI — there is no closed enum in atomRDF, so any valid QUDT unit code is accepted. Examples that appear in atomRDF or its examples:

QuantityCommon QUDT codes
EnergyEV, J, KiloCAL
LengthANGSTROM, M, NanoM
VolumeANGSTROM3, M3
TemperatureK, DEG_C
Pressure / stressPA, GigaPA, BAR
ForceN, EV-PER-ANGSTROM
AngleRAD, DEG

Source: atomrdf/datamodels/workflow/property.py line 93.

Defects (sample-level YAML keys)

Place at most one of these as a key inside a sample dict.

FamilyYAML keysTemplateFields
Point defectvacancy, substitutional, interstitialvacancy_template, substitutional_template, interstitial_templateconcentration (atomic fraction), number
Stacking faultstacking_faultstacking_fault_templateplane (Miller indices), displacement (3-vector)
Grain boundarygrain_boundary, tilt_grain_boundary, twist_grain_boundary, symmetric_tilt_grain_boundary, mixed_grain_boundarygrain_boundary_templatesigma, plane, misorientation_angle, rotation_axis
Dislocationdislocation, edge_dislocation, screw_dislocation, mixed_dislocationdislocation_templateline_direction, burgers_vector, slip_system.{slip_direction, slip_plane.normal}, plus character_angle for mixed_dislocation
Defect complexdefect_complexdefect_complex_templateids (list of defect key names), relative_distance

Source: atomrdf/datamodels/structure.py, atomrdf/datamodels/defects/{pointdefects,grainboundary,dislocation,stackingfault,complex}.py.

The frozen set GRAIN_BOUNDARY_TYPE enumerates the five GB key variants.

Material / crystal structure

FieldNotes
material.element_ratio{symbol: fraction}, e.g. {"Fe": 0.8, "Cr": 0.2}
material.crystal_structure.spacegroup_symbolHermann–Mauguin (e.g. "Fm-3m") — no validation
material.crystal_structure.spacegroup_number1–230 — no validation
material.crystal_structure.unit_cell.bravais_latticeURI string. Common values used in atomRDF: https://www.wikidata.org/wiki/Q851536 (bcc), Q3006714 (fcc), Q663314 (hcp), Q2242450 (sc), Q503601 (tetragonal), Q648961 (orthorhombic), Q624543 (monoclinic), Q13362463 (rhombohedral)
material.crystal_structure.unit_cell.lattice_parameter[a, b, c] in Å
material.crystal_structure.unit_cell.angle[α, β, γ] in degrees

Atom attribute

FieldNotes
positionList of [x, y, z] (Å) — for inline small systems
speciesList of element symbols, parallel to position
file_pathPath to a structure file (resolved relative to the YAML file). Preferred for large MD snapshots
file_formatASE format string (e.g. "lammps-data", "lammps-dump-text", "vasp", "aims"); auto-detected when None
file_speciesSpecies order for LAMMPS numeric atom types (e.g. ["Al"])

Source: atomrdf/io/workflow_parser.py_resolve_atom_attribute_from_file.

Software / workflow manager

software:
- uri: https://doi.org/10.1016/j.cpc.2021.108171label: LAMMPSversion: "29Sep2021"workflow_manager:
uri: ...label: ...version: ...

Source: atomrdf/datamodels/workflow/software.py.

Top-level keys

YAML_TOP_LEVEL_KEYS = {computational_sample, workflow, operation, activity (legacy), math_operation}. Plus dataset (DCAT provenance, parsed by atomRDF if present).

Cross-referencing properties in math_operation

A property may carry an id; later math operations reference it by string:

e_def=copy.deepcopy(property_template)
e_def.update({"id": "E_def", "label": "TotalEnergy", "value": -3.20, "unit": "EV"})
e_perf=copy.deepcopy(property_template)
e_perf.update({"id": "E_perf", "label": "TotalEnergy", "value": -3.36, "unit": "EV"})
cd["workflow"][0]["calculated_property"] = [e_def, e_perf]
cd["math_operation"].append({
"type": "Subtraction",
"minuend": "E_def",
"subtrahend": "E_perf",
"result": {"id": "E_form", "label": "FormationEnergy", "unit": "EV",
"associate_to_sample": ["Al_fcc_with_vacancy"]},
})

Validation

violations=cd.validate() # warns on each violation, returns the listcd.validate(strict=True) # raises ValueError on the first violation

validate() currently checks workflow.method, workflow.algorithm, workflow.degrees_of_freedom, workflow.thermodynamic_ensemble, workflow.xc_functional, workflow.interatomic_potential.potential_type, operation.method and math_operation.type. Each violation dict has keys section, index, field, value, allowed.

Examples

Working YAML/JSON examples live in examples/:

  • single_structure_with_workflow.yaml / .json
  • grain_boundary.yaml / .json
  • examples.ipynb — end-to-end notebook

Citation

If you use conceptual_dictionary in your research, please cite the associated paper:

A. Azocar Guzman, S. Menon, T. Hickel, S. Sandfeld. Ontology-based knowledge graph infrastructure for interoperable atomistic simulation data. arXiv:2604.06230 (2026). 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},
}

License

MIT License — see LICENSE.

About

A python dictionary template for storing serialisable metadata

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

conceptual_dictionary

A Python dictionary template for storing serializable computational-materials-science metadata. The schema and controlled vocabularies are kept in lock-step with atomRDF, so YAML/JSON files produced with conceptual_dictionary can be parsed directly by atomRDF's WorkflowParser.

  • Strongly-typed templates for samples, workflows, properties, operations, defects, datasets and math operations.
  • Controlled vocabularies mirrored from atomRDF (methods, ensembles, potentials, XC functionals, …) with optional runtime validation.
  • A dict subclass (ConceptualDict) with YAML/JSON I/O that automatically cleans numpy types and is round-trip safe.

Installation

pip install conceptual-dictionary

From source:

pip install -e .

Quick start

importcopyfromconceptual_dictionaryimport (
ConceptualDict, sample_template, workflow_template,
property_template, dataset_template,
)
cd=ConceptualDict()
# Samplesample=copy.deepcopy(sample_template)
sample["id"] ="Al_fcc"sample["material"]["element_ratio"] = {"Al": 1.0}
sample["material"]["crystal_structure"]["spacegroup_symbol"] ="Fm-3m"sample["material"]["crystal_structure"]["spacegroup_number"] =225sample["material"]["crystal_structure"]["unit_cell"]["lattice_parameter"] = [4.05, 4.05, 4.05]
sample["material"]["crystal_structure"]["unit_cell"]["angle"] = [90.0, 90.0, 90.0]
cd["computational_sample"].append(sample)
# Workflowwf=copy.deepcopy(workflow_template)
wf["method"] ="MolecularStatics"wf["interatomic_potential"] = {"potential_type": "eam/alloy",
"uri": "https://doi.org/10.1103/physrevb.59.3393"}
wf["input_sample"] = ["Al_fcc"]
wf["output_sample"] = ["Al_fcc"]
energy=copy.deepcopy(property_template)
energy.update({"label": "EquilibriumEnergy", "value": -3.36, "unit": "EV",
"associate_to_sample": ["Al_fcc"]})
wf["calculated_property"] = [energy]
cd["workflow"].append(wf)
# Optional dataset provenanceds=copy.deepcopy(dataset_template)
ds["title"] ="Al FCC reference"ds["samples"] = ["Al_fcc"]
cd["dataset"] =dscd.validate(strict=True) # raises on first vocab violationcd.to_yaml("metadata.yaml")
cd.to_json("metadata.json", indent=2)

Templates

Every template is a plain dict. Use copy.deepcopy before mutating, then populate only the fields that apply (everything is optional unless marked Required).

ImportPurpose
sample_templateA computational sample (material + simulation cell + atoms)
property_templateA single calculated/input/output property
workflow_templateA simulation/calculation step
dataset_templateDCAT dataset provenance (creators, publication, sample IDs)
operation_templateAtomic-scale transform (DeleteAtom, Rotate, Translate, Shear, …)
math_operation_templateArithmetic activity (Subtraction, Addition, Multiplication, Division, Exponentiation)
vacancy_template, substitutional_template, interstitial_templatePoint defects
stacking_fault_templateStacking fault
grain_boundary_templateGrain boundary (5 YAML key variants)
dislocation_templateDislocation (4 YAML key variants)
defect_complex_templateMulti-defect complex
full_sample_template, full_yaml_templateReference templates with every supported field

ConceptualDict

A dict subclass pre-populated with the four top-level sections atomRDF reads:

ConceptualDict() == {
"computational_sample": [],
"workflow": [],
"operation": [],
"math_operation": [],
}

Add an optional "dataset" key (or anything else) at any time.

Methods

MethodNotes
to_yaml(filepath, sort_keys=False)numpy → native conversion, preserves insertion order by default
from_yaml(filepath)(classmethod)Loads any partial YAML (missing top-level keys keep their default empty lists)
to_json(filepath, sort_keys=False, indent=2)Same numpy cleanup as YAML
from_json(filepath)(classmethod)Symmetric counterpart
validate(strict=False)Returns a list of violation dicts {section, index, field, value, allowed}. With strict=True raises ValueError on the first violation
generate_id(length=7)Collision-resistant random ID using os.urandom (safe against third-party random.seed())

Numpy-friendly serialization

Both to_yaml and to_json recursively convert np.ndarray, np.floating, np.integer, np.bool_ and any unknown object (via str(obj)) to JSON/YAML native types — so values coming from ASE / pyiron / LAMMPS need no pre-processing.

File layout produced

The full top-level YAML/JSON shape consumed by atomRDF:

dataset: # optional, dcat:Dataset provenanceidentifier: ...title: ...creators: [{id, name}, ...]publication: {id, identifier, title}samples: [<sample id>, ...]computational_sample: # list of sample dicts
- id: ...material: {...}simulation_cell: {...}atom_attribute: {...}calculated_property: [...]# optional defect blocks (see Defects below)workflow: # list of workflow steps
- method: ...algorithm: ......operation: # list of atomic-scale transforms (legacy alias: 'activity')
- method: ...input_sample: ...output_sample: ...math_operation: # list of arithmetic activities
- type: ...result: {...}

Controlled vocabularies (cross-referenced with atomRDF)

The following sections enumerate every string atomRDF accepts for each field. Aliases are marked → canonical. Anything outside these sets is rejected by ConceptualDict.validate() (and silently ignored or errored by atomRDF depending on the field).

The frozen sets are also importable and useful for building UIs:

fromconceptual_dictionaryimport (
METHOD, ALGORITHM, DEGREES_OF_FREEDOM, THERMODYNAMIC_ENSEMBLE,
POTENTIAL_TYPE, XC_FUNCTIONAL, OPERATION_METHOD,
MATH_OPERATION_TYPE, GRAIN_BOUNDARY_TYPE, YAML_TOP_LEVEL_KEYS,
CONTROLLED_VALUES,
)

Workflow

FieldAccepted valuesatomRDF source
workflow.methodMolecularDynamics, MolecularStatics, DensityFunctionalTheoryatomrdf/datamodels/workflow/method.py (method_map)
workflow.algorithmEquationOfStateFit, QuasiHarmonicApproximation, ThermodynamicIntegration, ANNNIModel, TensileTest, CompressionTest; alias UniaxialTensionTensileTestatomrdf/datamodels/workflow/algorithm.py (algorithm_map)
workflow.degrees_of_freedom(list)AtomicPositionRelaxation, CellVolumeRelaxation, CellShapeRelaxationatomrdf/datamodels/workflow/dof.py (dof_map)
workflow.thermodynamic_ensembleCanonicalEnsemble (NVT), MicrocanonicalEnsemble (NVE), IsothermalIsobaricEnsemble (NPT), IsoenthalpicIsobaricEnsemble (NPH), GrandCanonicalEnsemble (μVT)atomrdf/datamodels/workflow/ensemble.py (ensemble_map)
workflow.xc_functionalLDA, GGA, PBE (→ GGA), LocalDensityApproximation, GeneralizedGradientApproximation, PerdewBurkeErnzerhof (→ GGA), HybridFunctional, HybridGeneralizedGradientApproximation, HybridMetaGeneralizedGradientApproximation, MetaGeneralizedGradientApproximationatomrdf/datamodels/workflow/xcfunctional.py (xc_map)

Interatomic potential type

workflow.interatomic_potential.potential_type accepts the canonical class name or any short alias atomRDF understands:

FamilyCanonicalAliases
GenericInteratomicPotential
EAMEmbeddedAtomModelEAM, eam, eam/alloy, eam/fs
MEAMModifiedEmbeddedAtomModelMEAM, meam
Lennard–JonesLennardJonesPotentialLJ, lj
Machine learningMachineLearningPotentialACE, pace, HDNNP, hdnnp, GRACE, grace

Source: atomrdf/datamodels/workflow/potential.py (potential_map).

Operation methods

operation.method (legacy top-level key activity is also accepted):

DeleteAtom, SubstituteAtom, AddAtom, Rotate (alias Rotation), Translate (alias Translation), Shear.

Source: atomrdf/io/workflow_parser.py (OPERATION_MAP).

Math operations

math_operation.type: Subtraction, Addition, Multiplication, Division, Exponentiation. Operands are either a scalar or a property id string referencing a previously declared calculated_property / input_parameter / output_parameter:

typeOperand fields
Subtractionminuend, subtrahend
Additionaddend(list)
Multiplicationfactor(list)
Divisiondividend, divisor
Exponentiationbase, exponent

Source: atomrdf/datamodels/workflow/math_operations.py.

Property label / basename

label and basename on a property are not validated as a closed enum, but at RDF generation time atomRDF resolves basename against the ASMO ontology via getattr(ASMO, basename), so the value should match an ASMO class. The following terms appear in atomRDF's source / parsers / visualizer and are known to round-trip correctly:

CategoryRecognised terms
EnergiesTotalEnergy, Energy, EquilibriumEnergy, CohesiveEnergy, FormationEnergy, VacancyFormationEnergy, GrainBoundaryEnergy, SurfaceEnergy, StackingFaultEnergy, SegregationEnergy, WorkOfSeparation, MigrationEnergy
MechanicalBulkModulus, ElasticConstant, C11, C12, C44, Stress, Pressure
GeometricVolume, EquilibriumVolume, LatticeConstant
Thermo / stateTemperature
Generic wrappersCalculatedProperty, Property, AtomAttribute

Custom strings outside this list will still be written to the YAML/JSON verbatim — they just won't resolve to a known ASMO class when loaded into an RDF graph. Sources: atomrdf/datamodels/workflow/property.py, atomrdf/visualize.py, atomrdf/io/reconstruct.py, atomrdf/parsers/pyiron.py.

Property unit

The unit string is suffixed onto http://qudt.org/vocab/unit/{unit} and stored as a QUDT URI — there is no closed enum in atomRDF, so any valid QUDT unit code is accepted. Examples that appear in atomRDF or its examples:

QuantityCommon QUDT codes
EnergyEV, J, KiloCAL
LengthANGSTROM, M, NanoM
VolumeANGSTROM3, M3
TemperatureK, DEG_C
Pressure / stressPA, GigaPA, BAR
ForceN, EV-PER-ANGSTROM
AngleRAD, DEG

Source: atomrdf/datamodels/workflow/property.py line 93.

Defects (sample-level YAML keys)

Place at most one of these as a key inside a sample dict.

FamilyYAML keysTemplateFields
Point defectvacancy, substitutional, interstitialvacancy_template, substitutional_template, interstitial_templateconcentration (atomic fraction), number
Stacking faultstacking_faultstacking_fault_templateplane (Miller indices), displacement (3-vector)
Grain boundarygrain_boundary, tilt_grain_boundary, twist_grain_boundary, symmetric_tilt_grain_boundary, mixed_grain_boundarygrain_boundary_templatesigma, plane, misorientation_angle, rotation_axis
Dislocationdislocation, edge_dislocation, screw_dislocation, mixed_dislocationdislocation_templateline_direction, burgers_vector, slip_system.{slip_direction, slip_plane.normal}, plus character_angle for mixed_dislocation
Defect complexdefect_complexdefect_complex_templateids (list of defect key names), relative_distance

Source: atomrdf/datamodels/structure.py, atomrdf/datamodels/defects/{pointdefects,grainboundary,dislocation,stackingfault,complex}.py.

The frozen set GRAIN_BOUNDARY_TYPE enumerates the five GB key variants.

Material / crystal structure

FieldNotes
material.element_ratio{symbol: fraction}, e.g. {"Fe": 0.8, "Cr": 0.2}
material.crystal_structure.spacegroup_symbolHermann–Mauguin (e.g. "Fm-3m") — no validation
material.crystal_structure.spacegroup_number1–230 — no validation
material.crystal_structure.unit_cell.bravais_latticeURI string. Common values used in atomRDF: https://www.wikidata.org/wiki/Q851536 (bcc), Q3006714 (fcc), Q663314 (hcp), Q2242450 (sc), Q503601 (tetragonal), Q648961 (orthorhombic), Q624543 (monoclinic), Q13362463 (rhombohedral)
material.crystal_structure.unit_cell.lattice_parameter[a, b, c] in Å
material.crystal_structure.unit_cell.angle[α, β, γ] in degrees

Atom attribute

FieldNotes
positionList of [x, y, z] (Å) — for inline small systems
speciesList of element symbols, parallel to position
file_pathPath to a structure file (resolved relative to the YAML file). Preferred for large MD snapshots
file_formatASE format string (e.g. "lammps-data", "lammps-dump-text", "vasp", "aims"); auto-detected when None
file_speciesSpecies order for LAMMPS numeric atom types (e.g. ["Al"])

Source: atomrdf/io/workflow_parser.py_resolve_atom_attribute_from_file.

Software / workflow manager

software:
- uri: https://doi.org/10.1016/j.cpc.2021.108171label: LAMMPSversion: "29Sep2021"workflow_manager:
uri: ...label: ...version: ...

Source: atomrdf/datamodels/workflow/software.py.

Top-level keys

YAML_TOP_LEVEL_KEYS = {computational_sample, workflow, operation, activity (legacy), math_operation}. Plus dataset (DCAT provenance, parsed by atomRDF if present).

Cross-referencing properties in math_operation

A property may carry an id; later math operations reference it by string:

e_def=copy.deepcopy(property_template)
e_def.update({"id": "E_def", "label": "TotalEnergy", "value": -3.20, "unit": "EV"})
e_perf=copy.deepcopy(property_template)
e_perf.update({"id": "E_perf", "label": "TotalEnergy", "value": -3.36, "unit": "EV"})
cd["workflow"][0]["calculated_property"] = [e_def, e_perf]
cd["math_operation"].append({
"type": "Subtraction",
"minuend": "E_def",
"subtrahend": "E_perf",
"result": {"id": "E_form", "label": "FormationEnergy", "unit": "EV",
"associate_to_sample": ["Al_fcc_with_vacancy"]},
})

Validation

violations=cd.validate() # warns on each violation, returns the listcd.validate(strict=True) # raises ValueError on the first violation

validate() currently checks workflow.method, workflow.algorithm, workflow.degrees_of_freedom, workflow.thermodynamic_ensemble, workflow.xc_functional, workflow.interatomic_potential.potential_type, operation.method and math_operation.type. Each violation dict has keys section, index, field, value, allowed.

Examples

Working YAML/JSON examples live in examples/:

  • single_structure_with_workflow.yaml / .json
  • grain_boundary.yaml / .json
  • examples.ipynb — end-to-end notebook

Citation

If you use conceptual_dictionary in your research, please cite the associated paper:

A. Azocar Guzman, S. Menon, T. Hickel, S. Sandfeld. Ontology-based knowledge graph infrastructure for interoperable atomistic simulation data. arXiv:2604.06230 (2026). 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},
}

License

MIT License — see LICENSE.

About

A python dictionary template for storing serialisable metadata

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

conceptual_dictionary

A Python dictionary template for storing serializable computational-materials-science metadata. The schema and controlled vocabularies are kept in lock-step with atomRDF, so YAML/JSON files produced with conceptual_dictionary can be parsed directly by atomRDF's WorkflowParser.

  • Strongly-typed templates for samples, workflows, properties, operations, defects, datasets and math operations.
  • Controlled vocabularies mirrored from atomRDF (methods, ensembles, potentials, XC functionals, …) with optional runtime validation.
  • A dict subclass (ConceptualDict) with YAML/JSON I/O that automatically cleans numpy types and is round-trip safe.

Installation

pip install conceptual-dictionary

From source:

pip install -e .

Quick start

importcopyfromconceptual_dictionaryimport (
ConceptualDict, sample_template, workflow_template,
property_template, dataset_template,
)
cd=ConceptualDict()
# Samplesample=copy.deepcopy(sample_template)
sample["id"] ="Al_fcc"sample["material"]["element_ratio"] = {"Al": 1.0}
sample["material"]["crystal_structure"]["spacegroup_symbol"] ="Fm-3m"sample["material"]["crystal_structure"]["spacegroup_number"] =225sample["material"]["crystal_structure"]["unit_cell"]["lattice_parameter"] = [4.05, 4.05, 4.05]
sample["material"]["crystal_structure"]["unit_cell"]["angle"] = [90.0, 90.0, 90.0]
cd["computational_sample"].append(sample)
# Workflowwf=copy.deepcopy(workflow_template)
wf["method"] ="MolecularStatics"wf["interatomic_potential"] = {"potential_type": "eam/alloy",
"uri": "https://doi.org/10.1103/physrevb.59.3393"}
wf["input_sample"] = ["Al_fcc"]
wf["output_sample"] = ["Al_fcc"]
energy=copy.deepcopy(property_template)
energy.update({"label": "EquilibriumEnergy", "value": -3.36, "unit": "EV",
"associate_to_sample": ["Al_fcc"]})
wf["calculated_property"] = [energy]
cd["workflow"].append(wf)
# Optional dataset provenanceds=copy.deepcopy(dataset_template)
ds["title"] ="Al FCC reference"ds["samples"] = ["Al_fcc"]
cd["dataset"] =dscd.validate(strict=True) # raises on first vocab violationcd.to_yaml("metadata.yaml")
cd.to_json("metadata.json", indent=2)

Templates

Every template is a plain dict. Use copy.deepcopy before mutating, then populate only the fields that apply (everything is optional unless marked Required).

ImportPurpose
sample_templateA computational sample (material + simulation cell + atoms)
property_templateA single calculated/input/output property
workflow_templateA simulation/calculation step
dataset_templateDCAT dataset provenance (creators, publication, sample IDs)
operation_templateAtomic-scale transform (DeleteAtom, Rotate, Translate, Shear, …)
math_operation_templateArithmetic activity (Subtraction, Addition, Multiplication, Division, Exponentiation)
vacancy_template, substitutional_template, interstitial_templatePoint defects
stacking_fault_templateStacking fault
grain_boundary_templateGrain boundary (5 YAML key variants)
dislocation_templateDislocation (4 YAML key variants)
defect_complex_templateMulti-defect complex
full_sample_template, full_yaml_templateReference templates with every supported field

ConceptualDict

A dict subclass pre-populated with the four top-level sections atomRDF reads:

ConceptualDict() == {
"computational_sample": [],
"workflow": [],
"operation": [],
"math_operation": [],
}

Add an optional "dataset" key (or anything else) at any time.

Methods

MethodNotes
to_yaml(filepath, sort_keys=False)numpy → native conversion, preserves insertion order by default
from_yaml(filepath)(classmethod)Loads any partial YAML (missing top-level keys keep their default empty lists)
to_json(filepath, sort_keys=False, indent=2)Same numpy cleanup as YAML
from_json(filepath)(classmethod)Symmetric counterpart
validate(strict=False)Returns a list of violation dicts {section, index, field, value, allowed}. With strict=True raises ValueError on the first violation
generate_id(length=7)Collision-resistant random ID using os.urandom (safe against third-party random.seed())

Numpy-friendly serialization

Both to_yaml and to_json recursively convert np.ndarray, np.floating, np.integer, np.bool_ and any unknown object (via str(obj)) to JSON/YAML native types — so values coming from ASE / pyiron / LAMMPS need no pre-processing.

File layout produced

The full top-level YAML/JSON shape consumed by atomRDF:

dataset: # optional, dcat:Dataset provenanceidentifier: ...title: ...creators: [{id, name}, ...]publication: {id, identifier, title}samples: [<sample id>, ...]computational_sample: # list of sample dicts
- id: ...material: {...}simulation_cell: {...}atom_attribute: {...}calculated_property: [...]# optional defect blocks (see Defects below)workflow: # list of workflow steps
- method: ...algorithm: ......operation: # list of atomic-scale transforms (legacy alias: 'activity')
- method: ...input_sample: ...output_sample: ...math_operation: # list of arithmetic activities
- type: ...result: {...}

Controlled vocabularies (cross-referenced with atomRDF)

The following sections enumerate every string atomRDF accepts for each field. Aliases are marked → canonical. Anything outside these sets is rejected by ConceptualDict.validate() (and silently ignored or errored by atomRDF depending on the field).

The frozen sets are also importable and useful for building UIs:

fromconceptual_dictionaryimport (
METHOD, ALGORITHM, DEGREES_OF_FREEDOM, THERMODYNAMIC_ENSEMBLE,
POTENTIAL_TYPE, XC_FUNCTIONAL, OPERATION_METHOD,
MATH_OPERATION_TYPE, GRAIN_BOUNDARY_TYPE, YAML_TOP_LEVEL_KEYS,
CONTROLLED_VALUES,
)

Workflow

FieldAccepted valuesatomRDF source
workflow.methodMolecularDynamics, MolecularStatics, DensityFunctionalTheoryatomrdf/datamodels/workflow/method.py (method_map)
workflow.algorithmEquationOfStateFit, QuasiHarmonicApproximation, ThermodynamicIntegration, ANNNIModel, TensileTest, CompressionTest; alias UniaxialTensionTensileTestatomrdf/datamodels/workflow/algorithm.py (algorithm_map)
workflow.degrees_of_freedom(list)AtomicPositionRelaxation, CellVolumeRelaxation, CellShapeRelaxationatomrdf/datamodels/workflow/dof.py (dof_map)
workflow.thermodynamic_ensembleCanonicalEnsemble (NVT), MicrocanonicalEnsemble (NVE), IsothermalIsobaricEnsemble (NPT), IsoenthalpicIsobaricEnsemble (NPH), GrandCanonicalEnsemble (μVT)atomrdf/datamodels/workflow/ensemble.py (ensemble_map)
workflow.xc_functionalLDA, GGA, PBE (→ GGA), LocalDensityApproximation, GeneralizedGradientApproximation, PerdewBurkeErnzerhof (→ GGA), HybridFunctional, HybridGeneralizedGradientApproximation, HybridMetaGeneralizedGradientApproximation, MetaGeneralizedGradientApproximationatomrdf/datamodels/workflow/xcfunctional.py (xc_map)

Interatomic potential type

workflow.interatomic_potential.potential_type accepts the canonical class name or any short alias atomRDF understands:

FamilyCanonicalAliases
GenericInteratomicPotential
EAMEmbeddedAtomModelEAM, eam, eam/alloy, eam/fs
MEAMModifiedEmbeddedAtomModelMEAM, meam
Lennard–JonesLennardJonesPotentialLJ, lj
Machine learningMachineLearningPotentialACE, pace, HDNNP, hdnnp, GRACE, grace

Source: atomrdf/datamodels/workflow/potential.py (potential_map).

Operation methods

operation.method (legacy top-level key activity is also accepted):

DeleteAtom, SubstituteAtom, AddAtom, Rotate (alias Rotation), Translate (alias Translation), Shear.

Source: atomrdf/io/workflow_parser.py (OPERATION_MAP).

Math operations

math_operation.type: Subtraction, Addition, Multiplication, Division, Exponentiation. Operands are either a scalar or a property id string referencing a previously declared calculated_property / input_parameter / output_parameter:

typeOperand fields
Subtractionminuend, subtrahend
Additionaddend(list)
Multiplicationfactor(list)
Divisiondividend, divisor
Exponentiationbase, exponent

Source: atomrdf/datamodels/workflow/math_operations.py.

Property label / basename

label and basename on a property are not validated as a closed enum, but at RDF generation time atomRDF resolves basename against the ASMO ontology via getattr(ASMO, basename), so the value should match an ASMO class. The following terms appear in atomRDF's source / parsers / visualizer and are known to round-trip correctly:

CategoryRecognised terms
EnergiesTotalEnergy, Energy, EquilibriumEnergy, CohesiveEnergy, FormationEnergy, VacancyFormationEnergy, GrainBoundaryEnergy, SurfaceEnergy, StackingFaultEnergy, SegregationEnergy, WorkOfSeparation, MigrationEnergy
MechanicalBulkModulus, ElasticConstant, C11, C12, C44, Stress, Pressure
GeometricVolume, EquilibriumVolume, LatticeConstant
Thermo / stateTemperature
Generic wrappersCalculatedProperty, Property, AtomAttribute

Custom strings outside this list will still be written to the YAML/JSON verbatim — they just won't resolve to a known ASMO class when loaded into an RDF graph. Sources: atomrdf/datamodels/workflow/property.py, atomrdf/visualize.py, atomrdf/io/reconstruct.py, atomrdf/parsers/pyiron.py.

Property unit

The unit string is suffixed onto http://qudt.org/vocab/unit/{unit} and stored as a QUDT URI — there is no closed enum in atomRDF, so any valid QUDT unit code is accepted. Examples that appear in atomRDF or its examples:

QuantityCommon QUDT codes
EnergyEV, J, KiloCAL
LengthANGSTROM, M, NanoM
VolumeANGSTROM3, M3
TemperatureK, DEG_C
Pressure / stressPA, GigaPA, BAR
ForceN, EV-PER-ANGSTROM
AngleRAD, DEG

Source: atomrdf/datamodels/workflow/property.py line 93.

Defects (sample-level YAML keys)

Place at most one of these as a key inside a sample dict.

FamilyYAML keysTemplateFields
Point defectvacancy, substitutional, interstitialvacancy_template, substitutional_template, interstitial_templateconcentration (atomic fraction), number
Stacking faultstacking_faultstacking_fault_templateplane (Miller indices), displacement (3-vector)
Grain boundarygrain_boundary, tilt_grain_boundary, twist_grain_boundary, symmetric_tilt_grain_boundary, mixed_grain_boundarygrain_boundary_templatesigma, plane, misorientation_angle, rotation_axis
Dislocationdislocation, edge_dislocation, screw_dislocation, mixed_dislocationdislocation_templateline_direction, burgers_vector, slip_system.{slip_direction, slip_plane.normal}, plus character_angle for mixed_dislocation
Defect complexdefect_complexdefect_complex_templateids (list of defect key names), relative_distance

Source: atomrdf/datamodels/structure.py, atomrdf/datamodels/defects/{pointdefects,grainboundary,dislocation,stackingfault,complex}.py.

The frozen set GRAIN_BOUNDARY_TYPE enumerates the five GB key variants.

Material / crystal structure

FieldNotes
material.element_ratio{symbol: fraction}, e.g. {"Fe": 0.8, "Cr": 0.2}
material.crystal_structure.spacegroup_symbolHermann–Mauguin (e.g. "Fm-3m") — no validation
material.crystal_structure.spacegroup_number1–230 — no validation
material.crystal_structure.unit_cell.bravais_latticeURI string. Common values used in atomRDF: https://www.wikidata.org/wiki/Q851536 (bcc), Q3006714 (fcc), Q663314 (hcp), Q2242450 (sc), Q503601 (tetragonal), Q648961 (orthorhombic), Q624543 (monoclinic), Q13362463 (rhombohedral)
material.crystal_structure.unit_cell.lattice_parameter[a, b, c] in Å
material.crystal_structure.unit_cell.angle[α, β, γ] in degrees

Atom attribute

FieldNotes
positionList of [x, y, z] (Å) — for inline small systems
speciesList of element symbols, parallel to position
file_pathPath to a structure file (resolved relative to the YAML file). Preferred for large MD snapshots
file_formatASE format string (e.g. "lammps-data", "lammps-dump-text", "vasp", "aims"); auto-detected when None
file_speciesSpecies order for LAMMPS numeric atom types (e.g. ["Al"])

Source: atomrdf/io/workflow_parser.py_resolve_atom_attribute_from_file.

Software / workflow manager

software:
- uri: https://doi.org/10.1016/j.cpc.2021.108171label: LAMMPSversion: "29Sep2021"workflow_manager:
uri: ...label: ...version: ...

Source: atomrdf/datamodels/workflow/software.py.

Top-level keys

YAML_TOP_LEVEL_KEYS = {computational_sample, workflow, operation, activity (legacy), math_operation}. Plus dataset (DCAT provenance, parsed by atomRDF if present).

Cross-referencing properties in math_operation

A property may carry an id; later math operations reference it by string:

e_def=copy.deepcopy(property_template)
e_def.update({"id": "E_def", "label": "TotalEnergy", "value": -3.20, "unit": "EV"})
e_perf=copy.deepcopy(property_template)
e_perf.update({"id": "E_perf", "label": "TotalEnergy", "value": -3.36, "unit": "EV"})
cd["workflow"][0]["calculated_property"] = [e_def, e_perf]
cd["math_operation"].append({
"type": "Subtraction",
"minuend": "E_def",
"subtrahend": "E_perf",
"result": {"id": "E_form", "label": "FormationEnergy", "unit": "EV",
"associate_to_sample": ["Al_fcc_with_vacancy"]},
})

Validation

violations=cd.validate() # warns on each violation, returns the listcd.validate(strict=True) # raises ValueError on the first violation

validate() currently checks workflow.method, workflow.algorithm, workflow.degrees_of_freedom, workflow.thermodynamic_ensemble, workflow.xc_functional, workflow.interatomic_potential.potential_type, operation.method and math_operation.type. Each violation dict has keys section, index, field, value, allowed.

Examples

Working YAML/JSON examples live in examples/:

  • single_structure_with_workflow.yaml / .json
  • grain_boundary.yaml / .json
  • examples.ipynb — end-to-end notebook

Citation

If you use conceptual_dictionary in your research, please cite the associated paper:

A. Azocar Guzman, S. Menon, T. Hickel, S. Sandfeld. Ontology-based knowledge graph infrastructure for interoperable atomistic simulation data. arXiv:2604.06230 (2026). 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},
}

License

MIT License — see LICENSE.

About

A python dictionary template for storing serialisable metadata

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Repository files navigation

conceptual_dictionary

A Python dictionary template for storing serializable computational-materials-science metadata. The schema and controlled vocabularies are kept in lock-step with atomRDF, so YAML/JSON files produced with conceptual_dictionary can be parsed directly by atomRDF's WorkflowParser.

  • Strongly-typed templates for samples, workflows, properties, operations, defects, datasets and math operations.
  • Controlled vocabularies mirrored from atomRDF (methods, ensembles, potentials, XC functionals, …) with optional runtime validation.
  • A dict subclass (ConceptualDict) with YAML/JSON I/O that automatically cleans numpy types and is round-trip safe.

Installation

pip install conceptual-dictionary

From source:

pip install -e .

Quick start

importcopyfromconceptual_dictionaryimport (
ConceptualDict, sample_template, workflow_template,
property_template, dataset_template,
)
cd=ConceptualDict()
# Samplesample=copy.deepcopy(sample_template)
sample["id"] ="Al_fcc"sample["material"]["element_ratio"] = {"Al": 1.0}
sample["material"]["crystal_structure"]["spacegroup_symbol"] ="Fm-3m"sample["material"]["crystal_structure"]["spacegroup_number"] =225sample["material"]["crystal_structure"]["unit_cell"]["lattice_parameter"] = [4.05, 4.05, 4.05]
sample["material"]["crystal_structure"]["unit_cell"]["angle"] = [90.0, 90.0, 90.0]
cd["computational_sample"].append(sample)
# Workflowwf=copy.deepcopy(workflow_template)
wf["method"] ="MolecularStatics"wf["interatomic_potential"] = {"potential_type": "eam/alloy",
"uri": "https://doi.org/10.1103/physrevb.59.3393"}
wf["input_sample"] = ["Al_fcc"]
wf["output_sample"] = ["Al_fcc"]
energy=copy.deepcopy(property_template)
energy.update({"label": "EquilibriumEnergy", "value": -3.36, "unit": "EV",
"associate_to_sample": ["Al_fcc"]})
wf["calculated_property"] = [energy]
cd["workflow"].append(wf)
# Optional dataset provenanceds=copy.deepcopy(dataset_template)
ds["title"] ="Al FCC reference"ds["samples"] = ["Al_fcc"]
cd["dataset"] =dscd.validate(strict=True) # raises on first vocab violationcd.to_yaml("metadata.yaml")
cd.to_json("metadata.json", indent=2)

Templates

Every template is a plain dict. Use copy.deepcopy before mutating, then populate only the fields that apply (everything is optional unless marked Required).

ImportPurpose
sample_templateA computational sample (material + simulation cell + atoms)
property_templateA single calculated/input/output property
workflow_templateA simulation/calculation step
dataset_templateDCAT dataset provenance (creators, publication, sample IDs)
operation_templateAtomic-scale transform (DeleteAtom, Rotate, Translate, Shear, …)
math_operation_templateArithmetic activity (Subtraction, Addition, Multiplication, Division, Exponentiation)
vacancy_template, substitutional_template, interstitial_templatePoint defects
stacking_fault_templateStacking fault
grain_boundary_templateGrain boundary (5 YAML key variants)
dislocation_templateDislocation (4 YAML key variants)
defect_complex_templateMulti-defect complex
full_sample_template, full_yaml_templateReference templates with every supported field

ConceptualDict

A dict subclass pre-populated with the four top-level sections atomRDF reads:

ConceptualDict() == {
"computational_sample": [],
"workflow": [],
"operation": [],
"math_operation": [],
}

Add an optional "dataset" key (or anything else) at any time.

Methods

MethodNotes
to_yaml(filepath, sort_keys=False)numpy → native conversion, preserves insertion order by default
from_yaml(filepath)(classmethod)Loads any partial YAML (missing top-level keys keep their default empty lists)
to_json(filepath, sort_keys=False, indent=2)Same numpy cleanup as YAML
from_json(filepath)(classmethod)Symmetric counterpart
validate(strict=False)Returns a list of violation dicts {section, index, field, value, allowed}. With strict=True raises ValueError on the first violation
generate_id(length=7)Collision-resistant random ID using os.urandom (safe against third-party random.seed())

Numpy-friendly serialization

Both to_yaml and to_json recursively convert np.ndarray, np.floating, np.integer, np.bool_ and any unknown object (via str(obj)) to JSON/YAML native types — so values coming from ASE / pyiron / LAMMPS need no pre-processing.

File layout produced

The full top-level YAML/JSON shape consumed by atomRDF:

dataset: # optional, dcat:Dataset provenanceidentifier: ...title: ...creators: [{id, name}, ...]publication: {id, identifier, title}samples: [<sample id>, ...]computational_sample: # list of sample dicts
- id: ...material: {...}simulation_cell: {...}atom_attribute: {...}calculated_property: [...]# optional defect blocks (see Defects below)workflow: # list of workflow steps
- method: ...algorithm: ......operation: # list of atomic-scale transforms (legacy alias: 'activity')
- method: ...input_sample: ...output_sample: ...math_operation: # list of arithmetic activities
- type: ...result: {...}

Controlled vocabularies (cross-referenced with atomRDF)

The following sections enumerate every string atomRDF accepts for each field. Aliases are marked → canonical. Anything outside these sets is rejected by ConceptualDict.validate() (and silently ignored or errored by atomRDF depending on the field).

The frozen sets are also importable and useful for building UIs:

fromconceptual_dictionaryimport (
METHOD, ALGORITHM, DEGREES_OF_FREEDOM, THERMODYNAMIC_ENSEMBLE,
POTENTIAL_TYPE, XC_FUNCTIONAL, OPERATION_METHOD,
MATH_OPERATION_TYPE, GRAIN_BOUNDARY_TYPE, YAML_TOP_LEVEL_KEYS,
CONTROLLED_VALUES,
)

Workflow

FieldAccepted valuesatomRDF source
workflow.methodMolecularDynamics, MolecularStatics, DensityFunctionalTheoryatomrdf/datamodels/workflow/method.py (method_map)
workflow.algorithmEquationOfStateFit, QuasiHarmonicApproximation, ThermodynamicIntegration, ANNNIModel, TensileTest, CompressionTest; alias UniaxialTensionTensileTestatomrdf/datamodels/workflow/algorithm.py (algorithm_map)
workflow.degrees_of_freedom(list)AtomicPositionRelaxation, CellVolumeRelaxation, CellShapeRelaxationatomrdf/datamodels/workflow/dof.py (dof_map)
workflow.thermodynamic_ensembleCanonicalEnsemble (NVT), MicrocanonicalEnsemble (NVE), IsothermalIsobaricEnsemble (NPT), IsoenthalpicIsobaricEnsemble (NPH), GrandCanonicalEnsemble (μVT)atomrdf/datamodels/workflow/ensemble.py (ensemble_map)
workflow.xc_functionalLDA, GGA, PBE (→ GGA), LocalDensityApproximation, GeneralizedGradientApproximation, PerdewBurkeErnzerhof (→ GGA), HybridFunctional, HybridGeneralizedGradientApproximation, HybridMetaGeneralizedGradientApproximation, MetaGeneralizedGradientApproximationatomrdf/datamodels/workflow/xcfunctional.py (xc_map)

Interatomic potential type

workflow.interatomic_potential.potential_type accepts the canonical class name or any short alias atomRDF understands:

FamilyCanonicalAliases
GenericInteratomicPotential
EAMEmbeddedAtomModelEAM, eam, eam/alloy, eam/fs
MEAMModifiedEmbeddedAtomModelMEAM, meam
Lennard–JonesLennardJonesPotentialLJ, lj
Machine learningMachineLearningPotentialACE, pace, HDNNP, hdnnp, GRACE, grace

Source: atomrdf/datamodels/workflow/potential.py (potential_map).

Operation methods

operation.method (legacy top-level key activity is also accepted):

DeleteAtom, SubstituteAtom, AddAtom, Rotate (alias Rotation), Translate (alias Translation), Shear.

Source: atomrdf/io/workflow_parser.py (OPERATION_MAP).

Math operations

math_operation.type: Subtraction, Addition, Multiplication, Division, Exponentiation. Operands are either a scalar or a property id string referencing a previously declared calculated_property / input_parameter / output_parameter:

typeOperand fields
Subtractionminuend, subtrahend
Additionaddend(list)
Multiplicationfactor(list)
Divisiondividend, divisor
Exponentiationbase, exponent

Source: atomrdf/datamodels/workflow/math_operations.py.

Property label / basename

label and basename on a property are not validated as a closed enum, but at RDF generation time atomRDF resolves basename against the ASMO ontology via getattr(ASMO, basename), so the value should match an ASMO class. The following terms appear in atomRDF's source / parsers / visualizer and are known to round-trip correctly:

CategoryRecognised terms
EnergiesTotalEnergy, Energy, EquilibriumEnergy, CohesiveEnergy, FormationEnergy, VacancyFormationEnergy, GrainBoundaryEnergy, SurfaceEnergy, StackingFaultEnergy, SegregationEnergy, WorkOfSeparation, MigrationEnergy
MechanicalBulkModulus, ElasticConstant, C11, C12, C44, Stress, Pressure
GeometricVolume, EquilibriumVolume, LatticeConstant
Thermo / stateTemperature
Generic wrappersCalculatedProperty, Property, AtomAttribute

Custom strings outside this list will still be written to the YAML/JSON verbatim — they just won't resolve to a known ASMO class when loaded into an RDF graph. Sources: atomrdf/datamodels/workflow/property.py, atomrdf/visualize.py, atomrdf/io/reconstruct.py, atomrdf/parsers/pyiron.py.

Property unit

The unit string is suffixed onto http://qudt.org/vocab/unit/{unit} and stored as a QUDT URI — there is no closed enum in atomRDF, so any valid QUDT unit code is accepted. Examples that appear in atomRDF or its examples:

QuantityCommon QUDT codes
EnergyEV, J, KiloCAL
LengthANGSTROM, M, NanoM
VolumeANGSTROM3, M3
TemperatureK, DEG_C
Pressure / stressPA, GigaPA, BAR
ForceN, EV-PER-ANGSTROM
AngleRAD, DEG

Source: atomrdf/datamodels/workflow/property.py line 93.

Defects (sample-level YAML keys)

Place at most one of these as a key inside a sample dict.

FamilyYAML keysTemplateFields
Point defectvacancy, substitutional, interstitialvacancy_template, substitutional_template, interstitial_templateconcentration (atomic fraction), number
Stacking faultstacking_faultstacking_fault_templateplane (Miller indices), displacement (3-vector)
Grain boundarygrain_boundary, tilt_grain_boundary, twist_grain_boundary, symmetric_tilt_grain_boundary, mixed_grain_boundarygrain_boundary_templatesigma, plane, misorientation_angle, rotation_axis
Dislocationdislocation, edge_dislocation, screw_dislocation, mixed_dislocationdislocation_templateline_direction, burgers_vector, slip_system.{slip_direction, slip_plane.normal}, plus character_angle for mixed_dislocation
Defect complexdefect_complexdefect_complex_templateids (list of defect key names), relative_distance

Source: atomrdf/datamodels/structure.py, atomrdf/datamodels/defects/{pointdefects,grainboundary,dislocation,stackingfault,complex}.py.

The frozen set GRAIN_BOUNDARY_TYPE enumerates the five GB key variants.

Material / crystal structure

FieldNotes
material.element_ratio{symbol: fraction}, e.g. {"Fe": 0.8, "Cr": 0.2}
material.crystal_structure.spacegroup_symbolHermann–Mauguin (e.g. "Fm-3m") — no validation
material.crystal_structure.spacegroup_number1–230 — no validation
material.crystal_structure.unit_cell.bravais_latticeURI string. Common values used in atomRDF: https://www.wikidata.org/wiki/Q851536 (bcc), Q3006714 (fcc), Q663314 (hcp), Q2242450 (sc), Q503601 (tetragonal), Q648961 (orthorhombic), Q624543 (monoclinic), Q13362463 (rhombohedral)
material.crystal_structure.unit_cell.lattice_parameter[a, b, c] in Å
material.crystal_structure.unit_cell.angle[α, β, γ] in degrees

Atom attribute

FieldNotes
positionList of [x, y, z] (Å) — for inline small systems
speciesList of element symbols, parallel to position
file_pathPath to a structure file (resolved relative to the YAML file). Preferred for large MD snapshots
file_formatASE format string (e.g. "lammps-data", "lammps-dump-text", "vasp", "aims"); auto-detected when None
file_speciesSpecies order for LAMMPS numeric atom types (e.g. ["Al"])

Source: atomrdf/io/workflow_parser.py_resolve_atom_attribute_from_file.

Software / workflow manager

software:
- uri: https://doi.org/10.1016/j.cpc.2021.108171label: LAMMPSversion: "29Sep2021"workflow_manager:
uri: ...label: ...version: ...

Source: atomrdf/datamodels/workflow/software.py.

Top-level keys

YAML_TOP_LEVEL_KEYS = {computational_sample, workflow, operation, activity (legacy), math_operation}. Plus dataset (DCAT provenance, parsed by atomRDF if present).

Cross-referencing properties in math_operation

A property may carry an id; later math operations reference it by string:

e_def=copy.deepcopy(property_template)
e_def.update({"id": "E_def", "label": "TotalEnergy", "value": -3.20, "unit": "EV"})
e_perf=copy.deepcopy(property_template)
e_perf.update({"id": "E_perf", "label": "TotalEnergy", "value": -3.36, "unit": "EV"})
cd["workflow"][0]["calculated_property"] = [e_def, e_perf]
cd["math_operation"].append({
"type": "Subtraction",
"minuend": "E_def",
"subtrahend": "E_perf",
"result": {"id": "E_form", "label": "FormationEnergy", "unit": "EV",
"associate_to_sample": ["Al_fcc_with_vacancy"]},
})

Validation

violations=cd.validate() # warns on each violation, returns the listcd.validate(strict=True) # raises ValueError on the first violation

validate() currently checks workflow.method, workflow.algorithm, workflow.degrees_of_freedom, workflow.thermodynamic_ensemble, workflow.xc_functional, workflow.interatomic_potential.potential_type, operation.method and math_operation.type. Each violation dict has keys section, index, field, value, allowed.

Examples

Working YAML/JSON examples live in examples/:

  • single_structure_with_workflow.yaml / .json
  • grain_boundary.yaml / .json
  • examples.ipynb — end-to-end notebook

Citation

If you use conceptual_dictionary in your research, please cite the associated paper:

A. Azocar Guzman, S. Menon, T. Hickel, S. Sandfeld. Ontology-based knowledge graph infrastructure for interoperable atomistic simulation data. arXiv:2604.06230 (2026). 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},
}

License

MIT License — see LICENSE.

About

A python dictionary template for storing serialisable metadata

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages