You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Map materials science terms, crystal structures, and sample descriptions to ontology classes and properties. Supports any ontology registered in ontology_registry.json. Use when translating natural-language material descriptions to ontology terms, annotating simulation inputs with ontology metadata, or mapping crystal parameters (space group, Bravais lattice, lattice constants) to standardized ontology representations.
allowed-tools
Read, Bash
Ontology Mapper
Goal
Translate real-world materials science descriptions into standardized ontology annotations. Given terms like "FCC copper" or structured data like {"material": "iron", "structure": "BCC", "lattice_a": 2.87}, produce the corresponding ontology classes and properties for any registered ontology.
Requirements
Python 3.8+
No external dependencies (Python standard library only)
Requires ontology-explorer's summary JSON and ontology_registry.json
Per-ontology mapping config (<name>_mappings.json) for ontology-specific synonyms and labels
Inputs to Gather
Input
Description
Example
Ontology
Ontology name from registry
cmso, asmo
Term(s)
Natural-language materials concept(s)
"unit cell", "FCC,copper,lattice"
Crystal system
One of the 7 crystal systems
cubic, hexagonal
Bravais lattice
Lattice type (symbol or common name)
FCC, cF, BCC
Space group
Space group number (1-230)
225
Lattice parameters
a, b, c in angstroms; alpha, beta, gamma in degrees
a=3.615
Sample description
JSON dict with material properties
{"material":"copper","structure":"FCC"}
Decision Guidance
What do you need to map?
├── A concept or term to find its ontology class
│ └── concept_mapper.py --ontology <name> --term "<term>"
├── Crystal structure parameters to ontology terms
│ └── crystal_mapper.py --ontology <name> --bravais <type> --space-group <N> --a <val>
├── A full sample description to ontology annotations
│ └── sample_annotator.py --ontology <name> --sample '<json>'
└── Multiple terms at once
└── concept_mapper.py --ontology <name> --terms "term1,term2,term3"
If the user provides natural-language terms, use concept_mapper.py to find matching ontology classes.
If the user describes crystal structure parameters, use crystal_mapper.py to map them and validate constraints.
For a complete sample description, use sample_annotator.py to produce full ontology annotations.
Review any validation warnings (e.g., lattice parameter mismatches for the crystal system).
Check unmapped_fields and suggested_properties for completeness.
Conversational Workflow Example
User: I'm setting up an MD simulation of BCC iron with lattice parameter 2.87 angstroms.
What CMSO terms should I use?
Agent: Let me map your iron sample to CMSO ontology terms.
[Runs: sample_annotator.py --ontology cmso --sample '{"material":"iron","structure":"BCC","lattice_a":2.87,"space_group":229}' --json]
Your BCC iron simulation maps to these CMSO annotations:
- **Sample**: Atomic Scale Sample (subclass of Computational Sample)
- **Material**: Crystalline Material
- **Unit Cell**: Bravais lattice = "cI" (body-centered cubic)
- **Space Group**: number = 229 (Im-3m)
- **Lattice**: a = 2.87 Å
- **Element**: Fe
Suggested additions:
- Number of atoms in the simulation cell
- Simulation cell vectors and angles