MEDYAN.FilaIdx

Union{}

FilaIdx

An index identifying a specific filament in the simulation. This is a lightweight reference that becomes invalid after filament mutations (removal or reordering).

Unlike the Place subtypes, FilaIdx is not taggable — filaments do not have a stable identity because of operations like severing. To maintain a long-term reference to a filament, store a Tag{FilaTipIdx} or Tag{FilaMonoIdx} instead, and resolve back to a FilaIdx when needed.

Constructors

  • FilaIdx(typeid::Integer, idx::Integer): Direct constructor with filament type ID and filament index
  • FilaIdx(c::Context, f::FilaIdx): Re-resolve a filament index
  • FilaIdx(c::Context, ft::FilaTipIdx): Extract the filament index from a filament tip index
  • FilaIdx(c::Context, t::Tag): Construct from a context and a filament-related tag (e.g., Tag{FilaTipIdx} or Tag{FilaMonoIdx})
  • FilaIdx(c::Context, fm::FilaMonoIdx): Extract the filament index from a filament monomer index

Fields

  • typeid::UInt32: The filament type ID (use fila_typeid(c; type=:actin) to get this)
  • idx::UInt32: The index of the filament within its type (1-based)

Example

# Iterate over all filaments of a given type
ftid = fila_typeid(c; type=:actin)
for i in 1:num_fila(c; type=:actin)
    fidx = FilaIdx(ftid, i)
    states = fila_mono_states(c, fidx)
    positions = fila_node_positions(c, fidx)
end