Protein OpenMM MD and Frame Extraction
Invocation
Use the exact tool name and parameter schema exposed by the current harness. Tool names in SDK examples below are raw MCP names, not model-facing aliases. Local files must be uploaded with molclaw-file-transfer before a server tool can use them. Repair PDB inputs first when the workflow requires it.
Usage
1. Protein OpenMM MD
The description of tool protein_openmm_md.
texRuns OpenMM-based protein molecular dynamics preparation and simulation for structure refinement workflows. Args: protein_pdb (str): Absolute or relative path to input protein PDB. solvent_type (str): Solvent mode, 'explicit' or 'implicit', default 'explicit'. gb_model (str): GB model for implicit solvent mode, default 'GBn2'. water_model (str): Water model for explicit solvent mode, default 'tip3p'. force_field (str): OpenMM force field name, default 'amber14'. md_time (float): Production MD time in picoseconds, default 100000.0. platform (str): OpenMM compute platform, default 'CUDA'. full_md (bool): Run full MD procedure if True, default False. Return: status (str): 'success' or 'error'. msg (str): Human-readable execution summary. command (str): The invoked command ('protein_openmm_md'). run_dir (str | None): Final run directory under tool_result/openmm_md_result. work_dir (str | None): Same as run_dir for compatibility. trajectory_path (str | None): Path to md_traj.dcd when available. energy_log (str | None): Path to md.log when available. generated_files (List[str]): File paths relative to work_dir. md_time (float): Echoed requested MD time in ps. solvent_type (str): Echoed solvent mode. force_field (str): Echoed force field. full_md (bool): Echoed full MD mode.
How to use tool protein_openmm_md :
pythonresponse = await client.session.call_tool( "protein_openmm_md", arguments={ "protein_pdb": "/path/to/input.pdb", "solvent_type": "implicit", "gb_model": "OBC2", "water_model": "tip3p", "force_field": "amber14", "md_time": 1000.0, "platform": "CUDA", "full_md": True } ) result = client.parse_result(response) key_output = result["work_dir"]
Example parameter sets
python# 1) Main mode { "protein_pdb": "/path/to/input.pdb", "solvent_type": "implicit", "gb_model": "OBC2", "water_model": "tip3p", "force_field": "amber14", "md_time": 1000.0, "platform": "CUDA", "full_md": True } # 2) Variant mode { "protein_pdb": "relative/path/to/protein.pdb", "solvent_type": "explicit", "water_model": "tip3p", "force_field": "charmm36", "md_time": 10000.0, "platform": "CUDA", "full_md": False }
2. OpenMM Trajectory Frame Extraction
The description of tool openmm_extract_frames.
texExtracts evenly spaced protein conformations from an OpenMM work directory for downstream screening and ensemble analysis. Args: work_dir (str): OpenMM MD output directory containing topology and trajectory files. num_frames (int): Number of evenly spaced frames to extract, default 100. protein_only (bool): Keep only protein atoms in extracted frames, default False. align (bool): Align extracted structures to the first frame, default False. prefix (str): Filename prefix for extracted PDB frames, default 'frame'. dry_run (bool): Validate inputs and prepare output directory without extraction, default False. Return: status (str): 'success', 'partial_success', or 'error'. msg (str): Human-readable extraction summary. output_dir (str): Run-specific directory under tool_result/openmm_md_result. work_dir (str): Resolved OpenMM working directory. topology_path (str | None): Resolved topology file path. trajectory_path (str | None): Resolved trajectory file path. frames_dir (str): Directory where extracted frame PDB files are saved. frame_count (int): Number of extracted frame files. frame_files (List[str]): Extracted frame file paths relative to output_dir.
How to use tool openmm_extract_frames :
pythonresponse = await client.session.call_tool( "openmm_extract_frames", arguments={ "work_dir": "/path/to/work_dir", "num_frames": 100, "protein_only": False, "align": False, "prefix": "frame", "dry_run": False } ) result = client.parse_result(response) key_output = result["frame_files"]
Example parameter sets
python# 1) Main mode { "work_dir": "/path/to/work_dir", "num_frames": 100, "protein_only": False, "align": False, "prefix": "frame", "dry_run": False } # 2) Variant mode { "work_dir": "relative/path/to/openmm_md_output", "num_frames": 50, "protein_only": True, "align": True, "prefix": "conf", "dry_run": False }
3. End-to-End Collaboration Workflow
Use the two tools in sequence via API calls:
- Call protein_openmm_md to generate MD outputs and get
work_dir. - Pass that
work_dirinto openmm_extract_frames to extract evenly spaced PDB frames.
pythonclient = DrugSDAClient("https://scp.intern-ai.org.cn/api/v1/mcp/2/DrugSDA-Tool") if not await client.connect(): print("connection failed") return md_resp = await client.session.call_tool( "protein_openmm_md", arguments={ "protein_pdb": "/path/to/input.pdb", "solvent_type": "implicit", "gb_model": "OBC2", "md_time": 1000.0, "full_md": True } ) md_result = client.parse_result(md_resp) work_dir = md_result["work_dir"] frames_resp = await client.session.call_tool( "openmm_extract_frames", arguments={ "work_dir": work_dir, "num_frames": 100, "prefix": "frame" } ) frames_result = client.parse_result(frames_resp) key_output = frames_result["frame_files"] await client.disconnect()


