Agent skill

Mat Diffusion Analysis

by learningmatter-mit in learningmatter-mit/AtomisticSkills

Calculate ionic diffusion coefficients and activation energy from MD trajectories using pymatgen.

MITAuto-check passedResearch & Science

Install Mat Diffusion Analysis

skills CLI
$ npx skills add learningmatter-mit/AtomisticSkills --skill mat-diffusion-analysis -a claude-code

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

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

At a glance

Calculate ionic diffusion coefficients and activation energy from MD trajectories using pymatgen.

  • Works in 3 steps: MD Preparation: Run NVT or NPT MD… → Individual Diffusivity Analysis: For… → Activation Energy Fitting: Once all…
  • 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 Diffusion Analysis is an agent skill from learningmatter-mit/AtomisticSkills. Calculate ionic diffusion coefficients and activation energy from MD trajectories using pymatgen.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files, including scripts (for example `examples/LGPS/README.md`, `scripts/analyze_diffusion.py` and `scripts/calculate_activation_energy.py`).

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

  • “/mat-diffusion-analysis”

Requirements

  • Python 3

Workflow steps

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

  1. MD Preparation: Run NVT or NPT MD simulations at multiple temperatures (typically 4-6 points between 600K and 1200K).
  2. Individual Diffusivity Analysis: For each temperature directory that did not hit the early stopping criteria, run the analysis script to…
  3. Activation Energy Fitting: Once all individual results are generated, use the fitting script to combine data and perform a weighted…

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 2 files 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):

    • 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 Diffusion Analysis loads about 1k tokens when it runs. Until then it costs about 30 tokens; SKILL.md has 418 words of instructions outside code blocks.

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

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). 418 words, ~1,031 tokens.

Download SKILL.mdSave it as .claude/skills/mat-diffusion-analysis/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
mat-diffusion-analysis
description
Calculate ionic diffusion coefficients and activation energy from MD trajectories using pymatgen.
metadata.category
materials
metadata.venv
cpu

Diffusion Analysis

Goal

To accurately calculate the ionic diffusivity ($D$) and activation energy ($E_a$) of specific atomic species in a material using Molecular Dynamics (MD) trajectories and the Arrhenius relation: $D(T) = D_0 \exp\left(-\frac{E_a}{k_B T}\right)$.

Instructions

  1. MD Preparation: Run NVT or NPT MD simulations at multiple temperatures (typically 4-6 points between 600K and 1200K).

    • Use the run_md tool from a relevant potential skill (e.g., mace or matgl).
    • Batch Processing: You can pass a directory or a list of CIF paths to structure_data to run multiple MD simulations concurrently via the MCP tool.
    • Supercell Expansion: Ensure supercells are sufficiently large (> 10 Å in all dimensions). The run_md tool natively supports this via the supercell_min_length argument (defaults to 10.0 Å) which performs orthogonal expansion automatically.
    • Optimization: Use the diffusion monitor (see mat-md-monitors) to automatically stop simulations once the transport properties have converged.
      python
      mace.run_md(
          structure_data=["candidates/A.cif", "candidates/B.cif"],
          temperature=600,
          supercell_min_length=10.0,
          monitor=True,
          monitor_type="diffusion",
          monitor_params={"specie": "Li", "threshold": 0.05, "check_interval_ps": 5.0}
      )
      Note: If the diffusion monitor triggers an early stop, it will automatically save the diffusion_{specie}.json and msd_{specie}.png directly into the trajectory output directory. You can skip Step 2 and proceed directly to Step 3 for any trajectories that converged early.
  2. Individual Diffusivity Analysis: For each temperature directory that did not hit the early stopping criteria, run the analysis script to extract the diffusivity and Mean Square Displacement (MSD).

    bash
    ${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/analyze_diffusion.py \
        results/md_600K/trajectory.traj \
        --species Li \
        --temperature 600 \
        --ignore_ps 5.0 \
        --output_dir results/md_600K
    • --ignore_ps: Time to skip for equilibration. Default is 5.0 ps.
    • The script automatically detects the frame interval from the .log file if present.
  3. Activation Energy Fitting: Once all individual results are generated, use the fitting script to combine data and perform a weighted Arrhenius fit.

    bash
    ${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/calculate_activation_energy.py results/
    • The script looks for md_*K/diffusion_results.json patterns.
    • It performs error propagation to calculate uncertainty in $E_a$ and extrapolated room-temperature conductivity.
Show full SKILL.md (110 more words)Show less

Examples

  • Superionic Conductor (LGPS): A complete workflow demonstration including supercell preparation, multi-temperature MD, and final Arrhenius plotting for $Li_{10}GeP_2S_{12}$ is available in the LGPS Example.

Constraints

  • Trajectory Format: Trajectories MUST be in ASE .traj format.
  • Environments: All analysis scripts require the cpu environment.
  • Linearity: The diffusivity calculation assumes a linear diffusive regime. Always inspect the generated MSD plots to ensure linearity after the ignore_ps period.
  • Atom Count: To ensure statistical significance, the system should contain a sufficient number of mobile ions (> 20 recommended).
  • Paths: Always use relative paths from the project root when executing scripts.

See Also


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 10 other files (scripts) in skills/mat-diffusion-analysis of learningmatter-mit/AtomisticSkills.

  • SKILL.md
  • examples/LGPS/LGPS_221.cif
  • examples/LGPS/README.md
  • examples/LGPS/arrhenius_plot.png
  • examples/LGPS/msd_Li_1000K.png
  • examples/LGPS/msd_Li_600K.png
  • examples/LGPS/msd_Li_700K.png
  • examples/LGPS/msd_Li_800K.png
  • examples/LGPS/msd_Li_900K.png
  • scripts/analyze_diffusion.py
  • scripts/calculate_activation_energy.py

Open the folder on GitHubat commit 7f2d86d

Compare with similar skills

Mat Diffusion Analysis 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 Diffusion Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mat Diffusion Analysis this skilllearningmatter-mit/AtomisticSkills175—~1kAutomated 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 Mat Diffusion Analysis

What does Mat Diffusion Analysis do?

Calculate ionic diffusion coefficients and activation energy from MD trajectories using pymatgen. Mat Diffusion Analysis is an agent skill from learningmatter-mit/AtomisticSkills. Calculate ionic diffusion coefficients and activation energy from MD trajectories using pymatgen.

When should I use Mat Diffusion Analysis?

Mat Diffusion Analysis fits situations like: tasks that involve Physical and earth sciences.

How do I install Mat Diffusion Analysis in Claude Code?

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

How do I install Mat Diffusion Analysis in Codex?

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

Can I use Mat Diffusion Analysis 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-diffusion-analysis -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-diffusion-analysis, .gemini/skills/mat-diffusion-analysis, .github/skills/mat-diffusion-analysis and .opencode/skills/mat-diffusion-analysis in your project.

What does Mat Diffusion Analysis need to run?

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

Does Mat Diffusion Analysis access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Mat Diffusion Analysis 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 Diffusion Analysis use?

Mat Diffusion Analysis 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 Diffusion Analysis use?

About 1k tokens (SKILL.md is roughly 4.1k 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 Diffusion Analysis?

Skills that share tags, products or a category with Mat Diffusion Analysis: 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 Mat Diffusion Analysis?

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.