Md Simulationのロゴ

Md Simulation

コミュニティ
sagirimo
md-simulation

Run a short molecular dynamics simulation of a protein (optionally a protein-ligand complex) with OpenMM — fix the structure, minimize, equilibrate, run a brief production trajectory, and report backbone RMSD stability over time. Use to relax/equilibrate a structure and check its stability, not for long production MD or free-energy calculations.

概要

公開者sagirimo
リポジトリBioDSH
スキル名md-simulation
スター
65
フォーク
2
同梱ファイル
2
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 2個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    sagirimoがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Md Simulation」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/sagirimo/BioDSH/tree/main/biodsh-core/skills/md-simulation
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/sagirimo/BioDSH.git /tmp/BioDSH
mkdir -p .claude/skills
cp -r /tmp/BioDSH/biodsh-core/skills/md-simulation .claude/skills/md-simulation
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでMd Simulationを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にMd Simulationを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Md Simulationは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Molecular dynamics simulation (OpenMM)

Use this skill when the user wants to relax and equilibrate a protein structure and check how stable it is — e.g. clean up a homology model or a docked pose, remove clashes, and see whether the backbone holds together over a short trajectory. Good follow-up to the drug-docking skill for sanity-checking a complex.

Do not use it for: long production MD (µs), binding free-energy / FEP, or docking (use drug-docking). The defaults here are deliberately short so a run finishes in minutes on a laptop.

Install the heavy libraries first (compute-heavy)

The base analysis env does not ship the MD stack. Install it once with the app's package tool before the first run:

bash
uv pip install openmm pdbfixer mdtraj
  • openmm — the MD engine and force fields.
  • pdbfixer — repairs the input structure (missing atoms/residues, hydrogens).
  • mdtraj — reads the trajectory and computes RMSD.

Notes: OpenMM is compute-heavy; it is easiest and fastest via conda/mamba (mamba install -c conda-forge openmm pdbfixer mdtraj), which also pulls in CUDA/OpenCL support for GPU speed, but pip wheels exist and work on CPU. The script auto-selects the fastest available platform (CUDA > OpenCL > CPU) and falls back to CPU if no accelerator is present.

Required inputs

  • --pdb — the protein structure (.pdb). If it contains a bound ligand/hetero groups you can keep or drop them (--keep-hetero, --keep-water); by default heterogens and water are removed and only the protein is simulated.

Exact run command

bash
bioenv/.venv/bin/python "<skill dir>/run.py" \
  --pdb protein.pdb \
  --solvent implicit \
  --steps 50000 \
  --temperature 300 \
  --outdir md_out

Options and defaults:

  • --ff (default amber14-all.xml amber14/tip3pfb.xml) — force-field XML files; accepts several, space-separated. For implicit solvent an implicit model XML (implicit/gbn2.xml) is added automatically.
  • --solvent implicit|explicit (default implicit) — implicit GBn2 is much faster and is the default; explicit builds a TIP3P water box (slower, more realistic).
  • --steps N (default 50000 ≈ 100 ps at 2 fs) — production steps. Scale up for real work: 500,000 steps ≈ 1 ns, 5,000,000 ≈ 10 ns; expect roughly linear wall-time.
  • --temperature K (default 300).
  • --equil-steps N (default 5000), --report-interval N (default 1000 steps between trajectory/log frames), --dt-fs (default 2.0), --seed, --keep-water, --keep-hetero.

Reading the outputs

Everything lands in --outdir:

  • minimized.pdb — the fixed, energy-minimized starting structure (and the RMSD reference frame).
  • trajectory.dcd — the production trajectory (open with minimized.pdb as topology).
  • energy_log.csv — per-frame step, potential energy (kJ/mol), temperature (K), elapsed time.
  • rmsd.csv — backbone RMSD (nm) vs the minimized frame, per trajectory frame, with a time (ps) column.
  • rmsd.png — RMSD over time; the curve should rise then plateau if the structure is stable.
  • md_summary.json — n_atoms, steps, dt, temperature, solvent, platform, final/mean RMSD, wall-time.

The script prints a short summary to stdout. Report the mean/final RMSD and the absolute path of rmsd.png.

Caveats

  • A flat, low RMSD plateau (a few Å) suggests a stable structure; a curve that keeps climbing suggests it is unfolding or the model/pose is poor — do not over-interpret a short run either way.
  • Implicit solvent (default) trades accuracy for speed; for publication-grade dynamics use --solvent explicit and far more steps.
  • If PDBFixer cannot parse or repair the input (badly broken PDB, non-standard residues, missing a matching force field), the script exits with a clear error — clean the structure or supply the right --ff.
  • Ligand parameters are not auto-generated: an arbitrary small molecule kept via --keep-hetero will usually fail force-field matching. For protein–ligand MD you must supply ligand parameters (e.g. GAFF/OpenFF) — out of scope for this quick skill.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Md Simulation」では何ができますか?

Run a short molecular dynamics simulation of a protein (optionally a protein-ligand complex) with OpenMM — fix the structure, minimize, equilibrate, run a brief production trajectory, and report backbone RMSD stability over time. Use to relax/equilibrate a structure and check its stability, not for long production MD or free-energy calculations.

TypingMindでMd Simulationを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Md Simulationはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにMd Simulationをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/sagirimo/BioDSH/tree/main/biodsh-core/skills/md-simulationを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Md Simulationを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Md Simulationで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもMd Simulationを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Md Simulation」は無料ですか?

はい。sagirimoがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