MEDYAN.def_fila_tip_reaction!
Tuple{MEDYAN.SysDef}
Add a filament tip reaction that fires only at either the plus or minus end of a filament.
This mirrors def_fila_reaction! in API style and rate wiring, but the pattern is anchored at a filament end. new may be shorter or longer than match to represent depolymerization or polymerization.
match and new are always ordered from minus end toward plus end. If is_minus_end = true, the pattern is matched against the first length(match) monomers; if is_minus_end = false, it is matched against the last length(match) monomers.
Keyword Arguments
Required
fila_type::Symbol: Filament type (e.g.,:actin).name::Symbol: Unique name for this tip site.is_minus_end::Bool: Which filament end to target.truetargets the minus end;falsetargets the plus end.match::Vector: Pattern of monomer states to match (minus → plus order). Elements can beSymbol,Vector{Symbol}(state set), oranystate.spacing::Float64: Space needed at the filament end for this reaction (nm). This affects a load-force rate factor viaexp(-β * spacing * loadforce)whereβis 1/kT andloadforceis the external force pushing axially on the end of the filament.
State change (provide exactly one)
new::Vector{Symbol}: New monomer states (minus → plus order) for the tip region. Iflength(new) > length(match), monomers are added. Iflength(new) < length(match), monomers are removed. Cannot be used withaffect!.affect!: Custom callback(c::Context; chem_voxel::Int, tip::FilaTipIdx, kwargs...) -> Int. Called instead of automatic changes. Cannot be used withnew.
Stoichiometry
net_stoich::Vector{Pair{Symbol,Int}} = Pair{Symbol,Int}[]: Net change to diffusing species when the reaction fires. Each entry isspecies_name => amount, e.g.[:actin_mon => -1]to consume one monomer per polymerization. The callback handles the count update automatically. Can only be used withnew, not withaffect!.
Rate
base_rate::Float64: Rate constant. Units:(nm³)^invvolumepower / s.invvolumepower::Int = 0: Set to 0 for unimolecular, 1 for bimolecular.reactants_extra::String = "": Additional reactant species that contribute to propensity (e.g.,"diffusing.ligand"). The species is not consumed automatically.added_monomers::Union{Int, Nothing}: The number of monomers added by the reaction. This is automatically determined ifnewis passed. Each filament has a limited number of monomers that can be added per end
between mechanic solves given by FilamentMechParams.max_num_unmin_end. The filament tip reaction is disabled on tips where the added monomers would cause that limit to be exceeded.
Examples
using MEDYAN
s = MEDYAN.SysDef()
def_fila_type!(s; name=:actin, mono_states=[:a, :plusend, :minusend], param=MEDYAN.ACTIN_TWIST_PARAMS)
def_diffusing_species!(s, :actin_mon; coeff=2.5e7)
# Plus-end polymerization: add one monomer (bimolecular with diffusing actin)
def_fila_tip_reaction!(s;
fila_type = :actin,
name = :pp,
is_minus_end = false,
match = [:plusend],
spacing = 2.7,
new = [:a, :plusend],
net_stoich = [:actin_mon => -1],
base_rate = 1.93e7,
invvolumepower = 1,
reactants_extra = "diffusing.actin_mon",
)
# Plus-end polymerization: add one monomer (bimolecular with diffusing actin)
# Using affect!
def_fila_tip_reaction!(s;
fila_type = :actin,
name = :pp_affect,
is_minus_end = false,
match = [:a, :plusend],
spacing = 2.7,
affect! = (c; tip, chem_voxel, kwargs...) -> begin
update_fila_mono_state!(c, FilaMonoIdx(c, tip), :a)
polymerize_fila!(c, tip, :plusend)
add_diffusing_count!(c; species=:actin_mon, chem_voxel, amount=-1)
1
end,
added_monomers = 1,
base_rate = 1.93e7,
invvolumepower = 1,
reactants_extra = "diffusing.actin_mon",
)
# Minus-end depolymerization: remove one monomer, release actin back to solution
def_fila_tip_reaction!(s;
fila_type = :actin, name = :dm,
is_minus_end = true,
match = [:minusend, :a],
spacing = 0.0,
new = [:minusend],
net_stoich = [:actin_mon => +1],
base_rate = 1.4,
)