Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PYMOL_MCP_ALLOW_CODE_EXECNoSet to '1' to enable opt-in scripting tools (arbitrary code execution passthrough).0

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Headless PyMOL for molecular visualization, GROMACS/LAMMPS MD workflows, and clathrate-hydrate cage analysis. Load structures, render images (returned inline), and inspect the session with typed tools.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": true
}
resources
{
  "subscribe": false,
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
load_structureA

Load a molecular structure or single-frame coordinate file into PyMOL.

Returns the created object name and its atom/state counts.

fetch_pdbA

Fetch a structure from the RCSB PDB (requires network) and load it.

list_objectsA

List all loaded object names in the current PyMOL session.

get_object_infoB

Return atom count, state count, and chains for a loaded object.

reset_sessionA

Reinitialize PyMOL, clearing all objects, selections, and settings.

render_imageB

Ray-trace the current scene to a PNG and return it inline.

run_pmlA

[opt-in] Execute raw PyMOL command-language statements. Requires PYMOL_MCP_ALLOW_CODE_EXEC=1.

run_pythonA

[opt-in] Execute a Python snippet with PyMOL cmd in scope. Requires PYMOL_MCP_ALLOW_CODE_EXEC=1.

selectB

Create a named selection and return how many atoms it matched.

get_selection_infoB

Summarize a selection: atom count, chains, and residue names present.

showB

Show (or exclusively set with only=True) a molecular representation for a selection.

hideC

Hide a representation for a selection.

colorC

Color a selection.

spectrumC

Color a selection along a spectrum of a per-atom expression (e.g. B-factor).

set_backgroundB

Set the render background color.

orientB

Orient the camera along the principal axes of a selection.

zoomC

Zoom the camera onto a selection.

turnB

Rotate the camera about an axis.

measure_distanceA

Measure the distance (Angstroms) between two single-atom selections.

measure_angleA

Measure the angle (degrees) defined by three single-atom selections.

measure_dihedralB

Measure the dihedral (degrees) defined by four single-atom selections.

alignB

Sequence-align and superpose mobile onto target (use for different structures).

save_fileC

Save a selection/session to a file (format from extension).

load_trajectoryA

Load a GROMACS/DCD trajectory: load the structure, then append frames as states.

Requires matching atom count/order (trjconv strip/reorder is the common pitfall).

load_trajectory_mdaA

Load any MDAnalysis-readable trajectory (LAMMPS dump, AMBER NetCDF, ...) by injecting coordinates into PyMOL states. Requires the optional md extra (MDAnalysis).

order_parameterA

Compute the F3 or F4 water order parameter for a clathrate-hydrate system.

F4 ~ 0.7-0.95 = hydrate, ~0 = liquid, ~ -0.4 = ice Ih. F3 <= 0.04 = hydrate-like.

hbond_networkA

Build the water hydrogen-bond network and report coordination statistics.

A well-formed clathrate framework has ~4 H-bonds per water (tetrahedral).

chill_plusA

Classify water molecules as liquid, ice, or hydrate with CHILL+.

The result contains the six class counts, per-water classes, fractions, and the unique O-O cutoff network in water input order.

identify_cagesA

Identify clathrate cages (TRACE): ring perception -> cage assembly -> face-count typing.

Returns per-type cage counts (5^12, 5^12 6^2, 5^12 6^4, ...) and the overall structure (sI / sII / sH). Validated: sII -> 128x 5^12 + 64x 5^12 6^4; sI -> 16x 5^12 + 48x 5^12 6^2.

cage_occupancyC

Compute clathrate cage occupancy: assign guest molecules to detected cages (one per cage).

mark_cagesA

Draw each detected cage as a wireframe polyhedron — cylinders along the O-O ring edges plus spheres at the water-oxygen vertices, colored by cage type (5^12=cyan, 5^12 6^2=violet, 5^12 6^4=red, ...). Builds a single CGO object named cages for render_image.

mark_chill_plusC

Draw the classified CHILL+ O-O network as a colored CGO object named chill_plus.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.2/5.0

Scored across 32 tools

Disambiguation4/5

Most tools target a clearly distinct action+resource (measure_*, show/hide/color/spectrum, camera/*, analysis tools). A few boundaries soften: run_pml vs run_python (both code execution, though distinct languages and both opt-in), and the cage trio (identify_cages analyzes, mark_cages visualizes, cage_occupancy assigns guests) requires reading descriptions to separate, but they are genuinely different operations.

Naming Consistency4/5

All names are consistently snake_case with no camelCase mixing, and most follow a readable verb_noun or verb pattern (render_image, set_background, measure_distance, load_trajectory). A handful are bare verbs or nouns (color, spectrum, orient, zoom, hide, chill_plus, order_parameter), a minor deviation from the dominant verb_noun convention but still predictable and readable.

Tool Count3/5

32 tools is on the heavy side for a single PyMOL server and pushes past the typical 3-15 comfort band. The surface is genuinely broad (rendering, camera, selection, measurement, four loaders, and six hydrate-analysis tools), so many tools earn their place, but the count feels somewhat inflated with narrow one-purpose tools.

Completeness4/5

The surface covers a full lifecycle: loading (structure, PDB fetch, two trajectory loaders), inspection, selection, representation, coloring, camera control, measurement, alignment, saving, rendering, and deep hydrate analysis. Minor gaps exist (no explicit delete/remove object beyond reset_session, no frame-stepping tool for trajectories), but these are workable around.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues