src/links/place-types.jl

MEDYAN.num_directions

num_directions(::Union{Place, Type{<:Place}})::Int

Return the number of directions associated with a place.

MEDYAN.Anchor

Anchor <: Place

A position and directions fixed in the simulation frame. Useful for creating links to a point that doesn’t move with any dynamic elements.

Constructors

  • Anchor(): Creates a null anchor with NaN position, NaN directions, and state 0
  • Anchor(pos::SVector{3, Float64}): Creates an anchor at the given position with NaN directions and state 0
  • Anchor(pos::SVector{3, Float64}, dirs::SVector{2, SVector{3, Float64}}): Creates an anchor at the given position with specified directions and state 0
  • Anchor(pos::SVector{3, Float64}, dirs::SVector{2, SVector{3, Float64}}, state::Int64): Full constructor with position, directions, and state

Fields

  • pos::SVector{3, Float64}: 3D position coordinates
  • dirs::SVector{2, SVector{3, Float64}}: Two direction vectors
  • state::Int64: State identifier for chemical reactions