save
Exports molecular structures or full PyMOL sessions to chosen file formats for storage, analysis, or sharing.
Instructions
Saves data to a file
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filename": "<filename>"
},
"name": "save"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | No | Which state to save. "-1" is the current state, "0" writes all states. | -1 |
| filename | Yes | Output path. The extension picks the format: ``.pdb``, ``.cif``, ``.sdf``, ``.mol2``, ``.obj``, or ``.pse`` for a full session. | |
| selection | No | What to write out. | all |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |