Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

crystal-design-structure-crossover-agent

БесплатноЗапускает вложенные скриптыНе проверен

Agent-guided multi-objective evolutionary search for inorganic crystals. Use when the user wants to discover / optimize / evolve crystal structures toward…

pdl-openairот pdl-openair★ 16 звёзд на GitHub

Об этом скилле

crystal-design-structure-crossover-agent — agent-guided evolutionary crystal search

Orchestrate a multi-objective evolutionary search over the deployed material MCPs. You (Claude) are the evolutionary strategist: translate the user's goal into objectives/constraints, drive the loop one generation at a time, read each generation's snapshot, and adaptively steer (ban elements, tighten constraints, raise mutation strength, push diversity). The deterministic loop + selection code lives in scripts/ and runs in-container; you call it per step.

What runs where (read this first)

  • Deterministic code (skill-owned): scripts/evolve_driver.py (step-CLI: init/step/steer/status/finalize) + scripts/saes_selection.py (NSGA-II/CDP + StructureMatcher pruning, vendored from flux) + scripts/mcp_client.py (HTTP client) + scripts/evaluators.py (pluggable fitness-backend registry).
  • Runs on the host, not in a container. The driver needs only pymatgen + numpy (no GPU) and reaches the MCPs over the reverse proxy. Use any venv that has those installed. A wrapper scripts/run.sh auto-picks: $EVOLVE_PY if set and importable, else repo-root .venv/bin/python if it can import pymatgen, else falls back to a Docker image (override via $EVOLVE_IMAGE). run.sh also auto-loads .env from the repo root so MATERIALS_MCP_BASE_URL is in scope.
  • Fitness is pluggable via --fitness-backend at init. Three backends ship today:
    • alignn (default) — fast/rough per-individual properties via alignn-predict (bandgap, ehull, dielectric, bulk/shear modulus, magmom, slme, supercon_tc, exfoliation_energy, formation_energy). Use for multi-property objectives.
    • mattersim — per-individual energy/forces/stress from mattersim-relax only (keys: energy_per_atom, total_energy, f_max, s_max). Faster (skips the second MCP), accurate energy. Best for stability-proxy goals under fixed composition.
    • mattergen_eval — SUN-aligned per-individual metrics via chunked batch evaluate_structures calls reading the server's per_structure detail (keys: ehull_eval, ehull_sat, novel, stable, unique (≡1 convention — batch uniqueness is chunk-size-dependent; population-level dedup is pilot_analysis's distinct audit), comp_valid_eval, structure_valid, rmsd_relax — 弛豫位移 RMSD(Å),skill 侧自算 raw vs relaxed(evaluate 的同名 batch 指标在已弛豫结构上恒 ~0,不可用)). ≈2–3× faster than the pre-2026-09 batch-of-1 protocol (values equivalent: flags identical, ehull diff ≤1e-6 eV/atom) and the only backend that exposes SUN novelty/stability. Old servers without per_structure auto-fall back to batch-of-1.
  • Compute primitives (deployed MCPs, must be up): diffusion-mutate (mutation+crossover, required), mattersim-relax (required — relaxation for all backends, fitness source for mattersim backend), alignn-predict (required for alignn backend, otherwise optional), mattergen-evaluate (final novelty report, required only for finalize --evaluate), mattergen-generate (optional initial pool). Endpoints are derived as ${MATERIALS_MCP_BASE_URL}/<service>/mcp from .env (host never committed); per-service override via MCP_<NAME>_URL. See references/runtime-topology.md.
  • No persistent engine service. The skill itself IS the engine — state persists in the run dir (JSON), so each subcommand is independent.

The driver invocation (every subcommand uses this wrapper)

bash <SKILL>/scripts/run.sh <subcommand> --run-dir <RUN_DIR> ...

<SKILL> is the absolute path to this skill directory in whatever repo it's synced into (e.g. .claude/skills/crystal-design-structure-crossover-agent after sync_claude_skills.py, or skills/materials/crystal-design-structure-crossover-agent in source). run.sh runs evolve_driver.py with a host Python that has pymatgen (no docker, no mounts by default). <RUN_DIR> (e.g. outputs/evo_widegap) holds config.json, constraints.json, population.json, per-gen snapshots, and final leaderboard.csv + pareto/. Because it's host-side, seed CIF paths and --run-dir can be any host path — no mount gymnastics. If no venv has pymatgen, run.sh falls back to $EVOLVE_IMAGE Docker image (then --run-dir must be under your cwd so it can be mounted).

The flow

Step 0 — Pre-flight. Confirm the required MCPs are up (curl each /mcp handshake, see references/runtime-topology.md). Translate the user's NL goal → objectives + constraints using references/property-keys.md and references/objective-constraint-schema.md. Pick --fitness-backend (alignn default for multi-property; mattersim for energy-only stability-proxy), then RUN_DIR, pop-size, max-generations, noise-level, and --crossover-rate (0=pure mutation, 0.5=half/half — recommended when the seed pool is narrow).

Step 1 — init. Build + characterize the initial pool (seed CIFs via --seed-cifs — any host path now works, and/or --generate N for mattergen-gene

Полный SKILL.md на GitHub

Установить crystal-design-structure-crossover-agent в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

.env.exampleinput.schema.jsonoutput.schema.jsonreferences/goal-evolving-demo.mdreferences/memory-module.mdreferences/objective-constraint-schema.mdreferences/property-keys.mdreferences/runtime-topology.mdreferences/steering-playbook.mdscripts/ablation_runner.pyscripts/ablation_static_decide.pyscripts/agent_prompt.pyscripts/audit_rank_perturbation.pyscripts/bandgap_final_eval.pyscripts/bandgap_parity2_metrics.pyscripts/bandgap_rule_decide.pyscripts/eval_cif_dir.pyscripts/evaluators.pyscripts/evolve_driver.pyscripts/family_weight_rule_decide.pyscripts/goal_evolving.pyscripts/mcp_client.pyscripts/memory_store.pyscripts/ml_rule_step.pyscripts/noise_rule_step.pyscripts/parity3_metrics.pyscripts/parity_metrics.pyscripts/phase_switcher.pyscripts/pilot_analysis.pyscripts/pilot_runbook_family1.shscripts/random_walk_runner.pyscripts/render_batch.pyscripts/render_cif_3d.pyscripts/run.shscripts/saes_selection.pyscripts/steering_modes.pyskill.yaml

FAQ

Что делает скилл crystal-design-structure-crossover-agent?

Agent-guided multi-objective evolutionary search for inorganic crystals. Use when the user wants to discover / optimize / evolve crystal structures toward materials goals (e.g. "find a stable lead-free wide-bandgap oxide", "evolve hard materials maximizing bulk modulus", "search for low-ehull high-dielectric compositions", 进化晶体 / 多目标搜索 / 帕累托前沿 / 变异搜索 / 遗传算法找材料 / Pareto front / evolve structures / crystal discovery). Drives a diffusion-based evolutionary loop (mutation = noise+denoise via the diffusion-mutate MCP), evaluates fitness via a pluggable backend (alignn-predict by default; mattersim-relax energy as alternative), selects via NSGA-II/CDP, and lets Claude steer the search between generations. Also use when the user mentions DEMO / EGD / evolutionary crystal generation (this skill IS the engine — no separate service needed).

Как установить скилл crystal-design-structure-crossover-agent?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл crystal-design-structure-crossover-agent запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить crystal-design-structure-crossover-agent с