/atomistic-skills:mat-intercalation-voltagefrom Atomistic Skills
Calculates average intercalation voltage of cathode materials using MLIPs (MACE, CHGNet) by computing energy differences between intercalated and de-intercalated states.
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.load_modelis theload_modeltool of themaceserver (mcp__mace__load_model, ormcp__plugin_atomistic-skills_mace__load_modelwhen 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 load_model key=value relax_structure key=value
To calculate the average open-circuit voltage (OCV) of an intercalation cathode material (e.g., Li$_x$M$_y$O$_z$) by computing the energy difference between the fully intercalated and de-intercalated states.
The average voltage $V$ is given by: $$V = -\frac{E(\text{full}) - E(\text{empty}) - n \mu_{\text{metal}}}{n z}$$ where $E$ is the total energy in eV, $n$ is the number of intercalated ions, $z$ is the positive number of electrons transferred per ion, and $\mu_{\text{metal}}$ is the chemical potential per atom of the bulk metal. With these units, $V$ is in volts. Set $z=1$ for a monovalent reaction or $z=2$ for a divalent reaction; the script does not infer $z$ from the metal symbol.
Prepare Structures:
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/remove_atoms.py \
LiFePO4.cif \
--remove Li \
--output FePO4.cif
resources/ (e.g., Li_metal.cif)Select Foundation Potential:
Choose an appropriate MLIP based on the system (see foundation-potentials.md). For cathode materials, MACE-MH-1 with matpes_r2scan head or CHGNet-MatPES-r2SCAN are recommended.
Relax Structures Using MCP Tools:
Load the model and relax all three structures:
# Load the model (example with MACE)
mace.load_model(model_name="MACE-MH-1", task_name="matpes_r2scan")
# Relax full structure
mace.relax_structure(
structure_data="LiFePO4.cif",
output_dir="voltage_calc/full_relax"
)
# Relax empty structure
mace.relax_structure(
structure_data="FePO4.cif",
output_dir="voltage_calc/empty_relax"
)
# Relax bulk metal
mace.relax_structure(
structure_data="${CLAUDE_SKILL_DIR}/resources/Li_metal.cif",
output_dir="voltage_calc/metal_relax"
)
Extract Energies: From each relaxation output directory, extract:
E_full: Energy from full_relax/result.jsonE_empty: Energy from empty_relax/result.jsonE_metal: Energy from metal_relax/result.jsonn_metal: Number of atoms in the relaxed metal structuren_ions: Count difference of intercalating ions between full and empty structuresCalculate Voltage:
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/calculate_voltage.py \
--e_full -123.45 \
--e_empty -98.76 \
--e_metal -1.23 \
--n_metal 16 \
--n_ions 4 \
--electrons_per_ion 1 \
--metal Li \
--output voltage_calc/voltage_results.json
Parameters:
--e_full: Total energy of fully intercalated structure (eV)--e_empty: Total energy of de-intercalated structure (eV)--e_metal: Total energy of bulk metal structure (eV)--n_metal: Number of metal atoms in the bulk metal structure--n_ions: Number of intercalated ions (difference between full and empty)--electrons_per_ion: Positive finite electrons transferred per ion (default 1). Use --electrons_per_ion 2 for a Mg²⁺/Mg, Ca²⁺/Ca or Zn²⁺/Zn reaction.--metal: Symbol of intercalating ion (optional, for documentation)--output: Path to save results as JSON (optional)The result records electrons_per_ion and the total transferred electron count n_electrons, in addition to the voltage and reaction energies. The default preserves existing monovalent calls.
The following bulk metal structures are available in resources/:
Li_metal.cif - Lithium (BCC)Na_metal.cif - Sodium (BCC)Mg_metal.cif - Magnesium (HCP)Ca_metal.cif - Calcium (FCC)K_metal.cif - Potassium (BCC)Zn_metal.cif - Zinc (HCP)All structures are queried from Materials Project and represent the most stable phases.
See examples/LiFePO4/ for a complete worked example (MACE-MH-1 r2SCAN, 3.26 V vs 3.4 V experimental).
resources/ which are the most stable phases from Materials ProjectAuthor: Bowen Deng Contact: GitHub @learningmatter-mit
examples/LiFePO4/README.md (opens in a new tab)examples/LiFePO4/voltage_results.json (opens in a new tab)resources/Ca_metal.cif (opens in a new tab)resources/K_metal.cif (opens in a new tab)resources/Li_metal.cif (opens in a new tab)resources/Mg_metal.cif (opens in a new tab)resources/Na_metal.cif (opens in a new tab)resources/Zn_metal.cif (opens in a new tab)scripts/calculate_voltage.py (opens in a new tab)scripts/remove_atoms.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