Skip to content

otanan/STP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stochastic Thermodynamics in Python (STP)

Python library to construct random quantities and track their information-theoretic properties. These objects include continuous time rate matrices, discrete time transition matrices, and matrices representing 3-state self assembly models.

Status: in progress · Documentation

Installation

This package is pip-installable.

  1. Install via pip.
    python3 -m pip install stp
  2. Import the package
    import stp

(back to top)

Usage

3-state self-assembly rate matrix (time-dependent)

import numpy as np
import stp

alpha = lambda t: np.cos(t) + 2
W = stp.self_assembly_rate_matrix(alpha)
print(W(0))  # [[-2.  3.  9.] ...]

Stationary distribution

R = stp.rand_transition_matrix(3)
p_star = stp.get_stationary_distribution(R, discrete=True)

Shannon entropy

p = stp.rand_p(3)
H = stp.info.entropy(p)

KMC path sampling

W = stp.self_assembly_rate_matrix(alpha=1.5)
p = stp.rand_p(3)
paths = stp.KMC(W, p, num_paths=100, path_length=10, seed=42)

For more examples, please refer to the Documentation.

(back to top)

Roadmap

Refer to the Notion Roadmap for the state of the project.

(back to top)

Contact

Created by Jonathan Delgado.

Back to top

About

Stochastic Thermodynamics in Python (STP)

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages