OpenMM Abacus
STDIO基于OpenMM的分子动力学模拟服务器
基于OpenMM的分子动力学模拟服务器
A comprehensive Model Context Protocol (MCP) server for molecular dynamics simulations using OpenMM and DFT calculations with Abacus. This server provides a natural language interface for complex molecular simulations through LLM integration.
# Clone the repository git clone <repository_url> cd openmm-mcp-server # Install dependencies pip install -r requirements.txt # Optional: Install OpenMM for actual simulations conda install -c conda-forge openmm # Test installation python test_mcp_server.py
Add to your Code/Cline/Claude MCP settings:
{ "mcpServers": { "openmm-server": { "command": "python", "args": ["run_openmm_server.py"], "cwd": "path-to\\openmm-mcp-server", "alwaysAllow": [ "create_md_simulation", "create_advanced_md_simulation", "setup_protein_simulation", "setup_membrane_simulation", "create_dft_calculation", "control_simulation", "get_task_status", "list_all_tasks", "analyze_results" ] } } }
Important: Replace the path with your actual project path!
create_md_simulation - Create simple MD simulationscreate_dft_calculation - Create DFT calculationscontrol_simulation - Control simulation execution (start/stop/pause)get_task_status - Check task statuslist_all_tasks - List all tasksanalyze_results - Analyze simulation resultscreate_advanced_md_simulation - Full OpenMM feature support (50+ parameters)setup_protein_simulation - Pre-configured protein simulation templatessetup_membrane_simulation - Membrane protein simulation setup"Run a molecular dynamics simulation of a water molecule at 300K for 10000 steps"
"Set up a protein production simulation for 100 nanoseconds at physiological temperature 310K, using Amber19 force field with TIP3P-FB water model, 0.15M salt concentration, and GPU acceleration"
"Create a POPC membrane protein simulation for 50 nanoseconds with surface tension control"
LangevinMiddle - Langevin middle integrator (recommended)Verlet - Verlet integrator (NVE ensemble)Brownian - Brownian dynamicsVariableLangevin - Variable step size LangevinVariableVerlet - Variable step size VerletNoseHoover - Nose-Hoover thermostat["amber14-all.xml", "amber14/tip3pfb.xml"]["amber19-all.xml", "amber19/tip3pfb.xml"]["charmm36_2024.xml", "charmm36/water.xml"]tip3p - TIP3P water modeltip3pfb - TIP3P-FB water model (recommended)tip4pew - TIP4P-Ew water modelspce - SPC/E water modelCUDA - NVIDIA GPU (fastest)OpenCL - General GPUCPU - CPU computationReference - Reference implementationPME - Particle Mesh Ewald (recommended for periodic systems)NoCutoff - No cutoff (small systems)CutoffNonPeriodic - Non-periodic cutoffCutoffPeriodic - Periodic cutoffEwald - Traditional Ewald summationNone - No constraintsHBonds - Hydrogen bond constraints (recommended)AllBonds - All bond constraintsHAngles - Hydrogen angle constraintsMonteCarloBarostat - Isotropic pressure controlMonteCarloAnisotropicBarostat - Anisotropic pressure controlMonteCarloMembraneBarostat - Membrane system pressure controlmixed - Mixed precision (recommended)single - Single precisiondouble - Double precisionEnvironment variables:
export TASK_DATA_DIR="./simulation_data" export MAX_CONCURRENT_TASKS=4 export DEFAULT_OPENMM_PLATFORM="CUDA" export LOG_LEVEL="INFO" export LOG_FILE="./mcp_server.log"
openmm-mcp-server/
├── run_openmm_server.py      # Startup script
├── test_mcp_server.py        # Test script
├── requirements.txt          # Dependencies
├── README.md                 # English documentation
├── README_CN.md              # Chinese documentation
├── src/
│   ├── server_new.py         # Main server
│   ├── advanced_md_tools.py  # Advanced MD tools
│   ├── task_manager.py       # Task management
│   ├── openmm_engine.py      # OpenMM engine
│   ├── abacus_engine.py      # Abacus DFT engine
│   ├── config.py             # Configuration management
│   ├── tools/                # MCP tool implementations
│   ├── resources/            # MCP resource implementations
│   └── utils/                # Utility functions
├── tests/                    # Test files
├── examples/                 # Example code
├── docs/                     # Documentation
└── task_data/                # Task data directory (auto-created)
"OpenMM not found" warning
conda install -c conda-forge openmm"command not found" error
Permission errors
# Test server startup python run_openmm_server.py # Test MCP functionality python test_mcp_server.py
If you encounter any issues:
python test_mcp_server.pyThis project is licensed under the GNU General Public License v3.0.
Happy simulating! 🎉