MCP HubMCP Hub
스킬 목록으로 돌아가기

ontology-mapper

HeshamFS
업데이트됨 2 days ago
1 조회
40
3
40
GitHub에서 보기
기타aidata

정보

이 스킬은 재료과학 용어와 결정 구조 설명을 CMSO 및 ASMO와 같은 여러 온톨로지의 표준화된 온톨로지 클래스에 매핑합니다. 자연어 용어(예: "BCC 철")를 신뢰도 점수와 함께 형식적인 온톨로지 항목으로 변환하고 기계 가독 메타데이터를 생성합니다. 개발자는 FAIR 준수를 위한 시뮬레이션 입력 데이터 주석 처리 시, 또는 비공식적인 실험실 용어와 형식적인 온톨로지 용어를 연결할 때 이 스킬을 사용해야 합니다.

빠른 설치

Claude Code

추천
기본
npx skills add HeshamFS/materials-simulation-skills -a claude-code
플러그인 명령대체
/plugin add https://github.com/HeshamFS/materials-simulation-skills
Git 클론대체
git clone https://github.com/HeshamFS/materials-simulation-skills.git ~/.claude/skills/ontology-mapper

Claude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요

문서

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

InputDescriptionExample
OntologyOntology name from registrycmso, asmo
Term(s)Natural-language materials concept(s)"unit cell", "FCC,copper,lattice"
Crystal systemOne of the 7 crystal systemscubic, hexagonal
Bravais latticeLattice type (symbol or common name)FCC, cF, BCC
Space groupSpace group number (1-230)225
Lattice parametersa, b, c in angstroms; alpha, beta, gamma in degreesa=3.615
Sample descriptionJSON 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"

Script Outputs (JSON Fields)

ScriptKey Outputs
scripts/concept_mapper.pyresults.matches, results.unmatched, results.suggestions
scripts/crystal_mapper.pyresults.ontology_classes, results.ontology_properties, results.effective_system, results.bravais_lattice, results.validation_warnings
scripts/sample_annotator.pyresults.annotations, results.sample_type, results.material_type, results.unmapped_fields, results.suggested_properties

Workflow

  1. If the user provides natural-language terms, use concept_mapper.py to find matching ontology classes.
  2. If the user describes crystal structure parameters, use crystal_mapper.py to map them and validate constraints.
  3. For a complete sample description, use sample_annotator.py to produce full ontology annotations.
  4. Review any validation warnings (e.g., lattice parameter mismatches for the crystal system).
  5. 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

CLI Examples

# Map a single concept
python3 skills/ontology/ontology-mapper/scripts/concept_mapper.py \
  --ontology cmso --term "space group" --json

# Map multiple terms
python3 skills/ontology/ontology-mapper/scripts/concept_mapper.py \
  --ontology cmso --terms "FCC,copper,lattice constant" --json

# Map crystal parameters (with ontology-specific labels)
python3 skills/ontology/ontology-mapper/scripts/crystal_mapper.py \
  --ontology cmso --bravais FCC --space-group 225 --a 3.615 --json

# Map crystal parameters (generic labels, no ontology specified)
python3 skills/ontology/ontology-mapper/scripts/crystal_mapper.py \
  --bravais FCC --space-group 225 --a 3.615 --json

# Annotate a full sample
python3 skills/ontology/ontology-mapper/scripts/sample_annotator.py \
  --ontology cmso \
  --sample '{"material":"copper","structure":"FCC","space_group":225,"lattice_a":3.615}' \
  --json

Adding a New Ontology

To support a new ontology (e.g., ASMO), create a <name>_mappings.json in references/:

{
  "ontology": "asmo",
  "synonyms": { "simulation method": "Simulation Method", ... },
  "property_synonyms": { "timestep": "has timestep", ... },
  "material_type_rules": { "keyword_rules": [...], "default": "Material" },
  "sample_schema": { "sample_class": "Simulation", ... },
  "crystal_output": { "base_classes": [...], "property_map": {...} },
  "annotation_routing": { "unit_cell_indicators": [...], ... }
}

Then add "mappings_file": "asmo_mappings.json" to the ontology's entry in ontology_registry.json. No code changes needed.

Error Handling

ErrorCauseResolution
space_group must be between 1 and 230Invalid space group numberUse a valid space group number
a must be positiveNon-positive lattice parameterProvide positive values in angstroms
Sample must be a non-empty dictEmpty or missing sample dataProvide a valid JSON sample dict
Validation warningsLattice parameters inconsistent with crystal systemCheck that a=b=c for cubic, etc.

