src/links/balls.jl
MEDYAN.make_ball!
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 reactionsis_minimized::Bool=false: Whether the ball is marked as minimized. By default balls are not minimized when created. Set totrueto create a ball that is already marked as minimized.
See also: remove_ball!, update_ball!, get_position, is_minimized
MEDYAN.remove_ball!
Remove a ball from the simulation and unlink all connected links.
See also: make_ball!, update_ball!, get_position, is_minimized
MEDYAN.update_ball!
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 vectoris_minimized::Union{Nothing, Bool}=nothing: Whether the ball is marked as minimized. Defaults tofalsewhenpositionorradiusis changed, otherwise unchanged. Set explicitly to override the default behavior.
See also: make_ball!, remove_ball!, get_position, is_minimized
MEDYAN.is_minimized
Return true if the ball has been minimized (i.e. its position has been updated by minimize_energy! since it was last created or modified).
Balls are marked as not minimized when created with make_ball! or when their position or radius is changed via update_ball!. All balls are marked as minimized at the end of minimize_energy!.
See also: make_ball!, update_ball!, minimize_energy!