mpacts.commands.misc. stochastic_switch

In order to be able to use this module import it like this:

import mpacts.commands.misc.stochastic_switch
#or assign it to a shorter name
import mpacts.commands.misc.stochastic_switch as sto

StochasticProcessCommand

class mpacts.commands.misc.stochastic_switch.StochasticProcessCommand

Bases: mpacts.core.command.Command, mpacts.core.baseobject.BaseObject

Switches the internal state ‘switch’ of particles in ‘pc’ according to the transition matrix P. ‘detached_state’ denotes a state when array ‘PolymerFound’ is set to False
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • P — Flattened square transition rate matrix (row major). Columns have to be normalized to 0.
    • detached_state (1) — Number of the fully detached state.
    • pc — Particle container on which the command is applied
    • switch — Array containing the switch.
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, detached_state, P, switch, [gate, predicate]
StochasticProcessCommand(name, parent, **kwargs)

StochasticSwitchCommand

class mpacts.commands.misc.stochastic_switch.StochasticSwitchCommand

Bases: mpacts.core.command.Command, mpacts.core.baseobject.BaseObject

Switches the internal state ‘switch’ of particles in ‘pc’ at a specified rate ‘k_on’ an ‘k_off’.
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • offrate — Array of off rates.
    • onrate — Array of on rates.
    • pc — Particle container on which the command is applied
    • switch — Array containing the switch.
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, onrate, offrate, switch, [gate, predicate]
StochasticSwitchCommand(name, parent, **kwargs)

StochasticSwitchGillespieCommand

class mpacts.commands.misc.stochastic_switch.StochasticSwitchGillespieCommand

Bases: mpacts.core.command.Command, mpacts.core.baseobject.BaseObject

Switches the internal state ‘switch’ of particles in ‘pc’ at a specified rate ‘k_on’ an ‘k_off’. It uses the Gillespie algorithm, where the times to jump are stored in ‘switch_times’ array.
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • offrate — Array of off rates.
    • onrate — Array of on rates.
    • pc — Particle container on which the command is applied
    • switch_times — Array containing the switch.
    • switch — Array containing the switch.
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, onrate, offrate, switch, switch_times, [gate, predicate]
StochasticSwitchGillespieCommand(name, parent, **kwargs)