AI & MCP Tools Reference¶
Auto-generated from
@tooldefinitions inpython/molforge/**/tools.py. Runpython3 scripts/docs-gen.pyto regenerate.
MolForge exposes 121 typed JSON-schema tools (52 read-only with MCP readOnlyHint, 69 scene-mutating/logged) identically across:
- the Desktop App Assistant Panel (
⌘L), - the Terminal REPL (
molforge-ai), and - the MCP Server (
molforge-mcpfor Claude Code, Claude Desktop, Antigravity, and compatible IDEs).
Every mutating tool records replayable PyMOL commands to the session log, and tools marked Approval run a preflight confirmation gate before executing risky operations (deleting objects, overwriting files, remote network calls, or installing plugins).
Core Molecular & Session Tools (46)¶
Loading, selection, representation, coloring, alignment, measurements, analysis, rendering, ChimeraX commands, and sandboxed plugin authoring.
| Tool | Mode | Parameters | Description |
|---|---|---|---|
load_structure |
Logged | path* (string), name (string), format (string) |
Load a structure/map/session file from disk (pdb, cif, mol2, sdf, pse, ...). Returns the object name. |
fetch_structure |
Logged | code* (string), name (string), type (string) |
Download a structure from the PDB by 4-character ID (or EMDB map with type='emd'). Needs network. |
fetch_alphafold |
Logged | uniprot* (string), name (string), color_by_plddt (boolean) |
Download an AlphaFold DB model by UniProt accession and colour it by pLDDT confidence (>90 blue, 70-90 light blue, 50-70 yellow, <50 orange). Needs network. |
get_session_summary |
Read-only | include_view (boolean) |
Overview of the session: objects (type, atoms, states, chains, enabled), named selections with atom counts, visible representations per object, and the current view matrix. |
list_objects |
Read-only | — | List object names with type and atom count. |
count_atoms |
Read-only | selection* (selection) |
Count atoms in a selection. |
list_chains |
Read-only | selection (selection) |
List chains (per object) with residue and atom counts. |
list_residues |
Read-only | selection* (selection), limit (integer) |
List residues in a selection (object/chain/resi resn), up to a limit. |
get_sequence |
Read-only | selection (selection) |
Get one-letter sequences (FASTA) of the polymer chains in a selection. |
get_atom_properties |
Read-only | selection* (selection), limit (integer) |
Per-atom table (object, chain, resi, resn, name, elem, b, q, ss, x, y, z) for a small selection. |
select |
Logged | name* (string), selection* (selection), enable (boolean) |
Create or replace a named selection. |
show |
Logged | representation* (string), selection (selection) |
Show a representation for a selection. |
hide |
Logged | representation (string), selection (selection) |
Hide a representation for a selection ('everything' hides all). |
show_as |
Logged | representation* (string), selection (selection) |
Show only the given representation(s) for a selection, hiding all others. |
color |
Logged | color* (string), selection (selection) |
Colour atoms (all representations) with a named colour ('red', 'skyblue', 'grey70') or hex '#RRGGBB'. |
color_by |
Logged | scheme* (string), selection (selection), palette (string), carbon_color (string), minimum (number), maximum (number) |
Colour by a scheme: 'chain' (each chain a colour), 'element' (heteroatoms by element, carbons kept), 'element_carbon' (carbons in carbon_color), 'secondary_structure', 'b_factor' (spectrum), 'plddt' (AlphaFold confidence in the B column), 'rainbow' (N->C spectrum), 'hydrophobicity'. |
cartoon |
Logged | type* (string), selection (selection) |
Set cartoon type (automatic, loop, rectangle, oval, tube, arrow, dumbbell, putty, skip). |
set_setting |
Logged | name* (string), value* (any), selection (string) |
Change a PyMOL setting, globally or per selection/object, e.g. transparency 0.5, cartoon_transparency, stick_radius, bg_color, ray_shadows, label_size, sphere_scale. |
label |
Logged | selection* (selection), text (string), expression (string), ca_only (boolean) |
Label atoms. text is a fixed string, or use expression with PyMOL label syntax, e.g. "resn+resi" or "'%s-%s' % (resn, resi)". Empty text clears labels. By default labels CA atoms only. |
orient |
Logged | selection (selection) |
Orient the camera to the principal axes of a selection. |
zoom |
Logged | selection (selection), buffer (number) |
Zoom the camera onto a selection with an optional buffer (A). |
center |
Logged | selection (selection) |
Center the camera on a selection without changing zoom. |
turn |
Logged | axis* (string), angle* (number) |
Rotate the camera around a screen axis. |
reset_view |
Logged | — | Reset the camera to the default view of all objects. |
get_view |
Read-only | — | Return the 18-number PyMOL view matrix (rotation, camera position, origin, clipping). |
set_view |
Logged | view* (array) |
Restore a view matrix previously returned by get_view. |
scene |
Logged | key* (string), action (string) |
Store, recall or delete a named scene (view + representation + colours). |
measure_distance |
Logged | atom1* (selection), atom2* (selection), name (string) |
Distance between two atoms (each selection must be one atom); also draws a dashed measurement object. |
measure_angle |
Logged | atom1* (selection), atom2* (selection), atom3* (selection), name (string) |
Angle (degrees) defined by three atoms; draws an angle object. |
measure_dihedral |
Logged | atom1* (selection), atom2* (selection), atom3* (selection), atom4* (selection), name (string) |
Dihedral (degrees) defined by four atoms; draws a dihedral object. |
find_contacts |
Logged | selection1* (selection), selection2* (selection), cutoff (number), show (boolean), name (string) |
Atom/residue contacts between two selections within a distance cutoff (heavy atoms, intra-residue pairs excluded). Optionally draws them as a distance object. |
find_hbonds |
Logged | selection1* (selection), selection2 (selection), cutoff (number), show (boolean), name (string) |
Hydrogen bonds / polar contacts between (or within) selections. Data are computed geometrically (N/O donor-acceptor pairs within cutoff); with show=true PyMOL's H-bond criteria (distance mode 2) draw them as dashes, like Action > find > polar contacts. |
find_interface |
Logged | selection1* (selection), selection2* (selection), cutoff (number), prefix (string) |
Interface residues between two selections (e.g. chain A vs chain B): residues with any heavy atom within cutoff of the partner. Creates named selections |
find_pockets |
Logged | selection (selection), max_pockets (integer), min_volume (number), grid_spacing (number), show_points (boolean) |
Detect candidate ligand-binding pockets/cavities (LIGSITE-style grid buriedness scan, pure numpy). Returns ranked pockets with volume, centre and lining residues and creates selections pocket1, pocket2... |
compute_sasa |
Read-only | selection* (selection), per_residue (boolean) |
Solvent accessible surface area (A^2, probe 1.4 A) of a selection, optionally per residue with relative accessibility (Tien et al. 2013 max values). The selection is measured in isolation. |
bfactor_stats |
Read-only | selection (selection), top (integer) |
B-factor (or pLDDT for predicted models) statistics: mean/std/min/max, per chain, highest and lowest residues. |
align_structures |
Logged | mobile* (selection), target* (selection), method (string), ca_only (boolean), cycles (integer), alignment_object (string) |
Superpose mobile onto target. method: 'align' (sequence-dependent, best for homologs), 'super' (structure-based, sequence-independent), 'cealign' (CE, for low similarity). Moves the mobile object. |
rmsd |
Read-only | selection1* (selection), selection2* (selection), fit (boolean) |
RMSD between two selections with matching atoms (same names/residues). fit=false measures in place (rms_cur); fit=true reports the RMSD after optimal superposition without moving anything (rms). |
mutate_residue |
Logged | selection* (selection), new_residue* (string) |
Mutagenesis-lite: mutate one residue. ALA/GLY truncate the side chain in place; other targets use PyMOL's mutagenesis wizard (most probable rotamer) when the engine provides it. |
render_image |
Approval | path (string), width (integer), height (integer), dpi (integer), ray (boolean), transparent_background (boolean), return_image (boolean) |
Render the current view to PNG (ray-traced by default) and return it so you can see the scene; also used to save publication figures (give a path). |
run_pymol_command |
Approval | command* (string) |
Run arbitrary PyMOL command-language text (like typing in the PyMOL command line; ';' or newlines separate commands). Read-only/visual commands run directly; destructive or file/Python-executing commands (delete, remove, save, run, python, system, alter, ...) require user confirmation. Prefer typed tools. |
run_chimerax_command |
Approval | command* (string) |
Run a ChimeraX-style command (e.g. 'color #1/A:10-20 red', 'show ligand :<5 atoms', 'lighting soft', 'matchmaker #2 to #1', 'hbonds #1'). Atom specs use ChimeraX syntax (#model/chain:residue@atom). |
get_command_log |
Read-only | since (integer) |
Return the replayable .pml log of every action taken so far (optionally from an index). |
save_command_log |
Read-only | path* (string) |
Save the replayable .pml log to a file (replay with '@file.pml' in PyMOL/MolForge). |
write_plugin |
Logged | name* (string), code* (string), test_commands (array), timeout (number) |
Write a PyMOL-compatible plugin (Python source defining commands with cmd.extend and optionally init_plugin(app)), then test it in a sandboxed subprocess against a COPY of the current session. Returns the plugin id, static-scan warnings, new commands, test-command output and a diff of the session (objects, atom counts, colours, representations, selections). Nothing is installed until install_plugin is approved by the user. |
install_plugin |
Approval | plugin_id* (string) |
Install a plugin previously tested with write_plugin into the user's plugin directory and load it into the live session. Always asks the user for approval first. |
Ligand & Med-Chem Tools (9)¶
Ligand perception, physicochemical descriptors, interaction profiling, 2D diagrams, docking, and series analysis.
| Tool | Mode | Parameters | Description |
|---|---|---|---|
find_ligands |
Read-only | selection (selection), min_atoms (integer), include_additives (boolean), include_ions (boolean) |
List the ligands of a structure: hetero residues that are not water, ions or common crystallisation additives. Returns formula, atom count, centre and a selection for each. |
ligand_properties |
Read-only | ligand (string), state (integer) |
Perceive a ligand (bond orders, aromaticity, protonation) and return its descriptors: formula, MW, clogP (Crippen), TPSA (Ertl), HBD/HBA, rotatable bonds, Lipinski and Veber flags, formal charge, and a SMILES string. |
profile_interactions |
Logged | ligand (string), protein (string), draw (boolean), name (string), include_water (boolean), state (integer) |
Profile protein-ligand interactions with PLIP-style geometric criteria: hydrophobic contacts, hydrogen bonds, pi-stacking, pi-cation, salt bridges, halogen bonds, water bridges and metal coordination. Optionally draws them as coloured dashed distances. |
ligand_diagram |
Logged | ligand (string), protein (string), filename (string), format (string), show_hydrophobic (boolean), width (integer), height (integer), state (integer) |
Draw the 2D interaction diagram of a protein-ligand complex (PoseView / LIGPLOT style) and save it as SVG or PNG. Returns the path, and the PNG as an image when asked. |
dock_ligand |
Approval | ligand (string), receptor (string), name (string), engine (string), box_center (array), box_size (array), pocket (integer), exhaustiveness (integer), n_poses (integer), seed (integer), state (integer) |
Dock a ligand into a receptor and load the poses as states of a new object, with each pose's score in the b-factor column. Uses AutoDock Vina, smina or gnina when one is installed, and a built-in numpy Monte-Carlo search otherwise (reliable for rigid ligands, not for very flexible ones). |
ligand_series |
Read-only | source (string), selections (array), receptor (string), sort_by (string), descending (boolean), filename (string), state (integer) |
Descriptor table for a ligand series (a multi-state object from an SDF, or a list of selections), optionally with per-ligand interaction counts against a receptor. Can write CSV or HTML. |
align_ligand_series |
Logged | source (string), selections (array), reference (string), method (string), state (integer) |
Superpose every ligand of a series onto a reference, by maximum common substructure when they share a scaffold and by principal-axis shape overlay otherwise. |
interaction_fingerprints |
Read-only | source (string), selections (array), receptor (string), state (integer) |
Per-residue interaction fingerprints for a series of poses, on a shared residue axis, with a Tanimoto similarity matrix. Use it to compare how analogues bind. |
write_pdbqt |
Read-only | selection (selection), filename* (string), kind (string), state (integer) |
Write a PDBQT file (AutoDock 4 atom types, Gasteiger charges, ligand torsion tree) for a ligand or a rigid receptor. |
Structure Prediction Tools (8)¶
AlphaFold 3, Boltz, ColabFold, Chai-1, ESMFold loading, confidence scoring (ipTM/pDockQ/ipSAE), PAE domains, and running jobs.
| Tool | Mode | Parameters | Description |
|---|---|---|---|
load_prediction |
Logged | path* (any), name (any), models (any), as_states (any), color_by_plddt (any) |
Load structure-prediction output (AlphaFold 3 server/local, ColabFold/AF2, Boltz-½, Chai-1, AlphaFold DB files, ESMFold or any PDB/mmCIF with pLDDT in B) from a file or directory. All ranked models are loaded as objects |
prediction_confidence |
Read-only | object* (any), chain1 (any), chain2 (any), max_contacts (any) |
Assess a loaded prediction: per-chain pLDDT, and for each contacting chain pair ipTM (as written by the predictor), interface PAE mean/min, pDockQ, pDockQ2, ipSAE, contact probabilities, confident contacts, reproducibility across ranked models, a verdict (likely / uncertain / doubtful / unlikely) with the reasons for and against, and caveats. Use it to answer 'is this complex real?'. Returns {object, source, global_scores, chains: [{chain, n_tokens, mean, bands, low_confidence_segments, ptm, iptm}], interfaces: [{chains, n_contacts, iptm, interface_pae_mean, pdockq, pdockq2, ipsae, confident_contacts, assessment}], verdict, summary, caveats}. |
pae_plot |
Read-only | object* (any), path (any), format (any), palette (any), return_image (any) |
Draw the PAE (predicted aligned error) matrix of a loaded prediction with chain boundaries (and PAE domains if computed) and return it as an image. Format png (default), svg, or html (interactive: hover read-out, drag-to-select emitting a pae_select command). Returns {path, format, n_tokens, chains}. |
pae_select |
Logged | object* (any), x_range (any), y_range (any), name (any), mode (any), max_pae (any) |
Select the residues of a rectangle of the PAE plot (x = scored residues, y = aligned residues), like dragging a box on an interactive PAE plot. Returns {selection, n_tokens, atoms, expression, rect_pae_mean, rect_pae_min}. |
pae_domains |
Logged | object* (any), pae_cutoff (any), resolution (any), min_size (any), color (any) |
Split a predicted structure into rigid domains by clustering the PAE matrix (graph of residue pairs with PAE < cutoff weighted 1/PAE, modularity communities); colours each domain and creates |
compare_prediction |
Logged | predicted* (any), experimental* (any), method (any), color (any) |
Superpose a predicted model onto an experimental structure, colour the prediction by per-residue CA deviation (blue < 1 A ... red > 8 A, grey = no counterpart) and cross-check pLDDT against what the experiment resolved (disorder-consistent, low-pLDDT-but-resolved, confident-but-unresolved, confident-but-deviating). Returns {fit: {rmsd, aligned_atoms}, n_matched, ca_deviation, categories, plddt_vs_exp_b_spearman, largest_deviations}. |
predict_structure |
Approval | selection (any), chains (array), sequences (any), ligands (object), include_ligands (any), runner (any), allow_remote (any), msa_server (any), name (any), wait_seconds (any) |
Predict a structure from sequences or from chains in the session (e.g. 'predict the complex of chains A and B'). Runners: alphafold3, boltz, colabfold (local installs) or esmfold (remote ESM Atlas API, single protein chain). Local runs never send data out; remote use (esmfold, or MSA server) needs allow_remote=true and the user's confirmation. Runs in the background: returns {job, runner, status, progress, sends_to, single_sequence_mode, loaded} - poll with prediction_job. With wait_seconds > 0 waits and loads the result. |
prediction_job |
Logged | job (any), action (any), name (any) |
Status of background prediction jobs, or act on one: action=status (default), load (load finished results as objects), cancel, list (all jobs), runners (which predictors are installed/available). Returns the job dict {job, runner, status, progress, message, output, error, loaded} or a list. |
Density Map Tools (11)¶
MRC/CCP4/MTZ density map stats, simulation, filtering, masking, correlation, Q-score, fitmap, and segmentation.
| Tool | Mode | Parameters | Description |
|---|---|---|---|
map_stats |
Read-only | map* (any) |
Statistics of a density map: grid, voxel size, origin, min/max/mean/sd and sigma levels. |
map_contour_levels |
Read-only | map* (any), mass_kda (number), selection (selection) |
Suggested contour levels for a map: sigma levels and the level enclosing the expected volume of a protein of a given mass (kDa) or of a selection's mass. |
simulate_map |
Logged | selection* (selection), name (selection), resolution (number), like (selection) |
Create a simulated density map (molmap) of a selection at a resolution. |
map_filter |
Logged | map* (any), name (selection), gaussian (number), lowpass (number) |
Gaussian-smooth (sigma Å) and/or low-pass filter (resolution Å) a map into a new map. |
map_zone |
Logged | map* (any), selection* (selection), radius (number), name (selection) |
Mask a map around a selection (voxels farther than radius set to zero) into a new map. |
map_model_correlation |
Read-only | map* (any), selection (selection), resolution (number), color (boolean) |
Map-model fit: CC_mask, CC_box, CC_volume, CC_peaks (Phenix-style definitions, approximate) and the worst residues by real-space correlation (RSCC). Optionally colours residues by RSCC. |
qscore |
Read-only | map* (any), selection (selection) |
Q-scores (atom resolvability, Pintilie 2020) for a selection; per-residue values and mean. |
fit_in_map |
Logged | selection* (selection), map* (any), metric (string), resolution (number), search (integer), radius (number) |
Rigid-body fit a selection into a map (like ChimeraX fitmap). Local optimisation from the current pose; 'search' adds N random starting orientations for a global search. Moves the atoms. |
color_by_map_value |
Logged | selection* (selection), map* (any), palette (selection), minimum (number), maximum (number) |
Colour atoms by the map value at their positions, e.g. a local-resolution map (low = blue with rainbow). |
segment_map |
Logged | map* (any), threshold (number), steps (integer), target (integer), prefix (selection) |
Segment a map (watershed + scale-space grouping); creates one map object per region. Returns regions with volumes and centres. |
load_mtz_map |
Logged | path* (selection), name (selection), amplitudes (selection), phases (selection) |
Compute a map from an MTZ file (amplitude/phase columns) and load it. |
Structure Validation & Coot-Lite Tools (5)¶
Ramachandran, rotamers, C-beta deviation, clashes, rotamer fitting, local refinement, and peptide flips.
| Tool | Mode | Parameters | Description |
|---|---|---|---|
validate_structure |
Logged | selection (any), map (any), resolution (number), overlay (boolean) |
MolForge validation (approximate, MolProbity-like): Ramachandran, rotamers, C-beta deviation, bond/angle Z-scores, clashes, cis peptides, chirality, missing atoms, and per-residue RSCC when a map is given. Colours residues by severity, creates selections (rama_outliers, rotamer_outliers, clashes, ...) and markers. Returns a summary and the issue list. |
validation_next |
Logged | — | Zoom to the next residue with a validation issue (after validate_structure). |
fit_rotamer |
Logged | selection* (any), map* (any) |
Fit the best library rotamer of one residue into a map (then refine it). Moves atoms. |
refine_zone |
Logged | selection* (any), map (any) |
Coot-lite real-space refinement of a residue or short zone (map + geometry restraints, neighbours fixed). An interactive helper, not a full refinement. Moves atoms. |
pepflip |
Logged | selection* (any) |
Flip the peptide plane after a residue (180° about CA-CA). Moves atoms. |
MD Trajectory Tools (4)¶
Trajectory loading/streaming, frame scrubbing, RMSD, RMSF, Rg, contacts, H-bonds, native Q, PCA, and clustering.
| Tool | Mode | Parameters | Description |
|---|---|---|---|
traj_load |
Logged | path* (string), object* (string), start (integer), stop (integer), step (integer), selection (selection), stream (boolean) |
Load an MD trajectory (XTC, TRR, DCD, AMBER NetCDF) onto an existing object that provides the topology (load the PDB/GRO first). Frames become states of the object; with stream=true the file is streamed through one state (for trajectories too large for memory) and drives the movie player. |
traj_analyze |
Logged | object* (string), analysis* (string), selection (selection), selection2 (selection), cutoff (number), k (integer), putty (boolean), plot (boolean) |
Analyse a loaded trajectory: rmsd (per frame, QCP fit), rmsf (per residue, written to b-factors), rg, distance (selection + selection2, one atom each), contacts (residue contact occupancy), hbonds (Baker-Hubbard occupancy, needs hydrogens), q (fraction of native contacts), dss (secondary structure per frame), pca (CA principal components) or cluster (RMSD k-medoids). Optionally saves a clickable HTML plot linked to the frames. |
traj_set_frame |
Logged | object* (string), frame* (integer) |
Show a given trajectory frame (1-based) of an object (works for loaded and streamed trajectories). |
traj_info |
Read-only | — | List loaded/streamed trajectories (frames, atoms, source file). |
Clinical & Population Variant Tools (4)¶
ClinVar, gnomAD, EBI Proteins, AlphaMissense, VCF mapping, structural context, and reports.
| Tool | Mode | Parameters | Description |
|---|---|---|---|
fetch_variants |
Read-only | query* (string), source (string), significance (string), kinds (string), name (string) |
Fetch protein variants for a gene or UniProt accession and keep them under a name for map_variants. source: 'ebi' (EBI Proteins API: UniProt+ClinVar+gnomAD+COSMIC, default), 'clinvar' (NCBI ClinVar), 'gnomad' (population variants with allele frequency). Needs network. |
load_variants |
Read-only | path (string), variants (array), gene (string), name (string) |
Load protein variants from a VCF (SnpEff ANN / VEP CSQ annotated) or a text list of HGVS protein changes, or from an inline list such as ['p.Arg175His', 'R248Q']. |
map_variants |
Logged | selection* (string), name (string), query (string), source (string), significance (string), accession (string), color_by (string), alphamissense (boolean), spheres (boolean), limit (integer) |
Map a variant set onto protein chains of a structure (UniProt numbering via SIFTS or sequence alignment; the reference amino acid is checked), compute structural context (relative SASA buried/exposed, secondary structure, protein and DNA/RNA interfaces, nearby ligands/metals, pLDDT for AlphaFold models), colour the residues and add sphere markers. Optionally fetch first: give 'query' (+ 'source', 'significance') instead of 'name'. Returns per-variant context and groups such as dna_rna_interface. |
variant_report |
Read-only | name (string), format (string), path (string), only_mapped (boolean) |
Variant report table for a mapped variant set (markdown text by default; csv/html written to a file). |
Sequence & Alignment Tools (6)¶
MSA loading, conservation scoring, conserved surface patches, UniProt tracks, and linked sequence panels.
| Tool | Mode | Parameters | Description |
|---|---|---|---|
load_alignment |
Read-only | path* (string), name (string) |
Load a multiple sequence alignment (FASTA, Clustal, Stockholm, A3M or PIR; auto-detected) under a name. |
conservation |
Logged | msa* (string), selection* (string), reference (string), method (string), top (integer) |
Score per-residue conservation from an alignment (Jensen-Shannon divergence, Capra & Singh 2007, or Shannon entropy; Henikoff weights, gap penalty), map it onto a structure via the alignment's reference sequence, store it in the b-factor and colour (blue = variable, red = conserved). |
conserved_patches |
Logged | selection* (string), quantile (number), min_rsa (number), distance (number), min_size (integer) |
Find surface patches of conserved residues (after 'conservation'): residues above a conservation quantile with relative SASA >= min_rsa, clustered by side-chain distance. Creates selections cons_patch_N. |
uniprot_features |
Logged | selection* (string), accession (string), types (string) |
Map UniProt sequence features (domains, regions, active/binding sites, PTMs, signal peptide, transmembrane, disulfides) onto a structure via SIFTS or alignment; one coloured selection per feature type (uf_*). Needs network (UniProt REST, PDBe SIFTS). |
align_sequences |
Read-only | selection1* (string), selection2* (string), mode (string) |
Pairwise alignment (BLOSUM62, affine gaps) of two protein chains given as selections. |
sequence_panel |
Read-only | selection* (string), accession (string), msa (string), variants (string), path (string) |
Build the linked sequence panel (UniProt coordinates, one row per chain, secondary structure, optional conservation / UniProt features / variant markers) and write it as an interactive HTML file in the work directory (also .json model or .svg by extension). |
Path Tracing & AR Export Tools (2)¶
GPU path-traced studio renders and validated USDZ/GLB export for AR.
| Tool | Mode | Parameters | Description |
|---|---|---|---|
render_pathtraced |
Read-only | path (string), preset (string), width (integer), height (integer), spp (integer), focus (string), dof (number), transparent (boolean), return_image (boolean) |
Render the current view with MolForge's GPU path tracer: physically based soft shadows, ambient occlusion, depth of field (Blender/Molecular Nodes-like quality, no Blender needed). Presets: publication (white background, soft studio light), cinematic (dark, rim light, depth of field), goodsell (flat illustrative colours with outlines), glossy. Returns the image; the PNG embeds the session's replayable provenance. Takes seconds (more for large structures / many samples). |
export_ar_model |
Read-only | format (string), path (string), size (number) |
Export the visible representations as a 3D/AR model: 'usdz' for Apple AR Quick Look (iPhone, iPad, Vision Pro) or 'glb' (glTF 2.0) for web viewers, Android Scene Viewer, Blender. Oriented as on screen, base on the floor, 1 Angstrom = 1 cm unless size (metres) is given. The file is validated. |
Scene & MolViewSpec Tools (4)¶
MolForge scene export/load and MolViewSpec (.mvsj/.mvsx) interoperability.
| Tool | Mode | Parameters | Description |
|---|---|---|---|
export_scene |
Read-only | path (string), selection (any) |
Save the visible session as a MolForge scene file (versioned JSON: atoms, bonds, representations, colours, labels, distances, settings, camera; surfaces as meshes). Read by the MolForge web viewer, share links and the Jupyter widget. |
load_scene |
Logged | path* (string) |
Rebuild objects, representations, colours and the view from a MolForge scene file. |
export_molviewspec |
Read-only | path (string), title (string), selection (any) |
Export the session as MolViewSpec (open Mol* view format): .mvsx (single zip, default) or .mvsj (structure files written alongside). Use to hand a view to Mol*/RCSB/PDBe viewers. |
load_molviewspec |
Logged | path* (string) |
Load a MolViewSpec view (.mvsj/.mvsx file or http(s) URL): structures, components, representations, colours, labels, camera and background. |
Web Sharing Tools (2)¶
Self-contained HTML viewer export and local live-view serving.
| Tool | Mode | Parameters | Description |
|---|---|---|---|
export_share_html |
Read-only | path (string), title (string), selection (string) |
Write ONE self-contained HTML file with an interactive 3D viewer of the current session (works offline in any modern browser, rotate/zoom/touch, atom picking, VR/AR via WebXR). Nothing is uploaded; give the file to collaborators. |
start_live_view |
Read-only | port (integer) |
Start a local web server (127.0.0.1) showing the session live in a browser tab; returns the URL. |
Provenance & Reproducibility Tools (6)¶
Session recipes, PNG metadata embedding, SSIM verification, methods text, and reproducible bundles.
| Tool | Mode | Parameters | Description |
|---|---|---|---|
get_provenance |
Read-only | include_script (boolean) |
Provenance of the session so far: the replayable .pml script of everything done (by the user and by AI tools), data sources (PDB IDs, AlphaFold DB entries with model version, files with SHA-256), software versions, settings changed from defaults and warnings about anything not replayable. |
save_figure |
Approval | path (string), width (integer), height (integer), dpi (number), ray (boolean), return_image (boolean) |
Render a publication figure (ray-traced PNG) that embeds its own recipe: the replayable script, data sources with checksums and software versions. Anyone with MolForge can later reproduce or verify it. |
verify_figure |
Read-only | path* (string), threshold (number) |
Reproduce a MolForge figure from the recipe embedded in it (fresh process) and compare: SSIM image similarity, exact pixel match, and whether input files still have their recorded SHA-256. |
read_figure_provenance |
Read-only | path* (string) |
Read the recipe (script, inputs, versions) embedded in a MolForge PNG. |
methods_text |
Read-only | — | Draft a methods-section paragraph for the current session: software versions, PDB IDs / AlphaFold DB models, what was computed, and references for the algorithms used. |
export_bundle |
Read-only | path* (string), figures (array) |
Write a reproducibility bundle (script.pml, copies of inputs with checksums, provenance, environment, figures, METHODS.txt, README.txt) that a reviewer can rerun with 'python -m molforge.provenance.replay --bundle DIR'. |
Workflow Skills Tools (4)¶
Discovering, inspecting, and running reusable .skill.md scientific workflows.
| Tool | Mode | Parameters | Description |
|---|---|---|---|
list_skills |
Read-only | tag (string) |
List workflow skills: versioned, shareable recipes (e.g. interface report, AlphaFold model QC, pocket review, publication figure, structure comparison, hydrophobic surface). Prefer a matching skill over improvising a multi-step analysis: its steps are reviewed and every one is logged. |
describe_skill |
Read-only | name* (string) |
Describe one skill: parameters (types, defaults, choices), steps, expected outputs, version and SHA-256. |
run_skill |
Logged | name* (string), params (object) |
Run a workflow skill with parameters. Each step (tool call, PyMOL commands, Python hook, figure) runs through this session and is logged as replayable pml and in the provenance record. Returns the declared outputs, a short report and the pml produced. Skills that are not built in ask the user before running Python hooks. |
save_skill |
Read-only | name* (string), title (string), description* (string), from_line (integer), scope (string) |
Save what was done in this session as a reusable workflow skill (a .skill.md file replaying the logged commands), so the user can run it again on other structures with run_skill or 'skill run'. Use it when the user asks to save, reuse or automate the steps you just performed. The user approves the write. |
Real-Time Collaboration Tools (5)¶
Room status, open comment threads, discussion summaries, anchored comments, and thread navigation.
| Tool | Mode | Parameters | Description |
|---|---|---|---|
collab_status |
Read-only | — | Status of the live collaboration session: participants, roles, presenter, counts. |
collab_open_threads |
Read-only | include_resolved (boolean) |
List open (unresolved) residue-anchored comment threads in the collaboration session, with where each anchor is in the current structure (selection) and all messages. |
collab_discussion |
Read-only | max_messages (integer) |
Everything said in the collaboration session (comment threads + chat) as a structured digest, for summarising the discussion: who said what, about which residues, what is still open. |
collab_comment |
Logged | text* (string), selection (string), thread (string) |
Post a comment to the collaboration room, anchored to a selection (new thread) or as a reply to a thread. Other participants see it, so this asks the user first. |
collab_locate_thread |
Logged | thread* (string) |
Select the residue/atom a comment thread is anchored to (selection named comment_ |
Plugin Marketplace & Porting Tools (5)¶
Searching signed lab indexes, installing plugins, and AI-assisted porting of legacy PyMOL plugins.
| Tool | Mode | Parameters | Description |
|---|---|---|---|
market_search |
Read-only | query (string) |
Search the configured MolForge plugin indexes (name, description, tags, commands). Returns name, version, compatibility and whether it is installed. No index is configured by default. |
market_info |
Read-only | name* (string), version (string) |
Details of a marketplace plugin: author, licence, commands, compat scan, sha256, signature status. |
market_install |
Logged | name* (string), version (string) |
Install (or update) a plugin from the marketplace: verifies sha256 and the index signature, runs the compatibility scan, installs and loads it. Asks the user first. |
market_list_installed |
Read-only | — | Plugins installed from the marketplace, with versions and available updates. |
port_plugin |
Read-only | path* (string), tests (array), retries (integer) |
Port a legacy PyMOL plugin (Tk/Pmw/Qt dialog + commands) to a MolForge-native plugin with a declarative panel, using the configured AI model, then validate it in the sandbox against the original on the same test commands. Returns the port report (verdict, problems, paths). Does not install anything. |