Md Analysis Planner logo

Md Analysis Planner

Community
HeshamFS
md-analysis-planner

Plan molecular dynamics post-processing for materials simulations, including RDF, MSD and diffusion, VACF/VDOS, coordination numbers, bond-angle distributions, stress-strain curves, equilibration detection, PBC unwrapping, and trajectory format choices. Use before writing MD analysis scripts or trusting trajectory-derived results.

Overview

PublisherHeshamFS
Repositorymaterials-simulation-skills
Skill namemd-analysis-planner
Stars
83
Forks
6
Bundled files
4
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by HeshamFS on GitHub. Read the source before you install it.

Installation

Install the Md Analysis Planner AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/HeshamFS/materials-simulation-skills/tree/main/skills/simulation-workflow/md-analysis-planner
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/HeshamFS/materials-simulation-skills.git /tmp/materials-simulation-skills
mkdir -p .claude/skills
cp -r /tmp/materials-simulation-skills/skills/simulation-workflow/md-analysis-planner .claude/skills/md-analysis-planner
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Md Analysis Planner in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Md Analysis Planner on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Md Analysis Planner is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

MD Analysis Planner

Goal

Choose the right MD trajectory analyses and prerequisites before writing post-processing code.

Requirements

  • Python 3.10+
  • No external dependencies
  • Works on Linux, macOS, and Windows

Inputs to Gather

InputDescriptionExample
SystemMaterial or molecular systemoxide glass, liquid water
GoalsAnalysis goalsrdf,diffusion,coordination
Trajectory formatDump, DCD, XYZ, H5MD, etc.LAMMPS dump
VelocitiesWhether velocities are storedtrue
StressWhether stress/virial is storedtrue
Unwrap neededWhether atoms cross PBCtrue
Timestepfs per saved frame10

Decision Guidance

  • Use RDF and coordination for local structure.
  • Use MSD for diffusion, but unwrap trajectories and verify diffusive regime.
  • Use VACF/VDOS only when velocities or reliable finite-difference velocities exist.
  • Use stress-strain only if stress/virial and deformation history are available.
  • Always perform equilibration checks before fitting transport or thermodynamic properties.

Script Outputs

scripts/md_analysis_planner.py emits these fields (JSON under results):

FieldDescription
analysis_planOne entry per goal: goal, method, and status
required_dataSorted, de-duplicated data needed across all goals
equilibration_checksStandard pre-fit equilibration checklist
pbc_handlingunwrap_needed, minimum_action, format_note
warningsSafety-critical caveats and blockers

Status values

status is one of, from most to least severe: blocked > needs time axis > needs review > ready. A more-severe status is never demoted by a less-severe one. For example, a VACF/VDOS goal with no stored velocities reports blocked even when the timestep is also missing (both warnings are still emitted).

Default (non-JSON) output

Without --json the script prints the plan lines, a Required data: list, a one-line PBC: note, and a Warnings: section (also mirrored to stderr) so the safety-critical caveats are visible even when stdout is piped.

Workflow

bash
python3 skills/simulation-workflow/md-analysis-planner/scripts/md_analysis_planner.py \
  --system "oxide glass" \
  --goals rdf,coordination,bond-angle \
  --trajectory-format dump \
  --unwrap-needed \
  --timestep-fs 10 \
  --json

Error Handling

If velocities, stress, or timestep information is missing, downgrade dependent analyses and report warnings. The script exits with code 2 and a message on stderr for invalid input (empty system, no goals, non-positive or non-finite timestep, or inputs exceeding the size caps below).

Limitations

This skill plans analysis and prerequisites; it does not parse large trajectories directly.

Verification checklist

Do not trust trajectory-derived results until each applicable item below is recorded against the planner's own output:

  • Ran scripts/md_analysis_planner.py and confirmed no analysis_plan entry is blocked or needs time axis; record any needs review goal and how its custom analysis was resolved.
  • Confirmed every item in the planner's required_data list is actually present in the trajectory (e.g. velocities for VACF/VDOS, stress or virial + strain history for stress-strain) before running the corresponding analysis.
  • For diffusion/MSD: recorded the log-log MSD-vs-time slope and confirmed it is ~1 (diffusive regime) over the fit window, excluding ballistic/sub-diffusive transients, before quoting D = lim MSD/(2dt).
  • For diffusion/MSD: assessed whether a hydrodynamic finite-size correction is applicable. For isotropic bulk fluids in 3D periodic cubic cells, record L, T and shear viscosity eta if applying Yeh-Hummer (D_0 = D_PBC + k_BTxi/(6pieta*L), xi~=2.837). Report the measured D_PBC, the correction and its assumptions separately. Do not apply this formula automatically to solids, confined or anisotropic systems, non-cubic cells or ballistic trajectories.
  • For any displacement-based analysis when pbc_handling.unwrap_needed is true: confirmed positions were unwrapped using cell + image flags before computing displacements (not raw wrapped coordinates).
  • Worked through the planner's equilibration_checks: discarded the startup transient, confirmed temperature/pressure plateaus, and compared first-half vs second-half property estimates before any transport/thermodynamic fit.
  • Reported an uncertainty from block averaging (or independent trajectories) for every quoted transport/thermodynamic property, not a single-window point value.

