Loading...
Loading...
Parse, navigate, and query materials science ontology structures — browse class hierarchies, inspect individual classes and their properties, look up object and data property definitions with domain/range, search for ontology terms by keyword, and parse or summarize raw OWL/XML files. Currently supports CMSO and ASMO; the broader OCDO ecosystem (CDCO, PODO, PLDO, LDO) is planned. Use when exploring what classes or properties an ontology provides, finding the right CMSO term for a crystal structure or simulation concept, understanding parent-child class relationships, or onboarding to an unfamiliar materials ontology, even if the user only says "what ontology terms describe my FCC copper simulation" or "show me the CMSO class hierarchy."
npx skill4agent add heshamfs/materials-simulation-skills ontology-explorerowl_parser.pyontology_summarizer.py| Input | Description | Example |
|---|---|---|
| Ontology name | Registered ontology to query | |
| Class name | A specific class to inspect | |
| Property name | A specific property to look up | |
| Search term | Keyword to search across labels | |
| OWL source | Path or URL to an OWL/XML file (for parsing/summarizing) | |
What do you need?
├── Understand overall ontology structure
│ └── class_browser.py --ontology cmso --list-roots
├── Inspect a specific class
│ └── class_browser.py --ontology cmso --class <name>
├── Find properties for a class
│ └── property_lookup.py --ontology cmso --class <name>
├── Look up a specific property
│ └── property_lookup.py --ontology cmso --property <name>
├── Search for a concept
│ ├── class_browser.py --ontology cmso --search <term>
│ └── property_lookup.py --ontology cmso --search <term>
├── Parse a new/updated OWL file
│ └── owl_parser.py --source <path-or-url>
└── Generate/refresh a summary JSON
└── ontology_summarizer.py --source <url> --output <path>| Script | Key Outputs |
|---|---|
| |
| |
| |
| |
class_browser.py --list-rootsclass_browser.py --class <name>property_lookup.py --property <name>--searchowl_parser.pyontology_summarizer.pyUser: I have an FCC copper simulation. What CMSO classes should I use to describe it?
Agent: Let me explore the CMSO ontology to find the relevant classes. I'll run
a few targeted searches and property lookups (the answer below is synthesized
from several commands, per the Workflow section).
[Runs: class_browser.py --ontology cmso --search "crystal" --json]
→ Crystalline Material, Crystal Structure (among others)
[Runs: class_browser.py --ontology cmso --search "sample" --json]
→ Computational Sample, Atomic Scale Sample
[Runs: class_browser.py --ontology cmso --search "unit cell" --json]
→ Unit Cell
[Runs: class_browser.py --ontology cmso --search "space group" --json]
→ Space Group
[Runs: class_browser.py --ontology cmso --search "element" --json]
→ Chemical Element
[Runs: property_lookup.py --ontology cmso --property "has material" --json]
→ domain Computational Sample → range Material
[Runs: property_lookup.py --ontology cmso --property "has structure" --json]
→ domain Material → range Structure
[Runs: property_lookup.py --ontology cmso --property "has unit cell" --json]
→ domain Crystal Structure → range Unit Cell
For an FCC copper simulation, the relevant CMSO classes are:
- **Computational Sample** → **Atomic Scale Sample**: your simulation is an atomic-scale sample
- **Material** → **Crystalline Material**: copper is crystalline
- **Crystal Structure**: describes the FCC arrangement
- **Unit Cell**: the repeating FCC unit cell (a=b=c=3.615 Å, α=β=γ=90°)
- **Space Group**: FCC copper is space group 225 (Fm-3m)
- **Chemical Element**: Cu
The key relationship chain (from the property domains/ranges above):
Computational Sample → has material → Material → has structure → Structure
→ (Crystal Structure) → has unit cell → Unit Cell
Shall I look up the specific properties for any of these classes?# List root classes in CMSO
python3 skills/ontology/ontology-explorer/scripts/class_browser.py \
--ontology cmso --list-roots --json
# Inspect the Material class hierarchy
python3 skills/ontology/ontology-explorer/scripts/class_browser.py \
--ontology cmso --class Material --json
# Search for crystal-related classes
python3 skills/ontology/ontology-explorer/scripts/class_browser.py \
--ontology cmso --search crystal --json
# Find all properties for UnitCell
python3 skills/ontology/ontology-explorer/scripts/property_lookup.py \
--ontology cmso --class UnitCell --json
# Look up a specific property
python3 skills/ontology/ontology-explorer/scripts/property_lookup.py \
--ontology cmso --property "has space group" --json
# Parse a remote OWL file
python3 skills/ontology/ontology-explorer/scripts/owl_parser.py \
--source https://raw.githubusercontent.com/OCDO/cmso/main/cmso.owl --json
# Generate a summary JSON from an OWL file
python3 skills/ontology/ontology-explorer/scripts/ontology_summarizer.py \
--source https://raw.githubusercontent.com/OCDO/cmso/main/cmso.owl \
--output summary.json --json| Error | Cause | Resolution |
|---|---|---|
| Ontology name not registered | Check |
| Class label doesn't match any entry | Use |
| Property label doesn't match | Use |
| Invalid XML or unreachable URL | Check file path or URL; ensure the file is valid OWL/XML |
| Summary JSON hasn't been generated | Run |
UnitCellBasisChemicalElementxsd:stringA | Bclass_browser.py --class <name>property_lookup.pylabelresults.class_info.labelresults.property_info.nameUnitCellUnit Celldomainrangeproperty_lookup.py --property <name>results.property_info.domain.rangedomainA | B--searchrelevancecmsoasmoreferences/ontology_registry.jsonmetadata.source_urlmetadata.generated_atstatisticsnum_classesnum_object_propertiesnum_data_propertiesrdfs:subClassOf| Tempting shortcut | Why it's wrong / what to do |
|---|---|
"The class name | Labels carry spaces ( |
| "These two classes are obviously related, so I'll state the link." | Relationships exist only where an object property declares them. Verify with |
| "The script ran and printed results, so the answer is complete." | Run success ≠ completeness. A missing |
" | A match may be relevance 0.5 (description-only), not a label match. Check the |
| "A property has one domain class." | Domains can be unions (`A |
| "Any OCDO ontology will work / CMSO and ASMO are interchangeable." | Only |
"I'll point the parser at this | |
--ontologyontology_registry.json--class--property--search--sourceowl_parser.pyhttps://class_browser.pyproperty_lookup.pyreferences/owl_parser.pyontology_summarizer.py--outputowl_parser.pyontology_summarizer.pyclass_browser.pyproperty_lookup.pyeval()exec()shell=Truexml.etree.ElementTreerdfs:subClassOfrdfs:commentskos:definition| Date | Version | Changes |
|---|---|---|
| 2026-06-24 | 1.2.2 | Added a Verification checklist (evidence-based, tied to canonical-label resolution, recorded domain/range, union domains, search relevance, registry keys, and summary provenance) and a Common pitfalls & rationalizations table. |
| 2026-06-23 | 1.2.0 | Fixed property_lookup |
| 2026-02-25 | 1.0 | Initial release with CMSO support |