MEDYAN.make_aster!
Tuple{MEDYAN.Context}
Add an aster of twistable filaments radiating out from center, with the inner tips held together by links, and return the plus tip tags of the new filaments.
One filament is made per element of mono_states. The inner tips are at distance inner_radius from center, on a Fibonacci sphere lattice rotated by rotation, so no two filaments collide. Each inner tip, in random order, makes links to num_neighbors other inner tips chosen uniformly at random, skipping tips already linked to it, or fewer if fewer than num_neighbors tips are left unlinked to it. So with n filaments, there are at most min(n*num_neighbors, n*(n-1)/2) links, and each inner tip has on average up to 2*num_neighbors links.
Links start at their equilibrium pose, with stiffness set by k. For each bond of the link type, these fields of its per-link state are set, see RelativePoseRestraint:
eq_p_c: rotation from the first tip’s material frame to the second tip’s.r0_p: position of the second tip relative to the first, in the first tip’s frame.kbend = kkr = k/|r0_p|², so the position term of every link has the same angular stiffnesskr*|r0_p|² = kon the first tip’s material frame whatever the distance between the tips.
Keyword Arguments
fila_type: filament type id or symbol. The type must be twistable.link_type: link type id or symbol. Its places must be twoFilaTipIdx.mono_states: collection of per-filament collections of theMonomerStateorSymbolof the monomers in each new filament, in order from minus end to plus end.center:SVector{3,Float64}. The center of the aster.inner_radius: distance (nm) fromcenterto the inner tips. Must be large enough that the inner ends of the filaments don’t overlap.k: stiffness (pN·nm/rad²) of the links.num_neighbors=4: number of links each inner tip makes to other inner tips.minus_end_in::Bool=true: iftruethe minus ends are the inner tips, otherwise the plus ends are.rotation=rand(RotMatrix3): 3x3 rotation matrix applied to the filament directions.
Example
def_link_type!(s;
name=:aster,
places=[FilaTipIdx(), FilaTipIdx()],
bonds=[
(;
bond=MEDYAN.RelativePoseRestraint(),
input=(1,2),
param=(;),
state=(;kr=NaN, kbend=NaN, eq_p_c=one(RotMatrix3{Float64}), r0_p=SA[0.0,0.0,0.0]),
no_collide=true,
),
],
)
c = MEDYAN.Context(s, grid)
plus_tags = make_aster!(c;
fila_type=:actin,
link_type=:aster,
mono_states=fill([:MA, :AF, :AF, :AF, :PA], 30),
center=SA[0.0, 0.0, 0.0],
inner_radius=30.0,
k=1E3,
)