Skip to content

Facilitating user-provided propensity calculations #34

@heejochoi

Description

@heejochoi

A helpful feature for systems with alternative propensity calculations (such as when stochastic constants are unavailable) might be support for externally provided propensities. For example, each reaction:

X + Y -> Z

may have an associated propensity function described by the user that depends on the counts of molecules at each iteration:

def get_propensity(X, Y, c1, c2, ...):
    # computation here could involve several constants like c1, c2, ...
    ...

which returns a value that represents the propensity for this reaction, for this iteration. Since the inputs (X and Y) are dynamic during the simulation, the return value from get_propensity() also varies during the simulation.

Two candidate approaches to supporting this feature might be providing a way for the user:

  1. to provide the propensity functions to arrow once at the initialization of the system - (get_propensity() is called inside arrow)
  2. to input the propensity values at each iteration - (get_propensity() is called outside arrow by the user)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions