ionworks-api Python package lets you run simulations and submit parameterization pipelines programmatically. For installation and authentication, see the Python API client page.
To save, validate, parse, or convert the protocols you run here, see the Protocol API page.
Running simulations
Useclient.simulation to run simulations. A simulation requires a parameterized model and a protocol in UCP format.
Single simulation
design_parameters is a single-simulation convenience field on protocol(). Pass a flat
dict[str, float] of parameter overrides — the client translates them internally to a
one-row discrete DOE before submission. Use it when you want to vary one or more design
parameters for a single run without writing out the full DOE schema.
In
protocol(), design_parameters and design_parameters_doe are mutually exclusive,
and any DOE you supply must resolve to exactly one simulation. Passing both, or a DOE
that would expand to multiple simulations, raises ValueError — use
protocol_batch for multi-simulation
sweeps instead.Waiting for results
Usewait_for_completion to poll until the simulation finishes. The method detects failed and canceled jobs immediately rather than waiting for the timeout.
raise_on_failure=False to get the result dict instead of raising an exception when a simulation fails:
Batch simulations with design of experiments
Run multiple simulations across a parameter sweep usingprotocol_batch:
Sampling strategies:
grid (all combinations), random, latin_hypercube.
Retrieving simulation data
get_result returns a typed SimulationResult dataclass with three fields:
time_series and steps are returned as polars DataFrames by default. Call set_dataframe_backend("pandas") once at session start to receive pandas DataFrames instead.
Discharge capacity [A.h] and Charge capacity [A.h] in time_series
reset to 0 at each step boundary. Use "Step count" to join time_series
to steps, or accumulate per-step end values if you need a continuous
cumulative capacity trace.Running pipelines
Pipelines have moved to their own page. See the Pipelines API how-to for submitting pipelines and simple pipelines, polling them, reading results, and managing submissions.Managing studies
Useclient.study to create, list, update, and delete studies. Studies are scoped to a project.
All client.study.* methods accept project_id as an optional keyword
argument. When omitted, they use the default project
configured on the client (or resolved from IONWORKS_PROJECT_ID). Pass
project_id= explicitly to override on a per-call basis.
Listing studies
name, name_exact, order_by, order.
Getting a study
Creating a study
Updating a study
Assigning simulations and measurements
Deleting a study
Next steps
Simulations
Learn about running simulations in Ionworks Studio.
Protocol API
Save, validate, parse, and convert protocols with
client.protocol.Protocol reference
Full reference for the Universal Cycler Protocol format.
Uploading data
Upload and manage cell data via the Python API.
Build API
List and retrieve models and parameterized models.