Skip to main content

A python binding of C++ package for stochastic simulations of spatially extended systems

Project description

pystospaboost

Build Status Documentation Status


A Python binding of a C++ software package for stochastic simulations of spatially extended systems, StoSpa2. Code-base has been completely refactored since the previous version of StoSpa. Python bindings have also been included.

Installation

Easy way

pip install pystospaboost

Hard way

After cloning the following repository

git clone https://github.com/BartoszBartmanski/StoSpa2.git --recursive

do the following

cd StoSpa2
python setup.py install

This way of installing pystospa assumes the following requirements are met

  • scikit-build
  • setuptools
  • wheel
  • cmake
  • boost

Example

Let's consider the following chemical reaction

A \rightarrow \emptyset

happening at rate k. The python code for this simulation is as follows

import pystospa as ss

v = ss.Voxel([100], 1.0)
r = ss.Reaction(1.0, lambda x, y : x[0], [-1])
v.add_reaction(r)

s = ss.Simulator([v])
s.run("example.dat", 0.01, 500)

After importing pystospa, we create the voxel and reaction objects with

v = ss.Voxel([100], 1.0)
r = ss.Reaction(1.0, lambda x, y : x[0], [-1])

and then we add the reaction object to the voxel object.

v.add_reaction(r)

And finally, we pass the voxel objects, contained in a list, to a simulator object

s = ss.Simulator([v])
s.run("example.dat", 0.01, 500)

and we invoke the run function of the Simulator class, to run a stochastic simulation saving the state every 0.01 seconds for 500 steps.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

pystospaboost-2.0.19-cp38-cp38-manylinux2014_x86_64.whl (112.4 kB view details)

Uploaded CPython 3.8

pystospaboost-2.0.19-cp37-cp37m-manylinux2014_x86_64.whl (113.6 kB view details)

Uploaded CPython 3.7m

pystospaboost-2.0.19-cp36-cp36m-manylinux2014_x86_64.whl (113.5 kB view details)

Uploaded CPython 3.6m

pystospaboost-2.0.19-cp35-cp35m-manylinux2014_x86_64.whl (113.5 kB view details)

Uploaded CPython 3.5m

File details

Details for the file pystospaboost-2.0.19-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

  • Download URL: pystospaboost-2.0.19-cp38-cp38-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 112.4 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.5

File hashes

Hashes for pystospaboost-2.0.19-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8b96ac26edeba37674e3c2874de37773509622b02a2f4a82c6378629181edd35
MD5 007f5c2ddd26ff9b15ea75ba7f5fce5d
BLAKE2b-256 5ceaa05c6b8e2121989ed005c9e47e01ed73d34af4d505d2c14144d2fa2e55ab

See more details on using hashes here.

File details

Details for the file pystospaboost-2.0.19-cp37-cp37m-manylinux2014_x86_64.whl.

File metadata

  • Download URL: pystospaboost-2.0.19-cp37-cp37m-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 113.6 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.5

File hashes

Hashes for pystospaboost-2.0.19-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 01c213ea3c8ed7d014a8464e19f1730cff3156f02b13107e9deb8557914b5a5c
MD5 048ae625b308158fe19b434b710480ac
BLAKE2b-256 879308185a3caf519bba202153f47b713a220547634c5dee249e5f0ff15e3a8d

See more details on using hashes here.

File details

Details for the file pystospaboost-2.0.19-cp36-cp36m-manylinux2014_x86_64.whl.

File metadata

  • Download URL: pystospaboost-2.0.19-cp36-cp36m-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 113.5 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.5

File hashes

Hashes for pystospaboost-2.0.19-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b6da89a0618926f73d1da401d64f413adc5e8a7d5f3aecbbad5e1d55fd9da770
MD5 ebbc1d61c3c9b620837f287f5b22e6f4
BLAKE2b-256 d644b5a9571d488769b762882631e83d16a9a7b63481b29146390ab5fbcfd420

See more details on using hashes here.

File details

Details for the file pystospaboost-2.0.19-cp35-cp35m-manylinux2014_x86_64.whl.

File metadata

  • Download URL: pystospaboost-2.0.19-cp35-cp35m-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 113.5 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.5

File hashes

Hashes for pystospaboost-2.0.19-cp35-cp35m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 73d2d6c9993ccb4781934fd8d9ac2b408ed5175382961c776d06e05066bd1b20
MD5 d04471052d9777ec07401141b21fd2c2
BLAKE2b-256 c2ece24dc6b24d81d280cb1d2bbaaeca66c57abeeeb72999a31ed673f556e6cd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page