Interpretation Guidance

  • Confidence scores: 1.0 = exact match, 0.9 = synonym match, 0.7 = substring match, 0.5 = description match
  • Validation warnings: indicate potential mistakes (e.g., specifying a!=b for cubic). These are warnings, not errors — the mapping still proceeds.
  • Unmapped fields: input keys that the annotator doesn't recognize. These may need manual mapping.
  • Suggested properties: additional ontology properties that would make the annotation more complete.

Security

Input Validation

  • --ontology is validated against registered ontology names in ontology_registry.json (fixed allowlist)
  • --term and --terms are length-limited and used only for substring matching against pre-processed synonym tables (never interpolated into code)
  • --bravais is validated against a fixed set of recognized lattice type symbols
  • --space-group is validated as an integer between 1 and 230
  • Lattice parameters (--a, --b, --c, --alpha, --beta, --gamma) are validated as finite positive numbers
  • --sample JSON is parsed with json.loads() and validated as a non-empty dict; keys and values are type-checked

File Access

  • Scripts read pre-processed JSON files from the references/ directory: ontology_registry.json, *_mappings.json, *_summary.json, crystal_systems.json, element_data.json (all read-only)
  • No scripts write to the filesystem; all output goes to stdout
  • No network access is required

Tool Restrictions

  • Read: Used to inspect script source, reference files, and ontology data
  • Grep: Used to search reference files for mapping patterns or ontology terms
  • Glob: Used to locate reference files and ontology data
  • Notably, this skill has no Bash or Write access, giving it the lowest attack surface of all skills

Safety Measures

  • No eval(), exec(), or dynamic code generation
  • No subprocess calls of any kind; all logic runs within Python scripts invoked by the agent
  • No file writes; the skill is purely read-only and analytical
  • Minimal tool surface (Read, Grep, Glob only) means the agent cannot execute arbitrary commands or modify the filesystem

Limitations

  • Concept mapping uses string matching and a per-ontology synonym table; it does not understand arbitrary natural language
  • Crystal system validation checks basic constraints only (not all crystallographic rules)
  • The element resolver recognizes common element names and symbols but may miss unusual spellings
  • Bravais lattice aliases cover common usage (FCC, BCC, HCP) but not all crystallographic notation variants

References

Version History

DateVersionChanges
2026-02-251.1Refactored for multi-ontology support: externalized CMSO-specific knowledge to config
2026-02-251.0Initial release with CMSO mapping support

GitHub 저장소

HeshamFS/materials-simulation-skills
경로: skills/ontology/ontology-mapper
0
agent-skillsagentscli-toolscomputational-sciencellmmaterials-science

연관 스킬

llamaguard

기타

LlamaGuard는 폭력 및 혐오 발언 등 6가지 안전 범주에서 LLM 입력과 출력을 조정하기 위한 Meta의 70-80억 파라미터 모델입니다. 94-95% 정확도를 제공하며 vLLM, Hugging Face 또는 Amazon SageMaker를 사용해 배포할 수 있습니다. 이 기술을 사용하여 AI 애플리케이션에 콘텐츠 필터링 및 안전 가드레일을 손쉽게 통합하세요.

스킬 보기

cost-optimization

기타

이 Claude Skill은 리소스 적정화, 태깅 전략, 지출 분석을 통해 개발자들이 클라우드 비용을 최적화할 수 있도록 지원합니다. AWS, Azure, GCP에서 클라우드 비용을 절감하고 비용 거버넌스를 구현하기 위한 프레임워크를 제공합니다. 인프라 비용을 분석하거나, 리소스를 적정화하거나, 예산 제약을 충족해야 할 때 사용하세요.

스킬 보기

quantizing-models-bitsandbytes

기타

이 스킬은 bitsandbytes를 사용하여 LLM을 8비트 또는 4비트 정밀도로 양자화하며, 최소한의 정확도 손실로 50-75%의 메모리 감소를 달성합니다. 제한된 GPU 메모리에서 더 큰 모델을 실행하거나 추론을 가속화하는 데 이상적이며, INT8, NF4, FP4와 같은 형식을 지원합니다. 이 스킬은 HuggingFace Transformers와 통합되어 QLoRA 학습 및 8비트 옵티마이저를 가능하게 합니다.

스킬 보기

dispatching-parallel-agents

기타

이 Claude Skill은 3개 이상의 독립적인 문제를 동시에 조사하고 해결하기 위해 다중 에이전트를 배치합니다. 공유 상태나 의존성 없이 해결 가능한 무관련 장애 시나리오에 맞게 설계되었습니다. 핵심 기능은 병렬 문제 해결로, 각 독립 문제 영역마다 하나의 에이전트를 할당하여 효율성을 극대화합니다.

스킬 보기