Skip to content

Commit

Permalink
add simple vcml_workflow example script
Browse files Browse the repository at this point in the history
  • Loading branch information
jcschaff committed Mar 3, 2025
1 parent d0a7bfb commit dc5ff0c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions examples/scripts/vcml_workflow.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import os
from pathlib import Path

from pyvcell.vcml import VcmlReader
from pyvcell.vcml.vcml_simulation import VcmlSpatialSimulation

model_fp = Path(os.getcwd()).parent / "models" / "TinySpatialProject_Application0.vcml"

bio_model = VcmlReader.biomodel_from_file(model_fp)

sims = [sim for app in bio_model.applications for sim in app.simulations]

# define editable spatial model and simulation instances
simulation = VcmlSpatialSimulation(bio_model=bio_model)
result = simulation.run(sims[0].name)

print([c.label for c in result.channel_data])

result.plotter.plot_slice_3d(time_index=3, channel_id="s1")
result.plotter.plot_concentrations()
simulation.cleanup()

0 comments on commit dc5ff0c

Please sign in to comment.