Common pitfalls & rationalizations

Tempting shortcutWhy it's wrong / what to do
"MSD vs time looks straight, so it's diffusive — just fit a line."A straight-looking MSD can still include ballistic/sub-diffusive transients. Confirm the log-log slope is ~1 over the fit window first, then fit D = lim MSD/(2dt).
"D from the simulation is the diffusion coefficient."Assess size dependence and report D_PBC. The Yeh-Hummer 1/L hydrodynamic correction applies under bulk-fluid, 3D periodic cubic-cell assumptions; justify those assumptions and the viscosity before separately reporting a corrected D_0.
"Positions are in the dump, so MSD is fine."Wrapped coordinates make atoms jump across the box and corrupt displacements. When unwrap_needed is true, unwrap using cell + image flags before any displacement analysis.
"No velocities stored, but I can get VACF/VDOS from positions."The planner marks VACF/VDOS blocked without velocities for a reason. A finite-difference velocity estimate must be explicitly justified (frame spacing, aliasing); otherwise the result is unreliable.
"The run finished, so I can fit transport properties on the whole trajectory."Run completion is not equilibration. Discard the startup transient and verify temperature/pressure plateaus (the equilibration_checks) before fitting.
"One window gave a clean number, no need for error bars."A single window hides correlation-driven variance. Use block averaging or independent trajectories so every transport/thermodynamic value carries an uncertainty.

Security

Input Validation

Inputs are scalar CLI values and booleans only. plan_md_analysis validates and bounds every field before use; any violation raises ValueError, which main catches to print a message on stderr and exit with code 2:

  • system must be non-empty (after stripping) and at most 256 characters.
  • At most 64 goals are allowed; each goal at most 256 characters.
  • trajectory_format at most 256 characters.
  • timestep_fs, if given, must be a positive, finite number (math.isfinite and > 0).

Goals are not allowlisted: an unrecognized goal is not rejected but is reported with status needs review and an "unknown goal" warning. The --has-velocities, --has-stress, and --unwrap-needed flags are plain booleans and need no validation.

File Access

The script reads and writes no files; all I/O is stdin/args -> stdout (plain text or JSON), with warnings additionally mirrored to stderr. It takes no path arguments and opens no trajectory or output files, so there is no filesystem sandboxing concern. There are no per-file size limits because no files are read; input size is instead capped by the field/goal limits above.

Tool Restrictions

Frontmatter allowed-tools is Read, Bash, Write, Grep, Glob:

  • Bash is used only to run the bundled scripts/md_analysis_planner.py.
  • Read, Write, Grep, and Glob are used only to inspect, edit, and search this skill's own files (the script, references, and SKILL.md) when authoring analysis plans; they are not used to touch trajectory data.

Safety Measures

  • No use of eval, exec, os.system, or dynamic imports.
  • The script spawns no subprocesses and executes no external analysis programs; it only parses arguments with argparse and computes a plan in-process.
  • Output is structured JSON produced via json.dumps (or deterministic plain text), never interpolated shell.
  • Denial-of-service caps (MAX_GOALS = 64, MAX_SYSTEM_LEN = 256, MAX_FIELD_LEN = 256) bound the work so a planning helper never materializes pathological input.

References

For a final readiness explanation from trusted, input-verified tool JSON, use the deterministic explanation renderer. A blocked VACF plan means readiness is false; the explanation and boolean must agree. Null means unresolved, and a ready plan does not validate a computed material property.

  • See references/md_analysis_checks.md for analysis prerequisites and failure modes.
  • Yeh and Hummer (2004), https://doi.org/10.1021/jp0477147: bulk-fluid periodic finite-size correction, not a universal correction for all materials.

Version History

  • v1.2.3 (2026-10-19): Limit finite-size diffusion corrections to their justified physical regime.

  • 1.2.0: Add deterministic script_checks to all three eval cases that pin the exact planner output (statuses, sorted required_data, PBC note, and the specific diffusive-regime / Yeh-Hummer / blocked-not-demoted warnings) so the evals discriminate the skill from a from-memory baseline.

  • 1.1.0: Fix status demotion (blocked never downgraded to needs time axis), surface warnings/required-data/PBC in non-JSON mode, add diffusive-regime and Yeh-Hummer finite-size guidance, and enforce documented input caps.

  • 1.0.0: Initial MD analysis planning skill.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Md Analysis Planner AI skill do?

Plan molecular dynamics post-processing for materials simulations, including RDF, MSD and diffusion, VACF/VDOS, coordination numbers, bond-angle distributions, stress-strain curves, equilibration detection, PBC unwrapping, and trajectory format choices. Use before writing MD analysis scripts or trusting trajectory-derived results.

Why use Md Analysis Planner on TypingMind?

Because you install it once and use it with any model. Md Analysis Planner is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Md Analysis Planner in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/HeshamFS/materials-simulation-skills/tree/main/skills/simulation-workflow/md-analysis-planner. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Md Analysis Planner?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Md Analysis Planner?

As many as you like. As long as a model supports skills, you can use Md Analysis Planner with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Md Analysis Planner AI skill free?

Yes. It is published on GitHub by HeshamFS under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