Draw a molecule
moleculeRender a protein, DNA, or small-compound structure in 3D as a PNG plus a text summary; provide one PDB ID, local PDB file, or PDB text.
Instructions
Draw a protein, DNA or small molecule in 3D and return a PNG image plus a text summary.
When to use: to show one structure. To put a structure next to other charts, use a molecule panel in plot instead.
How: give exactly one source: pdb_id (a 4-character Protein Data Bank id such as 1UBQ), pdb_path (a local .pdb file) or pdb (the PDB text itself). The style defaults to cartoon for proteins and ball_and_stick otherwise; coloring defaults to element. rotate {x, y, z} turns the model by degrees; ramachandran adds a Ramachandran plot of the backbone angles.
Behavior: pdb_id downloads the structure from files.rcsb.org (the only network access); pdb_path only reads the file; nothing is written unless output is given. An unknown id, an unreadable file or PDB data without ATOM/HETATM records returns an error result whose text says which.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "molecule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pdb | No | PDB file content. | |
| image | No | Return the image (default true; false returns only the text summary). | |
| style | No | Drawing style (default cartoon for proteins, ball_and_stick otherwise). | |
| theme | No | Color theme (default light). high_contrast uses dark colors with at least 4.5:1 contrast and larger text. | |
| title | No | Figure title. | |
| width | No | Width in pixels (default 900). | |
| height | No | Height in pixels (default 600). | |
| output | No | Also save the chart to this file path; the format follows the extension (.png, .svg, .pdf, or .html for an interactive page). An existing file at that path is overwritten. Omit to write nothing. | |
| pdb_id | No | 4-character PDB id, e.g. 1UBQ. | |
| rotate | No | Rotation in degrees about each axis, applied x, then y, then z. | |
| coloring | No | Atom colors: by element (default), by chain, or a rainbow along the chain. | |
| pdb_path | No | Path of a local .pdb file to read. | |
| ramachandran | No | Add a Ramachandran plot next to the structure. |