Protein Structureのロゴ

Protein Structure

コミュニティ
ssinder
protein-structure

Analyzes protein structures from PDB files: parses ATOM/HETATM records with a dependency-free pure-Python parser, computes radius of gyration, gyration tensor and dipole moments, assigns secondary structure via DSSP or a built-in Kabsch-Sander hydrogen-bond implementation, and optionally retrieves UniProt metadata. This skill should be used when secondary structure assignment, Rg, shape analysis, DSSP, PDB parsing or protein structure annotation is requested.

概要

公開者ssinder
リポジトリbioinformatics-agent-skills
スキル名protein-structure
スター
75
フォーク
2
同梱ファイル
9
ライセンスMIT
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 9個の同梱ファイル

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

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

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

TypingMindで使用

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

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

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

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

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

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

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

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

スキルの指示

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

Protein Structure Analysis

Overview

This skill turns raw PDB coordinates into quantitative structural descriptors without requiring heavyweight dependencies. It ships a self-contained PDB parser that handles ATOM / HETATM records, multi-model files, alternate locations and insertion codes, plus a built-in secondary-structure assigner based on the Kabsch-Sander hydrogen-bond energy model. Geometry (radius of gyration, gyration tensor principal axes, shape descriptors, dipole moment) is computed in pure Python, and UniProt metadata can be attached on request.

When to Use This Skill

  • Secondary structure assignment of a protein (DSSP, H/E/C content, helix percentage)
  • Radius of gyration, radius of gyration tensor, shape anisotropy of a folded protein
  • Parsing PDB files without installing Biopython
  • Batch statistics over a directory of PDB files (length distribution, average Rg)
  • Attaching UniProt protein names, organism and function to structural results
  • Preliminary characterisation of AlphaFold models or predicted structures

Quick Start

bash
# 单个结构:解析 + 几何 + 二级结构
python scripts/analyze_structure.py --input 1crn.pdb --output results/

# 强制使用内置 DSSP 实现(系统未装 mkdssp 时)
python scripts/analyze_structure.py --input 1crn.pdb --output results/ --dssp-method builtin

# 批量处理整个目录(4 线程)
python scripts/batch_analyze.py --input ./pdb_data --output results/ --workers 4

# 附加 UniProt 元数据(需要网络)
python scripts/analyze_structure.py --input P69905.pdb --output results/ --query-uniprot

Workflow

  1. Parse — pdb_parser.py reads fixed-column PDB records into a Structure → Model → Chain → Residue → Atom tree. Alternate locations keep only the primary conformer (' ', 'A', '1'); MODEL/ENDMDL splits multi-model files.
  2. Summarise — chain/residue/atom counts, element composition, heteroatom inventory, per-chain one-letter sequences.
  3. Geometry — geometry.py computes mass-weighted Rg (and Rg over Cα only), the gyration tensor with a Jacobi eigen-decomposition, shape descriptors (asphericity, acylindricity, relative shape anisotropy) and a partial-charge dipole estimate.
  4. Secondary structure — secondary_structure.py either shells out to mkdssp or runs the built-in assigner: rebuild missing amide hydrogens, evaluate Kabsch-Sander hydrogen-bond energies, and classify H/G/I/E/B/T/S/-.
  5. Annotate — optionally query rest.uniprot.org for protein name, organism, sequence length and function via the shared http_session (retry + rate limit).
  6. Report — write structure_analysis.json and structure_analysis.csv.

Parameters

ParameterScriptDefaultDescription
--inputbothrequiredPDB file or directory of PDB files
--outputbothresults/Output directory for reports
--dssp-methodbothautoauto / external / builtin secondary-structure backend
--dssp-executablebothauto-detectedPath to mkdssp or dssp
--hbond-energyboth-0.5Hydrogen-bond energy threshold (kcal/mol) for the built-in assigner
--modelanalyze1Which model to analyse (1-based)
--query-uniprotbothoffEnable UniProt metadata lookup (network access)
--formatanalyzebothjson / csv / both
--workersbatch4Worker threads for batch processing
--patternbatch*.pdbGlob pattern for batch discovery
--recursivebatchoffRecurse into subdirectories
--min-residuesbatch0Skip structures shorter than this
--max-filesboth0Cap the number of files (0 = unlimited)

Outputs

FileContent
structure_analysis.jsonFull nested report: structure summary, chains, geometry, per-residue secondary structure, UniProt annotation
structure_analysis.csvFlat one-row-per-structure table (Rg, shape class, helix/sheet percentages)
batch_summary.jsonAggregate statistics over a directory plus per-structure detail
batch_results.csvFlat table of the batch run

Validation

  • Hydrogen-bond geometry: in a genuine alpha helix the O(i)···N(i+4) distance must be ~2.9-3.1 Å. The built-in assigner only reports H when that contact exists.
  • Backbone sanity: Cα(i)-Cα(i+1) should be ~3.8 Å and C(i)-N(i+1) ~1.33 Å. Distances far from these indicate a malformed or non-standard PDB.
  • Helix content: globular proteins typically show 20-50% helix. A reported value near 0% or 100% for a folded protein is a red flag for the hydrogen-bond threshold.
  • Cross-check: compare builtin against external DSSP on the same file (--dssp-method builtin vs --dssp-method external). Agreement within a few percent on helix content is expected; large divergence usually means the structure lacks resolved hydrogens or is highly non-standard.
  • Rg plausibility: for a 100-residue globular domain Rg is roughly 11-14 Å (Rg ≈ 2.2 × N^0.38 Å is a common empirical rule).
  • Element counts: hydrogen atoms are usually absent from X-ray structures, so element_counts containing only C/N/O is expected, not a parse failure.

References

  • references/methodology.md — algorithms, formulas and parameter selection rationale
  • references/troubleshooting.md — common failures and how to diagnose them

同梱ファイル

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

よくある質問

AIスキル「Protein Structure」では何ができますか?

Analyzes protein structures from PDB files: parses ATOM/HETATM records with a dependency-free pure-Python parser, computes radius of gyration, gyration tensor and dipole moments, assigns secondary structure via DSSP or a built-in Kabsch-Sander hydrogen-bond implementation, and optionally retrieves UniProt metadata. This skill should be used when secondary structure assignment, Rg, shape analysis, DSSP, PDB parsing or protein structure annotation is requested.

TypingMindでProtein Structureを使うメリットは何ですか?

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

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

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

Protein Structureを使えるAIモデルはどれですか?

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

Protein Structureは何個のAIモデルで使えますか?

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

AIスキル「Protein Structure」は無料ですか?

はい。ssinderがGitHubでMITライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

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

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

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

すべて見る

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

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