Agent skill

Mat Random Structure Search

by learningmatter-mit in learningmatter-mit/AtomisticSkills

Generate random crystal structures for a given composition (AIRSS-style) and relax with MLIPs to find low-energy candidates.

MITAuto-check passedResearch & Science

Install Mat Random Structure Search

skills CLI
$ npx skills add learningmatter-mit/AtomisticSkills --skill mat-random-structure-search -a claude-code

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

GitHub CLI
$ gh skill install learningmatter-mit/AtomisticSkills mat-random-structure-search --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/mat-random-structure-search .claude/skills/mat-random-structure-search && 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
mat-random-structure-search
GitHub stars
176
Token cost
~1.2k tokens
SKILL.md length
416 words
Files
7 (incl. scripts)
Skills in repo
129
Repo updated
First seen
Licence
MIT

At a glance

Generate random crystal structures for a given composition (AIRSS-style) and relax with MLIPs to find low-energy candidates.

  • Works in 4 steps: Generate random structures for the… → Relax all structures with an MLIP → Rank by energy: The lowest-energy… → …
  • Tasks that involve Physical and earth sciences
  • SKILL.md covers Goal, Instructions, Examples and Constraints, plus 1 more section
  • Runs Python scripts from its folder

What it does

Mat Random Structure Search is an agent skill from learningmatter-mit/AtomisticSkills. Generate random crystal structures for a given composition (AIRSS-style) and relax with MLIPs to find low-energy candidates.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including scripts (for example `examples/NaFeO2_search/README.md`, `examples/NaFeO2_search/generation_manifest.json` and `scripts/generate_random_structures.py`).

It sits in Research & Science, covering Physical and earth sciences. It works with Model Context Protocol. 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

  • “/mat-random-structure-search”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Generate random structures for the target composition
  2. Relax all structures with an MLIP
  3. Rank by energy: The lowest-energy relaxed structures are the most promising candidates. Check for duplicate structures using pymatgen's…
  4. Validate top candidates: Compute stability (E_hull) for the best candidates to assess thermodynamic viability.

What it can do on your machine

Read from SKILL.md and the folder at commit 6257444. 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/ (Python), which the agent can run.

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

  • Network

    Links to these hosts (documentation or services it may open):

    • doi.org
    • github.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

Mat Random Structure Search loads about 1.2k tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 416 words of instructions outside code blocks.

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

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 6257444, republished under its MIT licence (© learningmatter-mit). 416 words, ~1,181 tokens.

Download SKILL.mdSave it as .claude/skills/mat-random-structure-search/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
mat-random-structure-search
description
Generate random crystal structures for a given composition (AIRSS-style) and relax with MLIPs to find low-energy candidates.
metadata.category
materials
metadata.venv
cpu, mlip

Random Structure Search (AIRSS-Style)

<!-- mcp-tools-note -->

[!NOTE] Steps written server.tool are MCP tool calls: mace.relax_structure is the relax_structure tool of the mace server (mcp__mace__relax_structure, or mcp__plugin_atomistic-skills_mace__relax_structure when installed as a plugin). Without a connected server, run the same tools from the shell. Tools named in one command share a process, so a model loaded by load_model stays loaded:

bash
${CLAUDE_SKILL_DIR}/../../venv/run mlip python -m src.mcp_server.cli mace relax_structure key=value

Goal

To perform random structure searching (RSS) for a given chemical composition — the approach pioneered by AIRSS (Ab Initio Random Structure Searching, Pickard & Needs 2011). Random crystal structures are generated with sensible geometric constraints, then relaxed with an MLIP to identify low-energy candidates.

[!TIP] This method is complementary to ionic substitution and generative models like MatterGen and DiffCSP++. RSS explores the full potential energy surface without structural bias.

