MEDYAN.make_ball!

Tuple{MEDYAN.Context}

make_ball!(c::Context; position, radius, stiffness=1.0f0, collision_layers=UInt32(1), no_collide_mask=UInt32(0), state=SA[0,0,0], is_minimized=false) -> 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)
  • collision_layers::UInt32=UInt32(1): Collision layers bitmask. Defines which layers this ball is on.
  • no_collide_mask::UInt32=UInt32(0): No-collide mask bitmask. Bits set = layers this ball will not collide with.
  • state::SVector{3, Int64}=SA[0,0,0]: Three-component state vector for chemical reactions
  • is_minimized::Bool=false: Whether the ball is marked as minimized. By default balls are not minimized when created. Set to true to create a ball that is already marked as minimized.

See also: remove_ball!, update_ball!, get_position, is_minimized