Agent skill

ML Generative Diffcsp

by learningmatter-mit in learningmatter-mit/AtomisticSkills

Generate crystal structures with exact composition control using DiffCSP++ (space group + Wyckoff positions), or unconditionally from trained distributions.

MITAuto-check passedResearch & Science

Install ML Generative Diffcsp

skills CLI
$ npx skills add learningmatter-mit/AtomisticSkills --skill ml-generative-diffcsp -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install learningmatter-mit/AtomisticSkills ml-generative-diffcsp --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/learningmatter-mit/AtomisticSkills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/ml-generative-diffcsp .claude/skills/ml-generative-diffcsp && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ml-generative-diffcsp
GitHub stars
175
Token cost
~1.4k tokens
SKILL.md length
461 words
Files
21 (incl. scripts)
Skills in repo
129
Repo updated
First seen
Licence
MIT

At a glance

Generate crystal structures with exact composition control using DiffCSP++ (space group + Wyckoff positions), or unconditionally from trained distributions.

  • Works in 7 steps: Prerequisites → Available Models → Usage Modes → …
  • Tasks that involve Physical and earth sciences
  • SKILL.md covers Goal, 1. Prerequisites, 2. Available Models and 3. Usage Modes, plus 4 more sections
  • Calls git; reaches github.com

What it does

ML Generative Diffcsp is an agent skill from learningmatter-mit/AtomisticSkills. Generate crystal structures with exact composition control using DiffCSP++ (space group + Wyckoff positions), or unconditionally from trained distributions.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 24 other files, including scripts (for example `examples/Li2ZrCl6-symmetry/README.md`, `examples/Li2ZrCl6-symmetry/generation_metadata.json` and `examples/batch-json/README.md`).

It sits in Research & Science, covering Physical and earth sciences. The repository describes itself as: Integrating AtomisticSkills into Agentic IDEs (Cursor, Claude Code, Codex, Google Antigravity, Hermes Agent, etc). The licence is MIT.

When your agent uses it

  • Tasks that involve Physical and earth sciences

Example prompts

  • “/ml-generative-diffcsp”

Requirements

  • Python 3

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Prerequisites
  2. Available Models
  3. Usage Modes
  4. Parameters
  5. Output Files
  6. Constraints
  7. Workflow Integration

What it can do on your machine

Read from SKILL.md and the folder at commit 7f2d86d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    Also links to:

    • drive.google.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

ML Generative Diffcsp loads about 1.4k tokens when it runs. Until then it costs about 45 tokens; SKILL.md has 461 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~45
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from learningmatter-mit/AtomisticSkills at commit 7f2d86d, republished under its MIT licence (© learningmatter-mit). 461 words, ~1,432 tokens.

