vmd-hydrate-mcp

v0.2.0
io.github.wjgoarxiv/vmd-hydrate-mcp Checked 1 day ago Published 5 months ago

Drive VMD for GROMACS/LAMMPS analysis + clathrate-hydrate cage science (needs a local VMD)

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

vmd_status

Report whether VMD is available, its version, and the molecules currently loaded in the persistent session.

load_structure

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.

ParameterTypeDescription
path *string
filetypestring
topology

list_molecules

List molecules currently loaded in the VMD session (molid, path, atoms, frames).

set_representation

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").

ParameterTypeDescription
molid *integer
colorstring
materialstring
selectionstring
stylestring

render

Render the current view of a loaded molecule headlessly (CPU Tachyon) and return a PNG image. Resolution is capped for safety.

ParameterTypeDescription
molid *integer
heightinteger
widthinteger

resolve_selection

Report how many atoms an MDAnalysis selection matches — use this to catch the common 0-atom trap on bare .gro files before running measurements.

ParameterTypeDescription
path *string
selection *string
topology

measure_geometry

Measure a distance (2 atom indices), angle (3), or dihedral (4) at a frame. Distances are in Angstrom, angles in degrees.

ParameterTypeDescription
indices *array
path *string
frameinteger
topology

radius_of_gyration

Radius of gyration (Angstrom) of an atom selection at a frame.

ParameterTypeDescription
path *string
frameinteger
selectionstring
topology

hydrate_order_params

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.

ParameterTypeDescription
path *string
cutoffnumber
frameinteger
topology

hbond_network

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).

ParameterTypeDescription
path *string
frameinteger
rcutnumber
thetanumber
topology

identify_cages

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.

ParameterTypeDescription
path *string
frameinteger
methodstring
rcutnumber
thetanumber

render_cages

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 sphe…

ParameterTypeDescription
path *string
backgroundstring
cage_types
colors
emphasisboolean
frameinteger
heightinteger
highlight_color
materialstring
methodstring
projectionstring
widthinteger

add_representation

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.

ParameterTypeDescription
molid *integer
colorstring
materialstring
selectionstring
stylestring

clear_representations

Remove all representations from a molecule (start a fresh view).

ParameterTypeDescription
molid *integer

rotate_view

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.

ParameterTypeDescription
axisstring
degreesnumber

zoom_view

Zoom the view by a multiplicative factor (>1 zoom in, <1 zoom out).

ParameterTypeDescription
factornumber

reset_view

Reset/fit the camera to the loaded molecule.

ParameterTypeDescription
molidinteger