An MCP server that drives VMD for GROMACS/LAMMPS trajectory analysis, scripted rendering, and clathrate-hydrate cage science (H-bond networks, F3/F4 order parameters).
VMD-Hydrate-MCP demonstrates solid domain expertise with 17 well-scoped tools covering molecular visualization, trajectory analysis, and specialized hydrate cage science. All tools have descriptions (avg 156 chars) and input schemas with types. However, output schemas are undocumented, LLMs cannot predict return structures for downstream chaining. Parameter descriptions are present but often lack constraints (enums, ranges, formats). Error handling is minimal; tools do not guide recovery. Security validation exists (PathGuard, TCL injection checks) but is not exposed in tool descriptions. Naming is verb-forward and clear (load_structure, identify_cages, render_cages), following production conventions. The specialized hydrate tools (hydrate_order_params, hbond_network, identify_cages, render_cages) are domain-differentiating but lack output documentation.
Add a representation WITHOUT clearing existing ones — layer several reps (e.g. water as Points + solute as VDW). `color` is a coloring METHOD (Name, ResName, ResType, Chain, Beta, ...); `style` is VDW/Lines/Points/NewCartoon/Licorice/etc.
Remove all representations from a molecule (start a fresh view).
Build the water-water hydrogen-bond network for a frame and report bond count and average coordination (the substrate for cage identification). rcut is the O-O cutoff (nm), theta the H-O...O angle cutoff (degrees).
Compute clathrate-hydrate water order parameters F3 (tetrahedrality) and F4 (<cos 3phi>) for a frame. F4 ~ 0.7-0.95 indicates hydrate/crystalline order, ~0 liquid, negative ice-Ih. Units are nm; for .gro the native nm parser is used. This is the differentiating capability no other MCP offers.
Identify clathrate-hydrate cages (5^12, 5^12 6^2, 5^12 6^4, ...) from the water H-bond network and classify the crystal structure (sI/sII/sH). Returns per-type cage counts, the structure label, and a confidence. method="TRACE" (all rings) or "HTR" (primitive rings). GROMACS .gro input.
Output schemas undocumented. Tools return dicts (e.g. vmd_status returns {vmd_available, vmd, display, loaded_molecules}) but LLMs cannot predict structure for chaining. Agents cannot plan downstream calls without trial-and-error.
Parameter constraints missing. style, color, material, selection params accept free-form strings with no enum or validation guidance. LLMs may hallucinate invalid values (e.g. style='Cartoon' instead of 'NewCartoon'). Descriptions mention examples but lack formal constraints.
Error handling absent. Tools do not document failure modes or recovery paths. E.g., load_structure raises ValueError for coordinate-only formats without topology, but error message is not actionable for LLM retry logic. No error classification (retryable vs fatal).
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 56 | <=2025-11-25 | v2 |
List molecules currently loaded in the VMD session (molid, path, atoms, frames).
Load a structure/trajectory into the persistent VMD session for visualization. Supports PDB, GROMACS (.gro/.xtc/.trr), LAMMPS (.data/dump), DCD. Coordinate-only formats (.xtc/.trr/.dcd) require a `topology`. Returns the molid used to reference this molecule in later calls.
Measure a distance (2 atom indices), angle (3), or dihedral (4) at a frame. Distances are in Angstrom, angles in degrees.
Radius of gyration (Angstrom) of an atom selection at a frame.
Render the current view of a loaded molecule headlessly (CPU Tachyon) and return a PNG image. Resolution is capped for safety.
Render clathrate cages photorealistically (ambient occlusion + shadows, orthographic by default). Each cage type is drawn in ONE unified color for both its water-oxygen vertices and its O-O framework, using a curated palette (512=cyan, 51262=violet, 51264=red, 435663=lime, 51268=blue). Natural-language styling maps directly to the arguments: - "show only the sII large cages" -> cage_types=["51264"] - "... in magenta" -> highlight_color="magenta" (name or #rrggbb) - "emphasize / thicker width" -> emphasis=True (thicker edges + bigger spheres) - per-type colors -> colors={"512": "cyan", "51264": "magenta"} cage_types are internal codes: 512, 51262, 51263, 51264, 51268, 435663, ... (sI = 512+51262, sII = 512+51264, sH = 512+435663+51268). Returns a PNG.
Reset/fit the camera to the loaded molecule.
Report how many atoms an MDAnalysis selection matches — use this to catch the common 0-atom trap on bare .gro files before running measurements.
Rotate the camera by `degrees` about an axis ('x'/'y'/'z'). In GUI/attended mode (VMD_HYDRATE_MCP_DISPLAY=gui) the visible window updates live.
Set the visual representation of a loaded molecule (e.g. style=NewCartoon, Licorice, VDW, Lines; color=Name, ResType, Beta; selection is a VMD atom-selection string like "water" or "name CA").
Report whether VMD is available, its version, and the molecules currently loaded in the persistent session.
Zoom the view by a multiplicative factor (>1 zoom in, <1 zoom out).
Security validation (PathGuard, TCL injection checks) exists in code but is not exposed in tool descriptions. LLMs cannot reason about what paths are allowed or what characters are forbidden in selections. Descriptions should state 'Paths restricted to configured allow_dirs' and 'Selection must not contain shell metacharacters'.
Numeric parameter ranges unbounded. width/height in render (default 800x600) and render_cages (default 1000x1000) lack min/max constraints. LLMs could pass 10000x10000 causing memory exhaustion. cutoff, rcut, theta in analysis tools lack documented ranges.