ml-generative-mattergen

ml-generative-mattergen is a skill for Claude Code, Codex from learningmatter-mit/AtomisticSkills. It costs 22 tokens per session (1,507 once invoked), scanned A, original, MIT.

A generative AI tool for creating new inorganic crystal structures. It uses a diffusion model trained to produce crystalline materials, with optional conditions such as chemical composition or magnetic-density information.

In plain words
What is it for?
Use it to generate candidate inorganic materials, either freely or under selected chemical and physical conditions.
Why use it?
It helps researchers search through possible materials without manually specifying every atomic arrangement. Generated structures can serve as candidates for later calculations.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/learningmatter-mit/atomisticskills/ml-generative-mattergen
Any agent
npx skills add learningmatter-mit/AtomisticSkills --skill ml-generative-mattergen
Clone the repo
git clone --depth 1 https://github.com/learningmatter-mit/AtomisticSkills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ml-generative-mattergen

README.md
[![agentmods](https://agentmods.dev/badge/skills/learningmatter-mit/atomisticskills/ml-generative-mattergen.svg)](https://agentmods.dev/skills/learningmatter-mit/atomisticskills/ml-generative-mattergen)
Your own site
<a href="https://agentmods.dev/skills/learningmatter-mit/atomisticskills/ml-generative-mattergen"><img src="https://agentmods.dev/badge/skills/learningmatter-mit/atomisticskills/ml-generative-mattergen.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,507 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00022 $0.01507
Opus 5 $0.00011 $0.00754
Sonnet 5 $0.00004 $0.00301
Haiku 4.5 $0.00002 $0.00151

Measured yesterday against content hash 737749f597b5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ml-generative-mattergen scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 4 executable files (examples/finetuning/make_dummy.py, examples/finetuning/run_finetune_example.sh, scripts/prepare_training_data.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/ml-generative-mattergen/SKILL.md · 181 lines

How it starts

The opening of the file, as written. The whole thing — 181 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MatterGen Structure Generation Skill

This skill provides tools for generating novel inorganic material structures using MatterGen, a state-of-the-art diffusion-based generative model for crystalline materials.

1. Prerequisites

[!IMPORTANT] ARM/aarch64 Support: MatterGen CAN work on ARM-based systems like NVIDIA DGX Spark. However, PyG dependencies (torch-scatter, torch-cluster) must be compiled from source with CUDA_HOME properly configured. See installation guide below.

  • The mattergen-agent conda environment must be installed and configured.
  • MatterGen requires Python 3.10 and CUDA 13.0 compatible GPU for efficient generation.
  • For ARM/aarch64 systems: See Installing torch-scatter on ARM for detailed installation instructions.

2. Available Models

MatterGen provides several pretrained models:

  • mattergen_base: Base unconditional generative model
  • mp_20_base: Materials Project base model
  • dft_mag_density: Model for magnetic density conditioning
  • chemical_system: Model for chemical system conditioning

3. MCP Tool Usage

The MCP tool automatically loads models when needed - no explicit load step required.

Unconditional Generation

Generate novel structures without conditioning:

from mcp_base import mcp_mattergen_generate_structures

result = mcp_mattergen_generate_structures(
    model_name="mattergen_base",
    num_structures=10,
    batch_size=10,
    output_dir="research/my_project/generated"
)

Chemical System Conditioning

Generate structures from a specific chemical system (controls which elements appear):

result = mcp_mattergen_generate_structures(
    chemical_system="Li-Fe-P-O",  # Automatically uses chemical_system model
    guidance_scale=1.0,  # Recommended for chemical system conditioning
    num_structures=20,
    batch_size=10,
    output_dir="research/cathode_materials/generated"
)

[!NOTE] Chemical system conditioning controls which elements appear, but NOT the exact stoichiometry. For example, chemical_system="Li-Zr-Cl" can generate Li3Cl5, LiZrCl4, Li2ZrCl5, etc., but you cannot specify exactly "Li2ZrCl6".

Read the full file on GitHub · 181 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 181 lines · 22 tokens per session scan A 737749f597b5

Subscribe to this mod's changes

ml-generative-mattergen is a skill published in the GitHub repository learningmatter-mit/AtomisticSkills (158 stars, last pushed yesterday), licensed MIT. It adds 22 tokens to every session and 1,507 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

hugging-face-trackio

Track and visualize ML training experiments with Trackio. Use when logging metrics during training (Python API) or retrieving/analyzing logged metrics (CLI). Supports real-time dashboard visualization, HF Space syncing, and JSON output for automation.

patchy631/ai-engineering-hub · 52 tokens

pysr

Use when fitting equations to data with PySR or SymbolicRegression.jl, when a user wants an interpretable formula, symbolic model, scaling law, or empirical relation discovered from numeric data, or when debugging a PySR search that is slow, stuck, or giving poor equations.

astroautomata/PySR · 61 tokens

cellxgene-census-query

Query CZ CELLxGENE Census (61M+ cells). Filter by cell type/tissue/disease, retrieve expression data, and integrate with scanpy/PyTorch for population-scale single-cell analysis. Use this skill when: (1) Querying single-cell expression data by cell type, tissue, or disease, (2) Exploring available single-cell datasets…

PharMolix/OpenBioMed · 105 tokens

HomeSafe-Bench

VLM indoor safety hazard detection benchmark inspired by HomeSafeBench (arXiv 2509.23690).

SharpAI/DeepCamera · 28 tokens

depth-estimation

Real-time depth map privacy transforms using Depth Anything v2 (CoreML + PyTorch).

SharpAI/DeepCamera · 22 tokens

start-experiment

Start the autoresearch optimization loop for a specific model + lane. Resolves the hierarchical program.md (root → model → lane), asks the user for hardware (local TPU VM or GKE cluster of a specified TPU type + topology), discovers available clusters from .env/, checks occupancy with USERPREFIX-aware attribution…

vlasenkoalexey/tpu_performance_autoresearch_wiki · 103 tokens