MEDYAN.addfilamentend_reaction!

Tuple{MEDYAN.SysDef, Symbol, Symbol, Bool, Pair{Vector{Symbol}, Vector{Symbol}}, Float64, AbstractString, Float64, Int64}

Add filament end reaction. Return s. Add a filamentendsite and reaction with callback to change the filaments. This can be used for polymerization, depolymeriation, and changing end state.

Arguments

  1. s::SysDef: the system to add to.
  2. filamenttypename::Symbol: the filament type name.
  3. filamentendsitename::Symbol: the new name of the filamentendsite added. This can be used as a catalyst in other reactions.
  4. isminusend::Bool: true if changing the minus end, false if changing the plus end.
  5. changedendstatenames::Pair{Vector{Symbol}, Vector{Symbol}}: the changes to the end monomer states, the first is the states to match. The second is the new monomer states after the reaction. If the second has more states than the first, new monomers will be added, if the second has less, monomers will be removed. Ordered minus end first.
  6. spacing::Float64: Space needed at the filament end for this reaction. (nm) ratefactor= exp(-β*spacing*loadforce) where β is 1/kT, loadforce is the external force pushing axially on the end of the filament. and ratefactor affects this reaction propensity and any others using filamentendsitename
  7. reactionexpr::AbstractString: Allows adding other reactants or products to the reaction. " + filamentendsite.$(filamenttypename).$(filamentendsitename) + " gets added to both sides this to create the full reaction expression. See addreaction! for syntax.
  8. rate::Float64: Base rate for the reaction. ((nm³)^(invvolumepower)/s)
  9. invvolumepower::Int: volumefactor= (1/volume)^invvolumepower where volume is the volume of the voxel in nm³. volumefactor only applies to this reaction not any other reaction using filamentendsitename Generally this is 0 for reactions without another diffusing reactant, and 1 if there is another diffusing reactant.

Examples

using MEDYAN
agent_names = AgentNames(
    diffusingspeciesnames= [:a,],
    filamentnames= [(:filname,[
                            :plus,
                            :mid,
                            :minus,
                        ]),
    ],
)
s= SysDef(agent_names)
monomerspacing= 2.7
#minus end polymerization
addfilamentend_reaction!(s, :filname, :pm, true,
    [:minus]=>[:minus,:mid], monomerspacing,
    "diffusing.a -->", 10E3, 1,
)
#plus end depolymerization
addfilamentend_reaction!(s, :filname, :dpp, false,
    [:mid,:plus]=>[:plus], 0.0,
    "--> diffusing.a", 1.75E-3, 0,
)