SimAtomic

Python, HTTP & MCP reference

Build a reproducible
simulation workflow.

Upload an archive, submit a compute job, follow its status, and download results. Use the Python/API path for scripts or the MCP tools for an assistant working in your local project.

Python quick start

You need a SimAtomic API key, API access, compute credits, and a supported input archive. Request access and review compute pricing.

The standalone example uses requests and the HTTP workflow below. Set SIMATOMIC_API_KEY in your local environment, then run it with your input ZIP. Running the script uploads that archive and submits a paid compute job.

python -m pip install requests
python api_workflow_example.py input.zip

Download the complete Python example ↓

If you already use the SimAtomic Python client, keep your existing workflow with SimAtomicClient, get_configs, and create_input_zip. The examples below use that client. Contact SimAtomic for the current client and deployment configuration.

Prepare the input archive

JobInputs
SimulationZIP containing a receptor PDB or CIF, plus an optional separate, posed 3D ligand SDF. Supply one intended biological assembly and one ligand; review supported chemistry.
Trajectory analysisSimulation output trajectory with matching coordinates and topology. Keep the original output bundle intact and use the client packaging helper or MCP server-side preparation.
MM/PBSA workflowA compatible completed protein–ligand simulation, matching topology/export data, and an explicit ligand selection. Verify that the simulation output supports the requested export.

Typical output includes an XTC trajectory, minimized coordinates, prepared system/topology files, and job metadata. Use matching topology and trajectory atom order. Do not rename an arbitrary trajectory to make it appear compatible.

1. Submit a simulation

import os
from simatomic_client import SimAtomicClient

client = SimAtomicClient(api_key=os.environ["SIMATOMIC_API_KEY"])
params = {"mode": "simulation", "md_steps": 1000}
job_id = client.run_job("input.zip", params)

run_job requests an upload URL, uploads the archive, queues the job, and requests worker startup. The returned job ID identifies the submitted run; submission is not completion. A 1,000-step example checks the workflow. Choose production duration using the parameter reference.

2. Wait for successful completion

import time

def wait_and_download(client, job_id, timeout_seconds=86400):
    deadline = time.monotonic() + timeout_seconds
    while time.monotonic() < deadline:
        result, completed_id = client.poll_job(job_id)
        state = result.get("job_status")
        if state == "success":
            return client.download_results(job_id)
        if state in {"failed", "error", "aborted", "cancelled", "canceled"}:
            raise RuntimeError(f"Job {job_id} ended: {state}")
        time.sleep(60)
    raise TimeoutError(f"Job {job_id} may still be running")

simulation_results = wait_and_download(client, job_id)

Queued or running jobs need more time. On failure, inspect the available logs and preparation messages. A polling timeout does not cancel compute; retain the job ID to check it later. Download links can expire, so request a fresh link when needed. Do not start dependent analysis until the simulation succeeds.

3. Analyze a completed trajectory

The ensemble-analysis path uses TICA and HDBSCAN to summarize sampled conformations and produce an HTML dashboard. The output depends on the trajectory, selected atoms, lag settings, and clustering choices. It does not guarantee exhaustive sampling.

from simatomic_client import create_input_zip

analysis_zip = create_input_zip(simulation_results, job_id, "analysis")
analysis_job = client.run_job(analysis_zip, {
    "mode": "analysis",
    "atom_selection": "name CA",
    "tica_lag_time": 30,
    "tica_dimensions": 5,
    "min_cluster_size": 10,
    "min_samples": 10,
})
analysis_results = wait_and_download(client, analysis_job)

These are example settings. Adjust them to saved-frame spacing and sampling length. You can also analyze downloaded trajectories with your own scripts, or ask Claude/Codex to save reproducible scripts and plots locally.

4. Optional end-point binding analysis

The MM/PBSA workflow currently targets protein–ligand systems with compatible topology export. Choose the ligand mask from the actual prepared topology, plus the sampling interval and solvent model. With a Generalized Born igb model, describe the calculation as MM/GBSA.

# Start from the compatible simulation output and its original job ID.
binding_zip = create_input_zip(simulation_results, job_id, "mmpbsa")
binding_params = {
    "mode": "mmpbsa",
    "ligand_chain_mask": ligand_mask,  # Set after checking the prepared topology.
    "igb": 5,
    "use_decomp": False,
}
binding_job = client.run_job(binding_zip, binding_params)
binding_results = wait_and_download(client, binding_job)

Do not copy a residue mask from another system. Frame bounds and stride must fit the trajectory. See scientific interpretation before using the result for comparisons or ranking.

Configuration

The Python client can load separate simulation, analysis, and MM/PBSA dictionaries from a YAML file. Install pyyaml when using this helper.

from simatomic_client import get_configs

mmpbsa_params, analysis_params, simulation_params = get_configs("config.yaml")

The YAML keys are mmpbsa_parameters, analysis_parameters, and simulation_parameters. Each dictionary includes its mode. Keep the configuration supplied for your deployment; see field names, units, and scientific defaults.

HTTP API reference

Base URL: https://app.simatomic.com/api/api_handler/
API authorization: X-API-Key header. POST requests use JSON. The routes below follow the SimAtomic Python client.

Method & routeRequestPurpose
POST get_presigned_url{"key": "input.zip"}Returns presigned_url and job_id. PUT the actual archive bytes to the signed URL.
POST queue_jobkey, job_id, mode, and accepted settings in one flat JSON object.Queue the uploaded input after the PUT succeeds.
POST start_remote_server{}Request worker startup, as performed by the Python client.
POST poll_job{"job_id": "…"}Read job_status; wait for success before downloading.
GET download?job_id=…Job ID query parameter.Retrieve results through the download response/redirect. Signed result URLs are temporary.

Use your API key only with the authenticated SimAtomic API. Use signed upload/download URLs as returned, without adding the API key to storage requests. MCP is a separate protocol endpoint; do not send these REST routes to mcp.simatomic.com/mcp.

Complete upload → run → download example

Download the standalone Python script. It uses the routes above, waits for completion, stops on a failed job, and saves the results ZIP. It does not automatically submit follow-up analysis. Inspect the script and set the input and run length before executing it.

MCP tools for Claude and Codex

Connect https://mcp.simatomic.com/mcp using Streamable HTTP. Follow the Claude Desktop guide or the Codex desktop guide for authorization and screenshots. The server advertises the accepted argument schema for each tool; that schema is the authority for assistant submissions.

ToolRole
prepare_local_file_uploadPrepare a signed upload for a local file. Upload the exact bytes with the returned HTTP PUT instructions; preparing the URL does not upload the file.
get_local_file_upload_statusConfirm the local-file upload completed before submission.
upload_input_from_urlRetrieve an input archive from an HTTPS URL and prepare it for job submission.
submit_jobSubmit a mode and accepted parameters using the uploaded input key and job ID. It requires successful upload first.
get_job_statusMonitor an identified job and its available output information.
list_my_jobsList jobs submitted through MCP.
get_result_urlGet a temporary signed result download URL.
prepare_analysis_from_jobPrepare follow-up analysis or MM/PBSA inputs from a completed simulation on the server.
get_dashboard_urlOpen an available dashboard from completed analysis.
Prompt: Inspect the current SimAtomic tool schemas. Check whether my protein and ligand fit the supported preparation workflow, then propose inputs, duration, output frequency, and analysis. Show the settings and wait for my approval before uploading or submitting a job.