Token导航 LogoToken导航TokenDH.com
rosetta kic MCP logo
设计创作stdio官方级别未说明来源级核验

rosetta kic MCP

MCP Server

Rosetta KIC MCP 是一个用于环肽建模的计算工具套件,提供基于Rosetta的Kinematic Closure和GeneralizedKIC协议的3D结构预测、肽环化、环建模和构象分析功能,适用于药物发现和蛋白质工程研究。

工具数

12

提示词数

0

GitHub Stars

1

资源数

0
PythonClaude设计Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

MacromNex

提供方

MacromNex

最后核验

2026/5/17 20:20

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install pyrosetta --find-links https://west.rosettacommons.org/pyrosetta/quarterly/release

详细介绍

罗塞塔KIC MCP

使用Rosetta KIC和GeneralizedKIC协议进行环肽计算分析的MCP工具

目录

概述

该MCP使用Rosetta的运动学闭合(KIC)和GeneralizedKIC协议为环肽建模提供了计算工具。它通过独立脚本和MCP服务器界面实现了环肽的3D结构预测、肽环化、环建模和构象分析。

特性

  • 环肽闭合 使用广义KIC算法
  • 三维结构预测 从氨基酸序列
  • 灵活的回路建模 蒙特卡洛抽样
  • 批量处理 用于虚拟筛选工作流程
  • 结构验证 质量评估
  • 作业管理 用于长时间运行的计算

安装

快速设置

运行自动安装脚本:

./quick_setup.sh

这将创建环境并自动安装所有依赖项。

手动设置(高级)

对于手动安装或自定义,请执行以下步骤。

先决条件

  • Conda或Mamba(建议使用曼巴以加快安装速度)
  • Python 3.10+
  • RDKit(自动安装)
  • 可选:PyRosetta实现完整的Rosetta功能

创建环境

根据环境设置 reports/step3_environment.md:

# Navigate to the MCP directory
cd /home/xux/Desktop/CycPepMCP/CycPepMCP/tool-mcps/rosetta_kic_mcp

# Create conda environment (use mamba if available)
mamba create -p ./env python=3.12 pip numpy pandas -y
# or: conda create -p ./env python=3.12 pip numpy pandas -y

# Activate environment
mamba activate ./env
# or: conda activate ./env

# Install core scientific packages
mamba install -p ./env -c conda-forge rdkit -y
mamba install -p ./env -c conda-forge biopython -y

# Install Python utilities
mamba run -p ./env pip install loguru click tqdm

# Install MCP framework
mamba run -p ./env pip install fastmcp

# Install PyRosetta
pip install pyrosetta --find-links https://west.rosettacommons.org/pyrosetta/quarterly/release

______________________________________________________________________

本地使用(脚本)

您可以在没有MCP的情况下直接使用脚本进行本地处理。

可用脚本

脚本描述示例
scripts/cyclic_peptide_closure.py使用GeneralizedKIC将线性肽闭合成环状结构见下文
scripts/structure_prediction.py从氨基酸序列预测3D结构见下文
scripts/loop_modeling.py使用运动学闭合对柔性环进行建模见下文

脚本示例

环肽闭合

# Activate environment
mamba activate ./env

# Run peptide closure
mamba run -p ./env python scripts/cyclic_peptide_closure.py \
  --input examples/data/structures/linear_peptide_sample.pdb \
  --length 6 \
  --nstruct 5 \
  --output results/closed_peptides

参数:

  • --input, -i:输入含有线性肽的PDB文件(必填)
  • --length, -l:闭合的最大循环长度(默认值:6)
  • --nstruct, -n:要生成的循环结构的数量(默认值:5)
  • --resn, -r:用于扩展的残留物类型(默认值:GLY)
  • --output, -o:输出目录(默认:results/)

结构预测

mamba run -p ./env python scripts/structure_prediction.py \
  --sequence "GRGDSP" \
  --output_dir results/structures \
  --nstruct 10 \
  --runtime 900

参数:

  • --sequence, -s:氨基酸序列(一个字母代码,必填)
  • --output_dir, -o:输出目录(默认:results/)
  • --nstruct:要生成的结构数量(默认值:10)
  • --runtime:最大运行时间(秒)(默认值:900)

回路建模

mamba run -p ./env python scripts/loop_modeling.py \
  --input examples/data/structures/test_in.pdb \
  --loop_start 10 \
  --loop_end 20 \
  --output results/loop_models

参数:

  • --input, -i:输入PDB结构文件(必填)
  • --loop_start:起始残渣编号(必填)
  • --loop_end:结束残留物编号(必填)
  • --loop_cut:闭合切割点(可选)
  • --outer_cycles:蒙特卡洛外循环(默认值:10)
  • --inner_cycles:蒙特卡洛内部循环(默认值:30)

______________________________________________________________________

MCP服务器安装

选项1:使用fastmcp(推荐)

# Install MCP server for Claude Code
fastmcp install src/server.py --name rosetta-kic-mcp

选项2:Claude代码的手动安装

# Add MCP server to Claude Code
claude mcp add rosetta-kic-mcp -- $(pwd)/env/bin/python $(pwd)/src/server.py

# Verify installation
claude mcp list

选项3:在settings.json中配置

添加到 ~/.claude/settings.json:

{
  "mcpServers": {
    "rosetta-kic-mcp": {
      "command": "/home/xux/Desktop/CycPepMCP/CycPepMCP/tool-mcps/rosetta_kic_mcp/env/bin/python",
      "args": ["/home/xux/Desktop/CycPepMCP/CycPepMCP/tool-mcps/rosetta_kic_mcp/src/server.py"]
    }
  }
}

______________________________________________________________________

使用Claude代码

安装MCP服务器后,您可以直接在Claude Code中使用它。

快速开始

# Start Claude Code
claude

示例提示

工具发现

What tools are available from rosetta-kic-mcp?

结构验证(快速)

Validate this peptide structure file: @examples/data/structures/linear_peptide_sample.pdb

结构预测(提交API)

Submit a 3D structure prediction job for the sequence GRGDSP with 10 structures and 15 minute runtime

肽封闭(提交API)

Close this linear peptide into a cyclic structure: @examples/data/structures/linear_peptide_sample.pdb
Use 5 structures and GLY residues for closure

检查作业状态

Check the status of job abc12345

批处理

Submit batch structure prediction for these sequences from @examples/data/sequences/sample_cyclic_peptide.txt:
- Generate 5 structures per sequence
- Set runtime to 10 minutes per sequence

使用@引用

在克劳德代码中,使用 @ 引用文件和目录:

参考说明
@examples/data/sequences/sample_cyclic_peptide.txt引用序列文件
@examples/data/structures/linear_peptide_sample.pdb引用结构文件
@configs/default_config.json引用配置文件
@results/参考输出目录

______________________________________________________________________

与Gemini CLI一起使用

配置

添加到 ~/.gemini/settings.json:

{
  "mcpServers": {
    "rosetta-kic-mcp": {
      "command": "/home/xux/Desktop/CycPepMCP/CycPepMCP/tool-mcps/rosetta_kic_mcp/env/bin/python",
      "args": ["/home/xux/Desktop/CycPepMCP/CycPepMCP/tool-mcps/rosetta_kic_mcp/src/server.py"]
    }
  }
}

示例提示

# Start Gemini CLI
gemini

# Example prompts (same as Claude Code)
> What tools are available?
> Validate peptide sequence GRGDSP
> Submit structure prediction for cyclic peptide CRGDSC

______________________________________________________________________

可用工具

快速操作(同步API)

这些工具会立即返回结果(\10分钟):

工具说明参数
submit_cyclic_peptide_closure将线性肽闭合成循环input_file, length, nstruct, residue_type, job_name
submit_structure_prediction从序列预测三维结构sequence, nstruct, runtime, use_mpi, job_name
submit_loop_modeling使用KIC对柔性回路进行建模input_file, loop_start, loop_end, loop_cut, outer_cycles, inner_cycles, fast_mode, job_name
submit_batch_cyclic_closure批量肽封闭input_files, length, nstruct, residue_type, job_name
submit_batch_structure_prediction批量结构预测sequences, nstruct, runtime, job_name

作业管理工具

工具说明
get_job_status检查作业进度和状态
get_job_result完成后获取结果
get_job_log查看执行日志
cancel_job取消正在运行的作业
list_jobs列出所有具有筛选功能的作业
cleanup_old_jobs清理已完成的旧工作

