Skip to content

I/O Functions

Functions for loading and writing models in VCML, SBML, and Antimony formats.

VCML

load_vcml_file

handler: python options: show_source: false show_signature_annotations: true

load_vcml_str

handler: python options: show_source: false show_signature_annotations: true

load_vcml_url

Load a VCML model from a URL.

handler: python options: show_source: false show_signature_annotations: true

write_vcml_file

handler: python options: show_source: false show_signature_annotations: true

to_vcml_str

Convert a Biomodel object to a VCML string, after refreshing its content with a round trip to libvcell

handler: python options: show_source: false show_signature_annotations: true

SBML

load_sbml_file

Load an SBML file; see :func:load_sbml_str.

handler: python options: show_source: false show_signature_annotations: true

load_sbml_str

Load an SBML model, imported by VCell.

VCell imports SBML in the SBML's own units (VCell itself writes SBML in dm, µmol, l, s), and the model keeps them. A model that leaves its units undefined (SBML Level 3 has no defaults) fails to load unless assume_units says what its numbers are: "vcell" (µM, µm, s; molecules/µm² on membranes) or "sbml_l2" (SBML Level 2's defaults: mol, litre, m², m, s). With unit_system="vcell" the model is then converted to VCell's units (µm, µM, s), geometry included; see :func:convert_vcml_units. No unit system changes unless asked.

handler: python options: show_source: false show_signature_annotations: true

load_sbml_url

Load an SBML model from a URL; see :func:load_sbml_str.

handler: python options: show_source: false show_signature_annotations: true

write_sbml_file

handler: python options: show_source: false show_signature_annotations: true

to_sbml_str

handler: python options: show_source: false show_signature_annotations: true

Antimony

load_antimony_file

Load an Antimony file; see :func:load_antimony_str.

handler: python options: show_source: false show_signature_annotations: true

load_antimony_str

Load an Antimony model (converted to SBML, then imported by VCell; see :func:load_sbml_str).

Antimony writes SBML Level 3, which has no default units: an Antimony model that declares none fails to load unless assume_units says what its numbers are ("vcell": µM, µm, s; "sbml_l2": mol, litre, m², m, s). unit_system="vcell" then converts the model to VCell's units explicitly.

handler: python options: show_source: false show_signature_annotations: true

write_antimony_file

handler: python options: show_source: false show_signature_annotations: true

to_antimony_str

handler: python options: show_source: false show_signature_annotations: true

Utilities

update_biomodel

Update the BioModel object with the latest changes.

Parameters:

Name Type Description Default
bio_model Biomdel

The Biomodel object to parse and update (e.g. regenerating math and geometry).

required

Returns:

Name Type Description
BioModel Biomodel

The updated BioModel object.

handler: python options: show_source: false show_signature_annotations: true

field_data_refs

Extract field data references from the VCML model and return them as a list of tuples. Each tuple contains the following elements: - field_data_name: str - field_data_varname: str - field_data_type: VariableType - field_data_time: float

handler: python options: show_source: false show_signature_annotations: true

Workspace

set_workspace_dir

Set the workspace directory for VCell simulations.

handler: python options: show_source: false show_signature_annotations: true

get_workspace_dir

Get the current workspace directory for VCell simulations.

handler: python options: show_source: false show_signature_annotations: true