Instructions

  1. Generate random structures for the target composition:

    bash
    ${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/generate_random_structures.py \
        --composition NaCl \
        --num_structures 100 \
        --output_dir random_NaCl/

    The script will:

    • Sample random space groups from a list of common inorganic crystal space groups
    • Generate random lattice parameters consistent with each crystal system
    • Place atoms at random fractional coordinates
    • Filter structures for minimum interatomic distances
    • Save CIF files and a generation_manifest.json

    Optional parameters:

    • --spacegroups 225,166,62,14 — restrict to specific space groups
    • --volume_min 0.6 --volume_max 1.8 — control volume randomization range
    • --seed 42 — set random seed for reproducibility
  2. Relax all structures with an MLIP:

    bash
    mace.relax_structure(
        structure_data="random_NaCl/",
        relax_cell=True,
        fmax=0.02,
        steps=500,
        output_dir="relaxed_NaCl/"
    )

    Or with MatGL/FairChem — use the same MLIP consistently.

  3. Rank by energy: The lowest-energy relaxed structures are the most promising candidates. Check for duplicate structures using pymatgen's StructureMatcher.

  4. Validate top candidates: Compute stability (E_hull) for the best candidates to assess thermodynamic viability.

Show full SKILL.md (157 more words)Show less

Examples

Example 1: Search for NaCl ground state
bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/generate_random_structures.py \
    --composition NaCl \
    --num_structures 100 \
    --seed 42 \
    --output_dir random_NaCl/

Expected: Rocksalt (SG 225) should emerge as the lowest-energy structure after MLIP relaxation.

Example 2: Search for Li₂ZrCl₆ polymorphs
bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/generate_random_structures.py \
    --composition Li2ZrCl6 \
    --num_structures 200 \
    --spacegroups 12,14,62,148,166,167 \
    --output_dir random_Li2ZrCl6/

Constraints

  • Not a DFT method: Unlike true AIRSS, this skill uses MLIPs for relaxation. The accuracy depends on the MLIP's quality for the target chemistry.
  • No symmetry enforcement: Generated structures have atoms at random positions (P1). Symmetry emerges only after relaxation.
  • Volume range: The default volume range (0.6–1.8× estimated) covers most reasonable crystal packings. Extreme chemistries (e.g., heavy elements, molecular crystals) may need adjusted ranges.
  • Scalability: Generation is fast (~100 structures/second), but MLIP relaxation is the bottleneck. For large-scale searches, use batch relaxation via MCP tools.
  • Duplicate removal: After relaxation, use StructureMatcher to remove duplicate structures that converge to the same minimum.

References


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 6 other files (scripts) in skills/mat-random-structure-search of learningmatter-mit/AtomisticSkills.

  • SKILL.md
  • examples/NaFeO2_search/README.md
  • examples/NaFeO2_search/best_structure.png
  • examples/NaFeO2_search/generation_manifest.json
  • examples/NaFeO2_search/relaxed_structures/basin_A_ground_state_R3m.cif
  • examples/NaFeO2_search/relaxed_structures/basin_B_metastable.cif
  • scripts/generate_random_structures.py

Open the folder on GitHubat commit 6257444

Compare with similar skills

Mat Random Structure Search 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.

Mat Random Structure Search compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mat Random Structure Search this skilllearningmatter-mit/AtomisticSkills176—~1.2kAutomated safety check: PassMIT
Chemgraphargonne-lcf/ChemGraph162—~743Automated safety check: PassApache-2.0
Run Fluent AutoclaveCai-aa/CAE-Agent-Hub998—~984Automated safety check: PassMIT
TamarindK-Dense-AI/scientific-agent-skills48k1 repos~3.4kAutomated safety check: PassMIT
Chemgraphargonne-lcf/ChemGraph162—~2.7kAutomated safety check: PassApache-2.0
Cantera Ignition DelayK-Dense-AI/scientific-agent-skills48k2 repos~2.2kAutomated safety check: PassMIT

Similar skills

  • Chemgraph

    argonne-lcf/ChemGraph

    Use ChemGraph Python and CLI workflows, agent-written batch scripts, and attached chemistry MCP tools.

    162 GitHub stars~743 tokensUpdated today
    Research & ScienceAuto-check passed
  • Run Fluent Autoclave

    Cai-aa/CAE-Agent-Hub

    Run, diagnose, reproduce, and validate ANSYS Fluent CFD simulations of forced-convection autoclaves using Fluent MCP or PyFluent.

    998 GitHub stars~984 tokensUpdated 7 days ago
    Research & ScienceAuto-check passed
  • Tamarind

    K-Dense-AI/scientific-agent-skills

    Provides access to a collection of open-source molecular design and structural biology tools on the Tamarind Bio platform, via its REST API or MCP server — no local GPUs required.

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

    argonne-lcf/ChemGraph

    Develop, test, and extend ChemGraph -- an agentic framework for automated molecular simulations using LLMs, LangGraph, ASE, and MCP servers

    162 GitHub stars~2.7k tokensUpdated today
    AI & LLM EngineeringAuto-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 2 repos~2.2k tokens
    Research & ScienceAuto-check passed
  • 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

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.

    176 GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Drug Complex System Builder

    learningmatter-mit/AtomisticSkills

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

    176 GitHub stars~2k tokensUpdated today
    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).

    176 GitHub stars~4k tokensUpdated today
    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.

    176 GitHub stars~2.5k tokensUpdated today
    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.

    176 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Chem DB Mof

    learningmatter-mit/AtomisticSkills

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

    176 GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Questions about Mat Random Structure Search

What does Mat Random Structure Search do?

Generate random crystal structures for a given composition (AIRSS-style) and relax with MLIPs to find low-energy candidates. Mat Random Structure Search is an agent skill from learningmatter-mit/AtomisticSkills. Generate random crystal structures for a given composition (AIRSS-style) and relax with MLIPs to find low-energy candidates.

When should I use Mat Random Structure Search?

Mat Random Structure Search fits situations like: tasks that involve Physical and earth sciences.

How do I install Mat Random Structure Search in Claude Code?

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

How do I install Mat Random Structure Search in Codex?

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

Can I use Mat Random Structure Search 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 mat-random-structure-search -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mat-random-structure-search, .gemini/skills/mat-random-structure-search, .github/skills/mat-random-structure-search and .opencode/skills/mat-random-structure-search in your project.

What does Mat Random Structure Search need to run?

Going by SKILL.md and its folder, Mat Random Structure Search needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Mat Random Structure Search access the network?

SKILL.md names 2 domains. As links in the text: doi.org and github.com. This is read from the text; nothing was executed.

Is Mat Random Structure Search 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 Mat Random Structure Search use?

Mat Random Structure Search 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 Mat Random Structure Search use?

About 1.2k tokens (SKILL.md is roughly 4.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 Mat Random Structure Search?

Skills that share tags, products or a category with Mat Random Structure Search: Chemgraph (argonne-lcf/ChemGraph, 162 stars), Run Fluent Autoclave (Cai-aa/CAE-Agent-Hub, 998 stars), Tamarind (K-Dense-AI/scientific-agent-skills, 48k stars) and Chemgraph (argonne-lcf/ChemGraph, 162 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mat Random Structure Search?

learningmatter-mit (a GitHub organization) maintains it in learningmatter-mit/AtomisticSkills, which has 176 GitHub stars. The repository holds 129 skills in this directory. The repository was last updated on October 7, 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.