Download SKILL.mdSave it as .claude/skills/ml-generative-diffcsp/SKILL.md (or your agent's skills folder). This skill also uses 20 other files; get the full folder from GitHub.
name
ml-generative-diffcsp
description
Generate crystal structures with exact composition control using DiffCSP++ (space group + Wyckoff positions), or unconditionally from trained distributions.
metadata.category
machine-learning, materials
metadata.venv
diffcsp

DiffCSP++ Crystal Structure Generation

Goal

Generate novel crystal structures using DiffCSP++ (ICLR 2024), a diffusion model that leverages space group symmetry constraints for crystal structure prediction (CSP) and ab initio generation.

1. Prerequisites

[!IMPORTANT] GPU Required: DiffCSP++ inference is significantly faster on GPU.

  • Runs as the diffcsp MCP server and its scripts run in the diffcsp environment: on x86_64 a uv environment created on first use (CUDA 12.6 or 13 by driver), on aarch64 the generative container image.
  • DiffCSP++ repo (git clone https://github.com/jiaor17/DiffCSP-PP) cloned next to this project as ../DiffCSP-PP, or anywhere with DIFFCSP_REPO pointing to it. venv/run mounts it into the container on aarch64.
  • Pre-trained checkpoints in the repository's checkpoints/ directory (e.g. checkpoints/mp_csp/). The DiffCSP-PP README links them on Google Drive; Google Drive needs an interactive download, so fetch them by hand (or with gdown --folder).

2. Available Models

ModelTypeDescription
mp_cspCSPMaterials Project — composition-constrained generation
mp_genGenMaterials Project — unconditional generation
perov_cspCSPPerovskite — composition-constrained generation
perov_genGenPerovskite — unconditional generation
carbon_genGenCarbon — unconditional generation
mpts_cspCSPMPTS-52 — composition-constrained generation

3. Usage Modes

Generate structures with exact composition using the generate_structures_with_symmetry MCP tool:

bash
diffcsp.generate_structures_with_symmetry(
    spacegroup=58,                        # Space group number (1-230)
    wyckoff_letters="2a,2d,4g",           # Wyckoff positions (comma-separated or shorthand "adg")
    atom_types="Mn,Li,O",                 # Element per Wyckoff position
    model_name="mp_csp",                  # CSP model
    num_samples=5,                        # Number of structures to generate
    step_lr=1e-5,                         # Langevin step size
    output_dir="research/my_project"
)
Mode 2: Batch Generation from JSON File

Generate multiple structures from a JSON specification file. This is useful when you have many different compositions to generate at once.

JSON format (see examples/example.json):

json
[
    {"spacegroup_number": 58, "wyckoff_letters": ["2a","2d","4g"], "atom_types": ["Mn","Li","O"]},
    {"spacegroup_number": 194, "wyckoff_letters": "abff", "atom_types": ["Tm","Tm","Ni","As"]}
]

Run the batch generation script:

bash
${CLAUDE_SKILL_DIR}/../../venv/run diffcsp python ${CLAUDE_SKILL_DIR}/scripts/batch_generate.py \
    --json_file ${CLAUDE_SKILL_DIR}/examples/example.json \
    --model mp_csp \
    --output_dir diffcsp_batch_output \
    --step_lr 1e-5
Mode 3: Ab Initio (Unconditional) Generation

Generate structures from the training distribution without specifying composition. Requires a generation model (mp_gen, perov_gen, or carbon_gen).

bash
${CLAUDE_SKILL_DIR}/../../venv/run diffcsp python ${CLAUDE_SKILL_DIR}/scripts/unconditional_generate.py \
    --model mp_gen \
    --num_structures 100 \
    --output_dir diffcsp_gen_output \
    --step_lr 5e-6
Show full SKILL.md (205 more words)Show less

4. Parameters

ParameterDefaultDescription
spacegroup—Space group number (1-230)
wyckoff_letters—Wyckoff positions (e.g., "2a,2d,4g" or shorthand "adg")
atom_types—Element for each Wyckoff position (e.g., "Mn,Li,O")
model_namemp_cspPre-trained model name
num_samples1Number of structures per composition
step_lr1e-5Langevin dynamics step size
batch_size128Batch size for parallel generation

5. Output Files

  • structure_XXXX.cif: Generated crystal structure files (pymatgen CIF format)
  • generation_metadata.json: Generation parameters and statistics

6. Constraints

[!WARNING] Space Group Knowledge Required: You need to know the space group number and Wyckoff positions for your target composition. Use ICSD, Materials Project, or pyxtal to find these.

[!NOTE] Wyckoff Notation: Positions can be given as full labels ("2a,2d,4g") or shorthand letters ("adg"). The number prefix is the site multiplicity — it's automatically determined from the space group.

  • Environment: diffcsp (uv on x86_64; the generative image on aarch64).
  • GPU: A CUDA GPU is recommended for reasonable generation speed.
  • CSP vs Gen models: CSP models require atom_types; Gen models can generate without them.

7. Workflow Integration

DiffCSP++ works well in combination with:

  • Structure relaxation: Use MLIP tools (MACE, FairChem, MatGL) to optimize generated structures
  • Stability analysis: Use mat-stability to calculate E_hull
  • Comparison: Generate structures with DiffCSP++, ADiT, and MatterGen for diversity

Author: Bowen Deng Contact: GitHub @learningmatter-mit

© learningmatter-mit, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 20 other files (scripts) in skills/ml-generative-diffcsp of learningmatter-mit/AtomisticSkills.

  • SKILL.md
  • examples/Li2ZrCl6-symmetry/README.md
  • examples/Li2ZrCl6-symmetry/generation_metadata.json
  • examples/Li2ZrCl6-symmetry/structure_0000.cif
  • examples/Li2ZrCl6-symmetry/structure_0001.cif
  • examples/Li2ZrCl6-symmetry/structure_0002.cif
  • examples/batch-json/README.md
  • examples/batch-json/generation_metadata.json
  • examples/batch-json/structure_0000.cif
  • examples/batch-json/structure_0001.cif
  • examples/example.json
  • examples/unconditional/README.md
  • examples/unconditional/generation_metadata.json
  • examples/unconditional/structure_0000.cif
  • examples/unconditional/structure_0001.cif
  • examples/unconditional/structure_0002.cif
  • examples/unconditional/structure_0003.cif
  • … and 4 more

Open the folder on GitHubat commit 7f2d86d

Compare with similar skills

ML Generative Diffcsp next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

ML Generative Diffcsp compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
ML Generative Diffcsp this skilllearningmatter-mit/AtomisticSkills175—~1.4kAutomated safety check: PassMIT
AstropyzLanqing/codex-claude-academic-skills4.6k14 repos~2.9kAutomated safety check: PassBSD-3-Clause
PymatgenzLanqing/codex-claude-academic-skills4.6k12 repos~5kAutomated safety check: PassMIT
Cantera Ignition DelayK-Dense-AI/scientific-agent-skills48k1 repos~2.2kAutomated safety check: PassMIT
Weathertrpc-group/trpc-agent-go1.8k8 repos~591Automated safety check: PassApache-2.0
Pymol VisualizationChatMol/ChatMol372—~1.2kAutomated safety check: PassMIT

Similar skills

  • Astropy

    zLanqing/codex-claude-academic-skills

    Comprehensive Python library for astronomy and astrophysics.

    4.6k GitHub starsUsed in 14 repos~2.9k tokens
    Research & ScienceAuto-check passed
  • Pymatgen

    zLanqing/codex-claude-academic-skills

    Materials science toolkit. An agent skill from zLanqing/codex-claude-academic-skills.

    4.6k GitHub starsUsed in 12 repos~5k tokens
    Research & ScienceAuto-check passed
  • Cantera Ignition Delay

    K-Dense-AI/scientific-agent-skills

    Runs Cantera constant-volume or constant-pressure ignition simulations and reports temperature-based ignition delay with mechanism provenance and checks.

    48k GitHub starsUsed in 1 repo~2.2k tokens
    Research & ScienceAuto-check passed
  • Weather

    trpc-group/trpc-agent-go

    Get current weather and forecasts via wttr.in or Open-Meteo.

    1.8k GitHub starsUsed in 8 repos~591 tokens
    Research & ScienceAuto-check passed
  • Pymol Visualization

    ChatMol/ChatMol

    Generate publication-quality molecular visualization images using PyMOL.

    372 GitHub stars~1.2k tokensUpdated 6 mo ago
    Research & ScienceAuto-check passed
  • Review

    Muuuun/luxas

    Write domain-authentic review articles that synthesize rather than stack.

    1.2k GitHub stars~2.1k tokensUpdated 1 mo ago
    Research & ScienceAuto-check passed

More from learningmatter-mit/AtomisticSkills

All 129 skills in this repo
  • Drug Binding Site Definition

    learningmatter-mit/AtomisticSkills

    Define a docking search box (center coordinates + box dimensions in Angstroms) from a co-crystal ligand, binding-site residues, or a saved JSON specification.

    175 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Drug Complex System Builder

    learningmatter-mit/AtomisticSkills

    Build a solvated, charge-neutralized protein-ligand complex for OpenMM molecular dynamics simulation.

    175 GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Drug Pocket Detection

    learningmatter-mit/AtomisticSkills

    Identify and rank ligandable pockets on a protein structure or model using geometry (fpocket) or an ML predictor (P2Rank).

    175 GitHub stars~4k tokensUpdated yesterday
    Auto-check passed
  • Chem Bond Dissociation

    learningmatter-mit/AtomisticSkills

    Calculate homolytic and heterolytic bond dissociation energies (BDEs) for all single bonds in a molecule using MLIPs with RDKit fragmentation.

    175 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Chem Conformer Search

    learningmatter-mit/AtomisticSkills

    Generate molecular conformers with RDKit ETKDG, relax with MLIPs, and rank by energy with Boltzmann weighting.

    175 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Chem DB Mof

    learningmatter-mit/AtomisticSkills

    Query multiple MOF databases (QMOF via MPContribs; ARC-MOF DB7/Majumdar et al.

    175 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed

Questions about ML Generative Diffcsp

What does ML Generative Diffcsp do?

Generate crystal structures with exact composition control using DiffCSP++ (space group + Wyckoff positions), or unconditionally from trained distributions. ML Generative Diffcsp is an agent skill from learningmatter-mit/AtomisticSkills. Generate crystal structures with exact composition control using DiffCSP++ (space group + Wyckoff positions), or unconditionally from trained distributions.

When should I use ML Generative Diffcsp?

ML Generative Diffcsp fits situations like: tasks that involve Physical and earth sciences.

How do I install ML Generative Diffcsp in Claude Code?

Run `npx skills add learningmatter-mit/AtomisticSkills --skill ml-generative-diffcsp -a claude-code`. Or copy the skill folder (skills/ml-generative-diffcsp in learningmatter-mit/AtomisticSkills) into .claude/skills/ml-generative-diffcsp in your project. Claude Code loads it when a task matches its description.

How do I install ML Generative Diffcsp in Codex?

Run `npx skills add learningmatter-mit/AtomisticSkills --skill ml-generative-diffcsp -a codex`. Or copy the skill folder (skills/ml-generative-diffcsp in learningmatter-mit/AtomisticSkills) into .agents/skills/ml-generative-diffcsp in your project. Codex loads it when a task matches its description.

Can I use ML Generative Diffcsp in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add learningmatter-mit/AtomisticSkills --skill ml-generative-diffcsp -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ml-generative-diffcsp, .gemini/skills/ml-generative-diffcsp, .github/skills/ml-generative-diffcsp and .opencode/skills/ml-generative-diffcsp in your project.

What does ML Generative Diffcsp need to run?

Going by SKILL.md and its folder, ML Generative Diffcsp needs the command-line tools its instructions call (git). Our summary lists: Python 3.

Does ML Generative Diffcsp access the network?

SKILL.md names 2 domains. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. As links in the text: drive.google.com. This is read from the text; nothing was executed.

Is ML Generative Diffcsp safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does ML Generative Diffcsp use?

ML Generative Diffcsp is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does ML Generative Diffcsp use?

About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to ML Generative Diffcsp?

Skills that share tags, products or a category with ML Generative Diffcsp: Astropy (zLanqing/codex-claude-academic-skills, 4.6k stars), Pymatgen (zLanqing/codex-claude-academic-skills, 4.6k stars), Cantera Ignition Delay (K-Dense-AI/scientific-agent-skills, 48k stars) and Weather (trpc-group/trpc-agent-go, 1.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains ML Generative Diffcsp?

learningmatter-mit (a GitHub organization) maintains it in learningmatter-mit/AtomisticSkills, which has 175 GitHub stars. The repository holds 129 skills in this directory. The repository was last updated on October 6, 2026.

Source: learningmatter-mit/AtomisticSkills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.