______________________________________________________________________

例子

示例1:快速结构验证

目标: 在昂贵的计算之前验证肽结构

使用脚本:

# Check structure file format
mamba run -p ./env python scripts/cyclic_peptide_closure.py \
  --input examples/data/structures/linear_peptide_sample.pdb \
  --validate_only

使用MCP(克劳德代码):

Validate this peptide structure: @examples/data/structures/linear_peptide_sample.pdb

预期产量:

  • 结构验证结果
  • 链信息、残留物计数
  • 基本几何检查

实施例2:环肽闭合

目标: 将线性肽闭合成环状结构

使用脚本:

mamba run -p ./env python scripts/cyclic_peptide_closure.py \
  --input examples/data/structures/linear_peptide_sample.pdb \
  --length 6 \
  --nstruct 5 \
  --output results/closure_test

使用MCP(克劳德代码):

Close this linear peptide into a cyclic structure: @examples/data/structures/linear_peptide_sample.pdb

Use these parameters:
- Maximum loop length: 6
- Number of structures: 5
- Residue type for closure: GLY
- Job name: "closure_demo"

Check the job status and show me the results when complete.

示例3:基于序列的结构预测

目标: 为环肽序列生成3D构象

使用脚本:

mamba run -p ./env python scripts/structure_prediction.py \
  --sequence "GRGDSP" \
  --nstruct 10 \
  --runtime 900 \
  --output_dir results/grgdsp_prediction

使用MCP(克劳德代码):

Predict 3D structures for the cyclic peptide sequence GRGDSP:
- Generate 10 structures
- Set runtime limit to 15 minutes
- Name the job "grgdsp_prediction"

Monitor the progress and analyze the results when finished.

示例4:批量虚拟筛选

目标: 筛选多个环肽序列进行结构分析

使用MCP(克劳德代码):

I want to screen these cyclic peptide sequences for structural diversity:

Read the sequences from @examples/data/sequences/sample_cyclic_peptide.txt and the other sequence files in that directory.

For each sequence:
1. First validate the sequence format
2. Submit structure prediction with 5 conformers each
3. Set runtime to 10 minutes per sequence
4. Name the batch job "diversity_screen"

Track all jobs and summarize the results when complete.

______________________________________________________________________

演示数据

examples/data/ 目录包含用于测试的示例数据:

序列

文件描述内容
sequences/sample_cyclic_peptide.txt碱性环肽
sequences/sample_cyclic_hexapeptide.txt半胱氨酸环化肽
sequences/sample_longer_peptide.txt10残基肽GRGDSPKGAC

结构

文件描述与一起使用
structures/linear_peptide_sample.pdb线性五肽GRGDSsubmit_cyclic_peptide_closure
structures/cyclic_pep_with_link.pdb具有声明键的环肽验证工具
structures/test_in.pdb测试蛋白质结构submit_loop_modeling
structures/2cpl_min.pdb最小化环肽验证工具
structures/demo_peptide.pdb演示结构所有工具

______________________________________________________________________

配置文件

configs/ 目录包含配置模板:

配置描述参数
default_config.json共享默认设置常规、验证、性能
cyclic_peptide_closure_config.json肽闭合参数KIC设置,采样
structure_prediction_config.json结构预测设置一致性、优化
loop_modeling_config.json回路建模参数MC循环,采样

配置示例

configs/default_config.json:

{
  "general": {
    "output_format": "auto",
    "verbose": true,
    "create_backups": false
  },
  "validation": {
    "sequence_min_length": 3,
    "sequence_max_length": 50,
    "validate_inputs": true
  },
  "performance": {
    "max_memory_gb": 8,
    "timeout_seconds": 3600,
    "checkpoint_interval": 100
  }
}

______________________________________________________________________

故障排除

环境问题

问题: 未找到环境

# Recreate environment
mamba create -p ./env python=3.12 pip numpy pandas -y
mamba activate ./env
mamba install -p ./env -c conda-forge rdkit biopython -y
mamba run -p ./env pip install loguru click tqdm fastmcp

问题: RDKit导入错误

# Install RDKit from conda-forge
mamba install -p ./env -c conda-forge rdkit -y

