src/links/balls.jl

MEDYAN.make_ball!

make_ball!(c::Context; position, radius, stiffness=1.0, state=SA[0,0,0]) -> Tag{BallIdx}

Create a new ball in c and return a tag for it.

Keyword Arguments

  • position::SVector{3, Float64}: 3D position of the ball center (nm)
  • radius::Float32: Radius of the ball (nm)
  • stiffness::Float32=1.0: Mechanical stiffness coefficient (pN/nm)
  • state::SVector{3, Int64}=SA[0,0,0]: Three-component state vector for chemical reactions

See also: remove_ball!, update_ball!

MEDYAN.remove_ball!

remove_ball!(c::Context, ball::Union{BallIdx, Tag{BallIdx}})

Remove a ball from the simulation and unlink all connected links.

See also: make_ball!, update_ball!

MEDYAN.update_ball!

update_ball!(c::Context, ball::Union{BallIdx, Tag{BallIdx}}; kwargs...)

Update properties of an existing ball. Unspecified properties remain unchanged.

Keyword Arguments

  • position::Union{Nothing, SVector{3, Float64}}=nothing: New position (nm)
  • radius::Union{Nothing, Float32}=nothing: New radius (nm)
  • stiffness::Union{Nothing, Float32}=nothing: New stiffness (pN/nm)
  • state::Union{Nothing, SVector{3, Int64}}=nothing: New state vector

See also: make_ball!, remove_ball!