pyssa : Python package for stochastic simulations
Introduction
pyssa is a Python package for stochastic simulations. It offers a simple API to define models, perform stochastic simulations with them and visualize the results in a convenient manner.
Currently under active development in the develop branch.
Install
Install with pip:
$ pip install pyssa
Documentation
- General: https://pyssa.readthedocs.io.
Usage
A short summary follows, but a more detailed tutorial can be found at https://pyssa.readthedocs.io/en/latest/tutorial.html
from pyssa.simulation import Simulation
V_r = np.array([[1, 0], [0, 1], [0, 0]]) # Reactant matrix
V_p = np.array([[0, 0], [1, 0], [0, 1]]) # Product matrix
X0 = np.array([100, 0, 0]) # Initial state
k = np.array([1.0, 1.0]) # Rate constants
sim = Simulation(V_r, V_p, X0, k) # Declare the simulation object
# Run the simulation
sim.simulate(max_t=150, max_iter=1000, chem_flag=True, n_rep=10)
Change simulation algorithm
You can change the algorithm used to perform the simulation by changing the algorithm parameter
sim.simulate(max_t=150, max_iter=1000, chem_flag=True, n_rep=10, algorithm="tau_adaptive")
Run simulations in parallel
You can run the simulations on multiple cores by specifying the n_procs parameter
sim.simulate(max_t=150, max_iter=1000, chem_flag=True, n_rep=10, n_procs=4)
Plot simulation results
sim.plot()
Accessing simulation results
results = sim.results
You can also access the final states of all the simulation runs by
final_times, final_states = results.final
License
Copyright (c) 2018-2020, Dileep Kishore, Srikiran Chandrasekaran. Released under: Apache Software License 2.0
Credits
Metadata
Release files for pyssa 0.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyssa-0.9.1.tar.gz | 783.9 kB | Without provenance | Details for pyssa-0.9.1.tar.gz |
Release files / pyssa-0.9.1.tar.gz
| Download URL | pyssa-0.9.1.tar.gz |
|---|---|
| Size | 783.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
abc7af012110ac372bb503480a23ea36e56ef949de1a85d9f6ce0ff2868f9de9
|
|
BLAKE2b-256 checksum How to use checksums |
4de09df44bb59f91db0308ade3fd8d1f10ba0bee56bd158c76dbebd541f3d4a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.3
|
Security for pyssa 0.9.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.