问题: 导入错误

# Verify installation
mamba run -p ./env python -c "import rdkit; print('RDKit:', rdkit.__version__)"
mamba run -p ./env python -c "import fastmcp; print('FastMCP working')"
mamba run -p ./env python -c "from src.server import mcp; print('Server imports working')"

MCP问题

问题: 在Claude代码中找不到服务器

# Check MCP registration
claude mcp list

# Re-add if needed
claude mcp remove rosetta-kic-mcp
fastmcp install src/server.py --name rosetta-kic-mcp

问题: 无效序列错误

Ensure your amino acid sequence uses standard single-letter codes (ACDEFGHIKLMNPQRSTVWY).
For cyclic peptides, the sequence represents the linear order before cyclization.

问题: 工具不工作

# Test server directly
mamba run -p ./env python src/server.py

工作问题

问题: 作业挂起

# Check job directory
ls -la jobs/

# View job logs through MCP
# Use get_job_log tool with job_id

问题: 任务失败

Use get_job_log with job_id and tail 100 to see error details.
Common causes:
- Invalid input file paths
- Insufficient disk space
- Memory limitations
- Missing PyRosetta installation

问题: PyRosetta不可用

Scripts run in demo mode when PyRosetta is not available.
For full functionality, install PyRosetta from Rosetta Commons.
Demo mode generates realistic example outputs for testing.

结构问题

问题: PDB验证失败

Check that your PDB file:
- Uses standard PDB format
- Contains valid amino acid residues
- Has proper chain identifiers
- Is readable and not corrupted

问题: 关闭失败

For peptide closure:
- Ensure termini are properly positioned
- Check for reasonable loop length (3-20 residues)
- Verify input peptide is linear (not already cyclic)
- Consider adjusting closure parameters

调试工具

  • validate_peptide_structure():预验证PDB文件
  • validate_peptide_sequence():预验证序列
  • get_job_log():使用tail参数查看执行日志
  • get_job_status():检查运行时间和进度信息
  • get_server_info():验证服务器功能

______________________________________________________________________

发展

运行测试

# Activate environment
mamba activate ./env

# Run basic tests
mamba run -p ./env python test_simple.py

# Run MCP tests
mamba run -p ./env python test_mcp.py

正在启动开发服务器

# Run MCP server in dev mode
mamba run -p ./env fastmcp dev src/server.py

# Or run directly
mamba run -p ./env python src/server.py

添加新工具

要添加新的计算工具,请执行以下操作:

  1. 将脚本添加到 scripts/ 目录
  2. 在中创建submit\_\*工具 src/server.py
  3. 遵循既定的作业管理模式
  4. 如果需要,添加验证功能
  5. 更新文档

______________________________________________________________________

业绩说明

运行时间估计

操作典型运行时间因素
结构验证\15 AA)>500 MB>100 MB

优化提示

  • 使用 validate_* 在昂贵的计算之前使用工具
  • 从小处着手 nstruct 测试值
  • 监控作业日志以获取进度更新
  • 定期清理旧工作 cleanup_old_jobs
  • 考虑对多个类似任务进行批处理

______________________________________________________________________

科学应用

用例

  1. 环肽设计

- 将线性设计封闭为稳定的循环 - 优化主干结构 - 验证环化可行性

  1. 虚拟筛选

- 分批处理肽库 - 比较结构预测 - 按构象灵活性过滤

  1. 回路工程

- 模型柔性绑定区域 - 优化回路结构 - 研究构象动力学

输出分析

  • 能量分析:罗塞塔能源组件和总分
  • 几何验证:粘合长度、角度和碰撞
  • RMSD指标:结构相似性度量
  • 构象采样:多样性和覆盖范围分析

______________________________________________________________________

许可证

基于Rosetta分子建模软件。请参阅原始Rosetta许可条款,了解学术和商业使用限制。

学分

基于 罗塞塔 RosettaCommons的分子建模软件。

从以下位置实现计算协议:

  • 用于肽闭合的通用KIC
  • simple_cycpep_结构预测指令
  • 回路建模的运动学闭合

目录标签

目录标签

PythonClaude设计环肽建模本地部署分子模拟蛋白质工程计算生物学药物设计

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

12

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP