/atomistic-skills:mat-random-structure-searchfrom Atomistic Skills
Generates random crystal structures for a given composition (AIRSS-style) and relaxes them with MLIPs to find low-energy candidates for materials discovery.
Ships in Atomistic Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
[!NOTE] Steps written
server.toolare MCP tool calls:mace.relax_structureis therelax_structuretool of themaceserver (mcp__mace__relax_structure, ormcp__plugin_atomistic-skills_mace__relax_structurewhen 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 byload_modelstays loaded:${CLAUDE_SKILL_DIR}/../../venv/run mlip python -m src.mcp_server.cli mace relax_structure key=value
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.
Generate random structures for the target composition:
${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:
generation_manifest.jsonOptional 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 reproducibilityRelax all structures with an MLIP:
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.
Rank by energy: The lowest-energy relaxed structures are the most promising candidates. Check for duplicate structures using pymatgen's StructureMatcher.
Validate top candidates: Compute stability (E_hull) for the best candidates to assess thermodynamic viability.
${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.
${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/
StructureMatcher to remove duplicate structures that converge to the same minimum.Author: Bowen Deng Contact: GitHub @learningmatter-mit
examples/NaFeO2_search/README.md (opens in a new tab)examples/NaFeO2_search/best_structure.png (opens in a new tab)examples/NaFeO2_search/generation_manifest.json (opens in a new tab)examples/NaFeO2_search/relaxed_structures/basin_A_ground_state_R3m.cif (opens in a new tab)examples/NaFeO2_search/relaxed_structures/basin_B_metastable.cif (opens in a new tab)scripts/generate_random_structures.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub learningmatter-mit/atomisticskills --plugin atomistic-skills133 skills in this plugin
/chem-bond-dissociationCalculate homolytic and heterolytic bond dissociation energies (BDEs) for all single bonds in a molecule using MLIPs with RDKit fragmentation./chem-conformer-searchGenerate molecular conformers with RDKit ETKDG, relax with MLIPs, and rank by energy with Boltzmann weighting./chem-db-mofQuery multiple MOF databases (QMOF via MPContribs; ARC-MOF DB7/Majumdar et al. via Materials Cloud) and download CIF structures with optional element or identifier filters.Other plugins' skills for the same job