MEDYAN.add_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 add_fila_reaction! in API style and rate wiring, but the pattern is anchored at a filament end. new_states may be shorter or longer than match_states to represent depolymerization or polymerization.
match_states and new_states are always ordered from minus end toward plus end. If is_minus_end = true, the pattern is matched against the first length(match_states) monomers; if is_minus_end = false, it is matched against the last length(match_states) 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_states::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_states::Vector{Symbol}: New monomer states (minus → plus order) for the tip region. Iflength(new_states) > length(match_states), monomers are added. Iflength(new_states) < length(match_states), 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_states.
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 ifnew_statesis 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()
add_fila_type!(s; name=:actin, mono_states=[:a, :plusend, :minusend], param=MEDYAN.ACTIN_TWIST_PARAMS)
add_diffusing_species!(s, :actin_mon; coeff=2.5e7)
# Plus-end polymerization: add one monomer (bimolecular with diffusing actin)
add_fila_tip_reaction!(s;
fila_type = :actin,
name = :pp,
is_minus_end = false,
match_states = [: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
add_fila_tip_reaction!(s;
fila_type = :actin, name = :dm,
is_minus_end = true,
match_states = [:minusend, :a],
spacing = 0.0,
affect! = (c; tip, chem_voxel, kwargs...) -> begin
depolymerize_fila!(c, tip)
update_fila_mono_state!(c, FilaMonoIdx(c, tip), :minusend)
add_diffusing_count!(c; species=:actin_mon, chem_voxel, amount=+1)
1
end,
added_monomers = 0,
base_rate = 1.4,
)