Skip to content

virtualcell/pyvcell

Repository files navigation

pyvcell

Release Build status codecov Commit activity License

This is the python wrapper for vcell modeling and simulation for

  1. local scripting of spatial modeling, simulation, data analysis and visualization workflows using Virtual Cell technology
  2. access to Virtual Cell remote APIs - with public access or as an authenticated Virtual Cell user.

Local simulation, analysis and visualization with pyvcell

download or create new spatial models

  • load/save VCML (Virtual Cell’s native format - import/export to VCell UI)
  • load/save SBML (Systems Biology Markup Language)
  • load from Antimony (friendly textual language for SBML)
  • create/edit any VCML object (e.g. species, model, geometry) programmatically

local editing with Python objects

  • edit parameters. add/remove/edit species, compartments, reactions, initial conditions, diffusion coefficients
  • create/edit geometry objects, create/edit vcell applications and simulations

run local simulations

  • run local spatial simulations (for reactions, diffusion, and advection) stored in local workspace.

analyze local simulation result:

  • Time-series summary statistics available as NumPy arrays.
  • spatiotemporal arrays stored as Zarr datastores and available as NumPy arrays.
  • 3D mesh data using VTK unstructured grids, analyzed with VTK

local visualization

  • built-in plotting and 3D visualization via Matplotlib and VTK/PyVista
  • make your own plots or 3D renderings.

installation

The easiest way to install pyvcell is by using the Python Package Index and pip. We highly recommend setting up a virtual environment for dependency management. Run the following command to install pyvcell from PyPI

pip install pyvcell

Usage

import pyvcell.vcml as vc
biomodel = vc.load_vcml_file('path/to/your/model.vcml')
results = vc.simulate(biomodel, "sim1")
results.plotter.plot_concentrations()

Documentation

coming soon.

Examples:

Antimony example

Open in Colab

Parameters example

Open in Colab

Geometry import example

Open in Colab

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages