mat-ionic-substitution
Discover new crystal structures by data-mined ionic substitution — propose candidates from existing structures (forward) or find potential structures for a…
Skill by learningmatter-mit
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/learningmatter-mit-mat-ionic-substitution
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: data
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/mat-ionic-substitution
What's inside
- Skill name
mat-ionic-substitution- Description
- Discover new crystal structures by data-mined ionic substitution — propose candidates from existing structures (forward) or find potential structures for a target composition (reverse).
- License
- MIT
- Instructions
- 104 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (18)
- SKILL.md
- 000_Li2ZrCl6_from_Li2ZrF6_mp-542219.cif · examples/Li2ZrCl6_reverse/
- 001_Li2ZrCl6_from_Li2ZrF6_mp-556176.cif · examples/Li2ZrCl6_reverse/
- 002_Li2ZrCl6_from_Li2ZrF6_mp-4002.cif · examples/Li2ZrCl6_reverse/
- 003_Li2ZrCl6_from_Rb2ZrCl6_mp-27831.cif · examples/Li2ZrCl6_reverse/
- 004_Li2ZrCl6_from_Na2ZrF6_mp-27307.cif · examples/Li2ZrCl6_reverse/
- README.md · examples/Li2ZrCl6_reverse/
- structure_manifest.json · examples/Li2ZrCl6_reverse/
- 000_NaFeO2.cif · examples/NaCoO2_forward/
- 001_NaScO2.cif · examples/NaCoO2_forward/
- 002_NaCrO2.cif · examples/NaCoO2_forward/
- 003_NaAlO2.cif · examples/NaCoO2_forward/
- 004_NaMnO2.cif · examples/NaCoO2_forward/
- 016_LiCoO2.cif · examples/NaCoO2_forward/
- README.md · examples/NaCoO2_forward/
- substitution_manifest.json · examples/NaCoO2_forward/
- find_structures_for_composition.py · scripts/
- propose_substitutions.py · scripts/
SKILL.md (first lines)
# Ionic Substitution
## Goal
To discover new crystal structures using data-mined ionic substitution (Hautier et al. 2011). Two modes:
1. **Forward (propose)**: Given an existing structure, propose all high-probability ion-substituted variants. E.g., input NaCoO₂ → get LiCoO₂, KCoO₂, NaNiO₂, etc.
2. **Reverse (find)**: Given a target composition, find all known crystal structures that can be ion-substituted to create it, plus direct matches from Materials Project.
The substitution probability model is trained on the ICSD (Inorganic Crystal Structure Database) and captures empirical chemical rules about which ions commonly substitute for each other.
> [!TIP]
> After generating candidate structures, relax them with an MLIP and compute their [stability (E_hull)](../mat-stability/SKILL.md) to prioritize the most thermodynamically viable candidates.
## Instructions
### Mode 1: Forward — Propose substitutions from a structure
1. **Prepare a source structure** (CIF or POSCAR). Ensure it is an ordered structure.
2. **Run the forward proposal script**:
```bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/propose_substitutions.py \
--structure source.cif \
--threshold 0.001 \
--output_dir proposed_substitutions/
```
The script will:
- Auto-decorate the structure with oxidation states (if not already present)
- Enumerate all charge-balanced ionic substitutions above the threshold
- Handle single-ion, double-ion, and multi-ion swaps
- Save each substituted structure as a CIF file
- Generate a `substitution_manifest.json` with substitution maps and probabilities
3. **Review and filter results**: Higher probability → more likely to be stable. Relax top candidates with an MLIP.
### Mode 2: Reverse — Find structures for a target composition
1. **Run the reverse search script**:
```bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/find_structures_for_composition.py \
--composition LiCl \
--threshold 0.001 \
--output_dir structures_for_LiCl/
```
The script will:
- **Step A**: Query Materials Project for existing structures with the target formula
- **Step B**: Use `SubstitutionPredictor` to find precursor compositions whose ions map to the target
- **Step C**: Fetch precursor structures from MP and apply the substitutions
- Save all candidate CIF files and a `structure_manifest.json` with full provenance
2. **Interpret results**: Each candidate includes:
- Source: `"materials_project"` (direct match) or `"substitution"` (derived)
- Substitution map: e.g., `{Na+→Li+}` and probability
- Precursor MP material ID for traceability
### Mode 3: Manual Targeted Substitution via MCP
If you already know the exact substitution you want to make on a specific structure, you can immediately generate the new structure using the base MCP server's `modify_structure` tool:
- **`modify_structure` tool**: Maps an existing element to a new element or fraction.
- Example 1 (Full replacement): `substitution_dict_json='{"Na": "Li"}'` (Replaces all Na with Li)
- Example 2 (Partial/Alloying): `substitution_dict_json='{"Na": {"Li": 0.5, "Na": 0.5}}'` (Creates a 50/50 random mixture)
## Examples
### Example 1: Discover new Li-ion cathode from NaCoO₂
```bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/propose_substitutions.py \
--structure NaCoO2.cif \
--threshold 0.001 \
--output_dir NaCoO2_substitutions/
```
Expected output includes: LiCoO₂, KCoO₂, NaNiO₂, NaMnO₂, LiNiO₂, etc.
### Example 2: Find all crystal structures for LiCl
```bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/find_structures_for_composition.py \
--composition LiCl \
--output_dir LiCl_structures/
```
Expected output includes: LiCl from MP + NaCl(Na→Li), KCl(K→Li), NaBr(Na→Li, Br→Cl), etc.
## Constraints
- **Oxidation States**: The probability model requires oxidation-state-decorated structures. The scripts auto-decorate using pymatgen's `AutoOxiStateDecorationTransformation`, but exotic compositions may fail.
- **Charge Balance**: Only charge-balanced substitutions are returned. This is enforced automatically.
- **Threshold**: Default 0.001. Lower values (e.g., 0.0001) find more candidates but include less probable substitutions. Higher values (e.g., 0.01) give fewer, more confident results.
- **MP API Key**: The reverse script requires `MP_API_KEY` environment variable to query Materials Project.
- **Structure Count**: The number of species in the structure determines the combinatorial space. Structures with 2–3 unique species work best; structures with 5+ species may produce very large result sets.
- **Relaxation**: Generated structures are **not relaxed**. Always relax with an MLIP before drawing conclusions about stability.
## References
- Hautier, G., Fischer, C., Ehrlacher, V., Jain, A., & Ceder, G. (2011). Data Mined Ionic Substitutions for the Discovery of New Compounds. *Inorganic Chemistry*, 50(2), 656–663. [DOI: 10.1021/ic102031h](https://doi.org/10.1021/ic102031h)
---
**Author:** Bowen Deng
**Contact:** [GitHub @learningmatter-mit](https://github.com/learningmatter-mit)From learningmatter-mit/AtomisticSkills, MIT.
More from learningmatter-mit/AtomisticSkills
- 0.681score
drug-complex-system-builder
learningmatter-mit
Build a solvated, charge-neutralized protein-ligand complex for OpenMM molecular dynamics simulation.
SkillAFreshness: A★ 183Claude Code +9 - 0.681score
drug-binding-site-definition
learningmatter-mit
Define a docking search box (center coordinates + box dimensions in Angstroms) from a co-crystal ligand, binding-site residues, or a saved JSON specification.
SkillAFreshness: A★ 183Claude Code +9 - 0.681score
drug-mmpbsa-gbsa
learningmatter-mit
Compute single-trajectory MM-GBSA and / or MM-PBSA binding free energy estimates from a protein-ligand MD trajectory.
SkillAFreshness: A★ 183Claude Code +9 - 0.681score
drug-pocket-detection
learningmatter-mit
Identify and rank ligandable pockets on a protein structure or model using geometry (fpocket) or an ML predictor (P2Rank).
SkillAFreshness: A★ 183Claude Code +9 - 0.678score
chem-sorption-relax
learningmatter-mit
Prepares supercells for porous frameworks based on minimum interplanar distance and relaxes them using standard MLIP relaxation tools.
SkillAFreshness: A★ 183Claude Code +9 - 0.678score
drug-protein-ligand-md
learningmatter-mit
Run a protein-ligand MD simulation in OpenMM with energy minimization, restrained equilibration, and production NPT, producing trajectory and checkpoint files…
SkillAFreshness: A★ 183Claude Code +9 - 0.678score
chem-db-qmof
learningmatter-mit
Query the Quantum MOF (QMOF) database via Materials Project's MPContribs platform for DFT-computed properties (bandgap) and optimized crystal structures of…
SkillAFreshness: A★ 183Claude Code +9 - 0.678score
chem-bond-dissociation
learningmatter-mit
Calculate homolytic and heterolytic bond dissociation energies (BDEs) for all single bonds in a molecule using MLIPs with RDKit fragmentation.
SkillAFreshness: A★ 183Claude Code +9 - 0.678score
chem-hazard-toxicity
learningmatter-mit
Extract explicit safety warnings, GHS classifications, LD50 toxicity profiles, and acute oral toxicity triage from PubChem PUG VIEW.
SkillAFreshness: A★ 183Claude Code +9 - 0.678score
drug-redocking-rmsd
learningmatter-mit
Compute symmetry-corrected heavy-atom RMSD between docked poses and a reference crystal ligand to validate docking protocols.
SkillAFreshness: A★ 183Claude Code +9 - 0.678score
drug-pose-validation
learningmatter-mit
Validate docked or generated ligand poses for physical plausibility using PoseBusters, filtering out chemically invalid or clashing poses before downstream…
SkillAFreshness: A★ 183Claude Code +9 - 0.678score
chem-dft-orca-optimization
learningmatter-mit
Run DFT geometry optimization (minimization or TS search) on a molecular structure using ORCA via SCINE/ReaDuct wrapper.
SkillAFreshness: A★ 183Claude Code +9
Signals
- Stars
- 183
- Forks
- 31
- Open issues
- 0
- Last commit (this folder)
- Oct 5, 2026 (23 days ago)
- Last release
- Oct 6, 2026 (22 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Website
- arxiv.org/abs/2605.24002
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from learningmatter-mit
- 0.681score
drug-binding-site-definition
learningmatter-mit
Define a docking search box (center coordinates + box dimensions in Angstroms) from a co-crystal ligand, binding-site residues, or a saved JSON specification.
SkillAFreshness: A★ 183Claude Code +9 - 0.681score
drug-complex-system-builder
learningmatter-mit
Build a solvated, charge-neutralized protein-ligand complex for OpenMM molecular dynamics simulation.
SkillAFreshness: A★ 183Claude Code +9 - 0.681score
drug-mmpbsa-gbsa
learningmatter-mit
Compute single-trajectory MM-GBSA and / or MM-PBSA binding free energy estimates from a protein-ligand MD trajectory.
SkillAFreshness: A★ 183Claude Code +9 - 0.681score
drug-pocket-detection
learningmatter-mit
Identify and rank ligandable pockets on a protein structure or model using geometry (fpocket) or an ML predictor (P2Rank).
SkillAFreshness: A★ 183Claude Code +9 - 0.678score
drug-pose-validation
learningmatter-mit
Validate docked or generated ligand poses for physical plausibility using PoseBusters, filtering out chemically invalid or clashing poses before downstream…
SkillAFreshness: A★ 183Claude Code +9 - 0.678score
chem-sorption-relax
learningmatter-mit
Prepares supercells for porous frameworks based on minimum interplanar distance and relaxes them using standard MLIP relaxation tools.
SkillAFreshness: A★ 183Claude Code +9
Cite this page
mat-ionic-substitution skill. Agent Mart. https://agentmart.dev/skills/learningmatter-mit-mat-ionic-substitution (last updated 2026-10-24)